Merge pull request #4457 from FearlessTobi/remove-vsync

citra_qt: Remove V-Sync option
This commit is contained in:
bunnei 2019-01-21 15:56:12 -05:00 committed by GitHub
commit efd5768398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 9 additions and 19 deletions

View File

@ -121,7 +121,7 @@ void Config::ReadValues() {
Settings::values.use_shader_jit = sdl2_config->GetBoolean("Renderer", "use_shader_jit", true); Settings::values.use_shader_jit = sdl2_config->GetBoolean("Renderer", "use_shader_jit", true);
Settings::values.resolution_factor = Settings::values.resolution_factor =
static_cast<u16>(sdl2_config->GetInteger("Renderer", "resolution_factor", 1)); static_cast<u16>(sdl2_config->GetInteger("Renderer", "resolution_factor", 1));
Settings::values.use_vsync = sdl2_config->GetBoolean("Renderer", "use_vsync", false); Settings::values.vsync_enabled = sdl2_config->GetBoolean("Renderer", "vsync_enabled", false);
Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true); Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true);
Settings::values.frame_limit = Settings::values.frame_limit =
static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100)); static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100));

View File

@ -119,7 +119,7 @@ resolution_factor =
# Whether to enable V-Sync (caps the framerate at 60FPS) or not. # Whether to enable V-Sync (caps the framerate at 60FPS) or not.
# 0 (default): Off, 1: On # 0 (default): Off, 1: On
use_vsync = vsync_enabled =
# Turns on the frame limiter, which will limit frames output to the target game speed # Turns on the frame limiter, which will limit frames output to the target game speed
# 0: Off, 1: On (default) # 0: Off, 1: On (default)

View File

@ -163,7 +163,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
OnResize(); OnResize();
OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size); OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size);
SDL_PumpEvents(); SDL_PumpEvents();
SDL_GL_SetSwapInterval(Settings::values.use_vsync); SDL_GL_SetSwapInterval(Settings::values.vsync_enabled);
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch, LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch,
Common::g_scm_desc); Common::g_scm_desc);
Settings::LogSettings(); Settings::LogSettings();

View File

