summaryrefslogtreecommitdiffstats
path: root/src/citra
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-08-26 00:20:47 +0200
committerbunnei <bunneidev@gmail.com>2016-08-30 03:42:30 +0200
commit08ad9b36d44e3cca0802bb1198036c5d77c844cc (patch)
tree8bbca77978c74081557adf548ec65e624ae3ccfd /src/citra
parentqt: Add a configuration tab for Graphics and move relevant fields. (diff)
downloadyuzu-08ad9b36d44e3cca0802bb1198036c5d77c844cc.tar
yuzu-08ad9b36d44e3cca0802bb1198036c5d77c844cc.tar.gz
yuzu-08ad9b36d44e3cca0802bb1198036c5d77c844cc.tar.bz2
yuzu-08ad9b36d44e3cca0802bb1198036c5d77c844cc.tar.lz
yuzu-08ad9b36d44e3cca0802bb1198036c5d77c844cc.tar.xz
yuzu-08ad9b36d44e3cca0802bb1198036c5d77c844cc.tar.zst
yuzu-08ad9b36d44e3cca0802bb1198036c5d77c844cc.zip
Diffstat (limited to 'src/citra')
-rw-r--r--src/citra/config.cpp1
-rw-r--r--src/citra/default_ini.h4
-rw-r--r--src/citra/emu_window/emu_window_sdl2.cpp1
3 files changed, 6 insertions, 0 deletions
diff --git a/src/citra/config.cpp b/src/citra/config.cpp
index e832ec58d..d71045646 100644
--- a/src/citra/config.cpp
+++ b/src/citra/config.cpp
@@ -71,6 +71,7 @@ void Config::ReadValues() {
Settings::values.use_hw_renderer = sdl2_config->GetBoolean("Renderer", "use_hw_renderer", true);
Settings::values.use_shader_jit = sdl2_config->GetBoolean("Renderer", "use_shader_jit", true);
Settings::values.use_scaled_resolution = sdl2_config->GetBoolean("Renderer", "use_scaled_resolution", false);
+ Settings::values.use_vsync = sdl2_config->GetBoolean("Renderer", "use_vsync", false);
Settings::values.bg_red = (float)sdl2_config->GetReal("Renderer", "bg_red", 1.0);
Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 1.0);
diff --git a/src/citra/default_ini.h b/src/citra/default_ini.h
index 6249ef9e2..b10700e62 100644
--- a/src/citra/default_ini.h
+++ b/src/citra/default_ini.h
@@ -55,6 +55,10 @@ use_shader_jit =
# 0 (default): Native, 1: Scaled
use_scaled_resolution =
+# Whether to enable V-Sync (caps the framerate at 60FPS) or not.
+# 0 (default): Off, 1: On
+use_vsync =
+
# The clear color for the renderer. What shows up on the sides of the bottom screen.
# Must be in range of 0.0-1.0. Defaults to 1.0 for all.
bg_red =
diff --git a/src/citra/emu_window/emu_window_sdl2.cpp b/src/citra/emu_window/emu_window_sdl2.cpp
index 591f68aa4..da12307b7 100644
--- a/src/citra/emu_window/emu_window_sdl2.cpp
+++ b/src/citra/emu_window/emu_window_sdl2.cpp
@@ -108,6 +108,7 @@ EmuWindow_SDL2::EmuWindow_SDL2() {
OnResize();
OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size);
SDL_PumpEvents();
+ SDL_GL_SetSwapInterval(Settings::values.use_vsync);
DoneCurrent();
}