diff options
Diffstat (limited to 'src/citra_qt')
-rw-r--r-- | src/citra_qt/bootmanager.cpp | 1 | ||||
-rw-r--r-- | src/citra_qt/config.cpp | 2 | ||||
-rw-r--r-- | src/citra_qt/configure_graphics.cpp | 3 | ||||
-rw-r--r-- | src/citra_qt/configure_graphics.ui | 7 |
4 files changed, 12 insertions, 1 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index 414b2f8af..a9669c559 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -119,6 +119,7 @@ GRenderWindow::GRenderWindow(QWidget* parent, EmuThread* emu_thread) : QGLFormat fmt; fmt.setVersion(3,3); fmt.setProfile(QGLFormat::CoreProfile); + fmt.setSwapInterval(VideoCore::g_vsync_enabled); // Requests a forward-compatible context, which is required to get a 3.2+ context on OS X fmt.setOption(QGL::NoDeprecatedFunctions); diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp index 93c6a6e41..ff7af445e 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp @@ -48,6 +48,7 @@ void Config::ReadValues() { Settings::values.use_hw_renderer = qt_config->value("use_hw_renderer", true).toBool(); Settings::values.use_shader_jit = qt_config->value("use_shader_jit", true).toBool(); Settings::values.use_scaled_resolution = qt_config->value("use_scaled_resolution", false).toBool(); + Settings::values.use_vsync = qt_config->value("use_vsync", false).toBool(); Settings::values.bg_red = qt_config->value("bg_red", 1.0).toFloat(); Settings::values.bg_green = qt_config->value("bg_green", 1.0).toFloat(); @@ -139,6 +140,7 @@ void Config::SaveValues() { qt_config->setValue("use_hw_renderer", Settings::values.use_hw_renderer); qt_config->setValue("use_shader_jit", Settings::values.use_shader_jit); qt_config->setValue("use_scaled_resolution", Settings::values.use_scaled_resolution); + qt_config->setValue("use_vsync", Settings::values.use_vsync); // Cast to double because Qt's written float values are not human-readable qt_config->setValue("bg_red", (double)Settings::values.bg_red); diff --git a/src/citra_qt/configure_graphics.cpp b/src/citra_qt/configure_graphics.cpp index 85a120686..22def58d4 100644 --- a/src/citra_qt/configure_graphics.cpp +++ b/src/citra_qt/configure_graphics.cpp @@ -22,11 +22,12 @@ void ConfigureGraphics::setConfiguration() { ui->toogle_hw_renderer->setChecked(Settings::values.use_hw_renderer); ui->toogle_shader_jit->setChecked(Settings::values.use_shader_jit); ui->toogle_scaled_resolution->setChecked(Settings::values.use_scaled_resolution); + ui->toogle_vsync->setChecked(Settings::values.use_vsync); } void ConfigureGraphics::applyConfiguration() { Settings::values.use_hw_renderer = ui->toogle_hw_renderer->isChecked(); Settings::values.use_shader_jit = ui->toogle_shader_jit->isChecked(); - Settings::values.use_scaled_resolution = ui->toogle_scaled_resolution->isChecked(); + Settings::values.use_vsync = ui->toogle_vsync->isChecked(); Settings::Apply(); } diff --git a/src/citra_qt/configure_graphics.ui b/src/citra_qt/configure_graphics.ui index 336d49b19..e68d68c0e 100644 --- a/src/citra_qt/configure_graphics.ui +++ b/src/citra_qt/configure_graphics.ui @@ -43,6 +43,13 @@ </property> </widget> </item> + <item> + <widget class="QCheckBox" name="toogle_vsync"> + <property name="text"> + <string>Enable V-Sync</string> + </property> + </widget> + </item> </layout> </widget> </item> |