@ -315,7 +315,7 @@ void GRenderWindow::InitRenderTarget() {
QGLFormat fmt; QGLFormat fmt;
fmt.setVersion(3, 3); fmt.setVersion(3, 3);
fmt.setProfile(QGLFormat::CoreProfile); fmt.setProfile(QGLFormat::CoreProfile);
fmt.setSwapInterval(Settings::values.use_vsync); fmt.setSwapInterval(Settings::values.vsync_enabled);
// Requests a forward-compatible context, which is required to get a 3.2+ context on OS X // Requests a forward-compatible context, which is required to get a 3.2+ context on OS X
fmt.setOption(QGL::NoDeprecatedFunctions); fmt.setOption(QGL::NoDeprecatedFunctions);

View File

@ -137,7 +137,7 @@ void Config::ReadValues() {
Settings::values.use_shader_jit = ReadSetting("use_shader_jit", true).toBool(); Settings::values.use_shader_jit = ReadSetting("use_shader_jit", true).toBool();
Settings::values.resolution_factor = Settings::values.resolution_factor =
static_cast<u16>(ReadSetting("resolution_factor", 1).toInt()); static_cast<u16>(ReadSetting("resolution_factor", 1).toInt());
Settings::values.use_vsync = ReadSetting("use_vsync", false).toBool(); Settings::values.vsync_enabled = ReadSetting("vsync_enabled", false).toBool();
Settings::values.use_frame_limit = ReadSetting("use_frame_limit", true).toBool(); Settings::values.use_frame_limit = ReadSetting("use_frame_limit", true).toBool();
Settings::values.frame_limit = ReadSetting("frame_limit", 100).toInt(); Settings::values.frame_limit = ReadSetting("frame_limit", 100).toInt();
@ -426,7 +426,7 @@ void Config::SaveValues() {
WriteSetting("shaders_accurate_mul", Settings::values.shaders_accurate_mul, false); WriteSetting("shaders_accurate_mul", Settings::values.shaders_accurate_mul, false);
WriteSetting("use_shader_jit", Settings::values.use_shader_jit, true); WriteSetting("use_shader_jit", Settings::values.use_shader_jit, true);
WriteSetting("resolution_factor", Settings::values.resolution_factor, 1); WriteSetting("resolution_factor", Settings::values.resolution_factor, 1);
WriteSetting("use_vsync", Settings::values.use_vsync, false); WriteSetting("vsync_enabled", Settings::values.vsync_enabled, false);
WriteSetting("use_frame_limit", Settings::values.use_frame_limit, true); WriteSetting("use_frame_limit", Settings::values.use_frame_limit, true);
WriteSetting("frame_limit", Settings::values.frame_limit, 100); WriteSetting("frame_limit", Settings::values.frame_limit, 100);

View File

@ -17,7 +17,6 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent)
ui->setupUi(this); ui->setupUi(this);
this->setConfiguration(); this->setConfiguration();
ui->toggle_vsync->setEnabled(!Core::System::GetInstance().IsPoweredOn());
ui->frame_limit->setEnabled(Settings::values.use_frame_limit); ui->frame_limit->setEnabled(Settings::values.use_frame_limit);
connect(ui->toggle_frame_limit, &QCheckBox::stateChanged, ui->frame_limit, connect(ui->toggle_frame_limit, &QCheckBox::stateChanged, ui->frame_limit,
&QSpinBox::setEnabled); &QSpinBox::setEnabled);
@ -61,7 +60,6 @@ void ConfigureGraphics::setConfiguration() {
ui->toggle_accurate_mul->setChecked(Settings::values.shaders_accurate_mul); ui->toggle_accurate_mul->setChecked(Settings::values.shaders_accurate_mul);
ui->toggle_shader_jit->setChecked(Settings::values.use_shader_jit); ui->toggle_shader_jit->setChecked(Settings::values.use_shader_jit);
ui->resolution_factor_combobox->setCurrentIndex(Settings::values.resolution_factor); ui->resolution_factor_combobox->setCurrentIndex(Settings::values.resolution_factor);
ui->toggle_vsync->setChecked(Settings::values.use_vsync);
ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit); ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit);
ui->frame_limit->setValue(Settings::values.frame_limit); ui->frame_limit->setValue(Settings::values.frame_limit);
ui->factor_3d->setValue(Settings::values.factor_3d); ui->factor_3d->setValue(Settings::values.factor_3d);
@ -82,7 +80,6 @@ void ConfigureGraphics::applyConfiguration() {
Settings::values.use_shader_jit = ui->toggle_shader_jit->isChecked(); Settings::values.use_shader_jit = ui->toggle_shader_jit->isChecked();
Settings::values.resolution_factor = Settings::values.resolution_factor =
static_cast<u16>(ui->resolution_factor_combobox->currentIndex()); static_cast<u16>(ui->resolution_factor_combobox->currentIndex());
Settings::values.use_vsync = ui->toggle_vsync->isChecked();
Settings::values.use_frame_limit = ui->toggle_frame_limit->isChecked(); Settings::values.use_frame_limit = ui->toggle_frame_limit->isChecked();
Settings::values.frame_limit = ui->frame_limit->value(); Settings::values.frame_limit = ui->frame_limit->value();
Settings::values.factor_3d = ui->factor_3d->value(); Settings::values.factor_3d = ui->factor_3d->value();

View File

@ -20,13 +20,6 @@
<string>General</string> <string>General</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="toggle_vsync">
<property name="text">
<string>Enable V-Sync</string>
</property>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>

View File

@ -73,7 +73,7 @@ void LogSettings() {
LogSetting("Renderer_ShadersAccurateMul", Settings::values.shaders_accurate_mul); LogSetting("Renderer_ShadersAccurateMul", Settings::values.shaders_accurate_mul);
LogSetting("Renderer_UseShaderJit", Settings::values.use_shader_jit); LogSetting("Renderer_UseShaderJit", Settings::values.use_shader_jit);
LogSetting("Renderer_UseResolutionFactor", Settings::values.resolution_factor); LogSetting("Renderer_UseResolutionFactor", Settings::values.resolution_factor);
LogSetting("Renderer_UseVsync", Settings::values.use_vsync); LogSetting("Renderer_VsyncEnabled", Settings::values.vsync_enabled);
LogSetting("Renderer_UseFrameLimit", Settings::values.use_frame_limit); LogSetting("Renderer_UseFrameLimit", Settings::values.use_frame_limit);
LogSetting("Renderer_FrameLimit", Settings::values.frame_limit); LogSetting("Renderer_FrameLimit", Settings::values.frame_limit);
LogSetting("Layout_Toggle3d", Settings::values.toggle_3d); LogSetting("Layout_Toggle3d", Settings::values.toggle_3d);

View File

@ -135,7 +135,7 @@ struct Values {
bool shaders_accurate_mul; bool shaders_accurate_mul;
bool use_shader_jit; bool use_shader_jit;
u16 resolution_factor; u16 resolution_factor;
bool use_vsync; bool vsync_enabled;
bool use_frame_limit; bool use_frame_limit;
u16 frame_limit; u16 frame_limit;

View File

@ -177,7 +177,7 @@ TelemetrySession::TelemetrySession() {
Settings::values.shaders_accurate_mul); Settings::values.shaders_accurate_mul);
AddField(Telemetry::FieldType::UserConfig, "Renderer_UseShaderJit", AddField(Telemetry::FieldType::UserConfig, "Renderer_UseShaderJit",
Settings::values.use_shader_jit); Settings::values.use_shader_jit);
AddField(Telemetry::FieldType::UserConfig, "Renderer_UseVsync", Settings::values.use_vsync); AddField(Telemetry::FieldType::UserConfig, "Renderer_UseVsync", Settings::values.vsync_enabled);
AddField(Telemetry::FieldType::UserConfig, "Renderer_Toggle3d", Settings::values.toggle_3d); AddField(Telemetry::FieldType::UserConfig, "Renderer_Toggle3d", Settings::values.toggle_3d);
AddField(Telemetry::FieldType::UserConfig, "Renderer_Factor3d", Settings::values.factor_3d); AddField(Telemetry::FieldType::UserConfig, "Renderer_Factor3d", Settings::values.factor_3d);
AddField(Telemetry::FieldType::UserConfig, "System_IsNew3ds", Settings::values.is_new_3ds); AddField(Telemetry::FieldType::UserConfig, "System_IsNew3ds", Settings::values.is_new_3ds);