From 375c8c19107ee194ce641637ee9ef8f29156e9cc Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Mon, 27 Oct 2025 18:46:24 +0000 Subject: [PATCH 1/5] video_core: Fixed occasional launch crash on certain platforms due to unsafe SDL_Init --- .../renderer_vulkan/renderer_vulkan.cpp | 53 ++++++++++--------- src/video_core/video_core.cpp | 12 ++++- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index d4a63dd9b..4a78d4b1a 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -61,31 +61,6 @@ constexpr static std::array PRESENT_BINDINGS namespace { static bool IsLowRefreshRate() { #if defined(__APPLE__) || defined(ENABLE_SDL2) -#ifdef __APPLE__ // Need a special implementation because MacOS kills itself in disgust if the - // input thread calls SDL_PumpEvents at the same time as we're in SDL_Init here. - const auto cur_refresh_rate = AppleUtils::GetRefreshRate(); -#elif defined(ENABLE_SDL2) - if (SDL_Init(SDL_INIT_VIDEO) != 0) { - LOG_ERROR(Render_Vulkan, "SDL video failed to initialize, unable to check refresh rate"); - return false; - } - - SDL_DisplayMode cur_display_mode; - SDL_GetCurrentDisplayMode(0, &cur_display_mode); // TODO: Multimonitor handling. -OS - const auto cur_refresh_rate = cur_display_mode.refresh_rate; - - SDL_QuitSubSystem(SDL_INIT_VIDEO); -#endif // __APPLE__ - - if (cur_refresh_rate < SCREEN_REFRESH_RATE) { - LOG_WARNING(Render_Vulkan, - "Detected refresh rate lower than the emulated 3DS screen: {}hz. FIFO will " - "be disabled", - cur_refresh_rate); - return true; - } -#endif // defined(__APPLE__) || defined(ENABLE_SDL2) - #ifdef __APPLE__ // Apple's low power mode sometimes limits applications to 30fps without changing the refresh // rate, meaning the above code doesn't catch it. @@ -94,8 +69,34 @@ static bool IsLowRefreshRate() { "framerate. FIFO will be disabled"); return true; } -#endif + const auto cur_refresh_rate = AppleUtils::GetRefreshRate(); +#elif defined(ENABLE_SDL2) + if (SDL_WasInit(SDL_INIT_VIDEO) == 0) { + LOG_ERROR(Render_Vulkan, "Attempted to check refresh rate via SDL, but failed because " + "SDL_INIT_VIDEO wasn't initialized"); + return false; + } + + SDL_DisplayMode cur_display_mode; + SDL_GetCurrentDisplayMode(0, &cur_display_mode); // TODO: Multimonitor handling. -OS + + const auto cur_refresh_rate = cur_display_mode.refresh_rate; +#endif // ENABLE_SDL2 + + if (cur_refresh_rate < SCREEN_REFRESH_RATE) { + LOG_WARNING(Render_Vulkan, + "Detected refresh rate lower than the emulated 3DS screen: {}hz. FIFO will " + "be disabled", + cur_refresh_rate); + return true; + } else { + LOG_INFO(Render_Vulkan, "Refresh rate is above emulated 3DS screen: {}hz. Good.", + cur_refresh_rate); + } +#endif // defined(__APPLE__) || defined(ENABLE_SDL2) + + // We have no available method of checking refresh rate. Just assume that everything is fine :) return false; } } // Anonymous namespace diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index 59b9d140a..b756c65ed 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp @@ -1,4 +1,4 @@ -// Copyright 2014 Citra Emulator Project +// Copyright Citra Emulator Project / Azahar Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. @@ -16,6 +16,10 @@ #endif #include "video_core/video_core.h" +#ifdef ENABLE_SDL2 +#include +#endif + namespace VideoCore { std::unique_ptr CreateRenderer(Frontend::EmuWindow& emu_window, @@ -29,6 +33,12 @@ std::unique_ptr CreateRenderer(Frontend::EmuWindow& emu_window, #endif #ifdef ENABLE_VULKAN case Settings::GraphicsAPI::Vulkan: +#if defined(ENABLE_SDL2) && !defined(__APPLE__) + // TODO: When we migrate to SDL3, refactor so that we don't need to init here. + if (SDL_WasInit(SDL_INIT_VIDEO) == 0) { + SDL_Init(SDL_INIT_VIDEO); + } +#endif // ENABLE_SDL2 return std::make_unique(system, pica, emu_window, secondary_window); #endif #ifdef ENABLE_OPENGL From 04b6c690837f8afa69ec0e3afcea653229b012f1 Mon Sep 17 00:00:00 2001 From: David Griswold Date: Wed, 5 Nov 2025 15:30:04 +0300 Subject: [PATCH 2/5] Default VSync to false on Android Co-authored-by: OpenSauce04 --- .../citra_emu/features/settings/model/BooleanSetting.kt | 2 +- src/android/app/src/main/jni/default_ini.h | 6 +++--- src/android/app/src/main/res/values/strings.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/android/app/src/main/java/org/citra/citra_emu/features/settings/model/BooleanSetting.kt b/src/android/app/src/main/java/org/citra/citra_emu/features/settings/model/BooleanSetting.kt index 11f55d184..ff3bbdf21 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/features/settings/model/BooleanSetting.kt +++ b/src/android/app/src/main/java/org/citra/citra_emu/features/settings/model/BooleanSetting.kt @@ -44,7 +44,7 @@ enum class BooleanSetting( CPU_JIT("use_cpu_jit", Settings.SECTION_CORE, true), HW_SHADER("use_hw_shader", Settings.SECTION_RENDERER, true), SHADER_JIT("use_shader_jit", Settings.SECTION_RENDERER, true), - VSYNC("use_vsync_new", Settings.SECTION_RENDERER, true), + VSYNC("use_vsync_new", Settings.SECTION_RENDERER, false), USE_FRAME_LIMIT("use_frame_limit", Settings.SECTION_RENDERER, true), DEBUG_RENDERER("renderer_debug", Settings.SECTION_DEBUG, false), DISABLE_RIGHT_EYE_RENDER("disable_right_eye_render", Settings.SECTION_RENDERER, false), diff --git a/src/android/app/src/main/jni/default_ini.h b/src/android/app/src/main/jni/default_ini.h index 5bedfa319..35fee46b7 100644 --- a/src/android/app/src/main/jni/default_ini.h +++ b/src/android/app/src/main/jni/default_ini.h @@ -134,9 +134,9 @@ use_shader_jit = # 0 (default): Game Controlled, 1: Nearest Neighbor, 2: Linear texture_sampling = -# Forces VSync on the display thread. Usually doesn't impact performance, but on some drivers it can -# so only turn this off if you notice a speed difference. -# 0: Off, 1 (default): On +# Forces VSync on the display thread. Can cause input delay, so only turn this on +# if you have screen tearing, which is unusual on Android +# 0 (default): Off, 1: On use_vsync_new = # Reduce stuttering by storing and loading generated shaders to disk diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 078113f12..f60fdd0e3 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -320,7 +320,7 @@ Uses hardware to emulate 3DS shaders. When enabled, game performance will be significantly improved. CPU Clock Speed Enable V-Sync - Synchronizes the game frame rate to the refresh rate of your device. + Synchronizes the game frame rate to the refresh rate of your device. Can cause additional input latency but may reduce tearing in some cases. Debug Renderer Log additional graphics related debug information. When enabled, game performance will be significantly reduced. Flush Log Output on Every Message From 4574b915614356e4aaad127c93c6fcb26be9d971 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Sat, 29 Nov 2025 14:12:38 +0000 Subject: [PATCH 3/5] Move VSync setting key from `use_vsync_new` to `use_vsync` This resets the VSync setting for all existing user configurations. Note in changelog. --- .../features/settings/model/BooleanSetting.kt | 2 +- src/android/app/src/main/jni/config.cpp | 2 +- src/android/app/src/main/jni/default_ini.h | 6 +----- .../app/src/main/jni/emu_window/emu_window_gl.cpp | 4 ++-- src/citra_qt/bootmanager.cpp | 2 +- src/citra_qt/configuration/config.cpp | 4 ++-- src/citra_qt/configuration/configure_graphics.cpp | 14 +++++++------- src/citra_qt/configuration/configure_graphics.h | 2 +- src/citra_qt/configuration/configure_graphics.ui | 4 ++-- src/citra_sdl/config.cpp | 2 +- src/citra_sdl/default_ini.h | 2 +- src/common/settings.cpp | 4 ++-- src/common/settings.h | 2 +- .../renderer_vulkan/vk_present_window.cpp | 4 ++-- src/video_core/renderer_vulkan/vk_swapchain.cpp | 2 +- 15 files changed, 26 insertions(+), 30 deletions(-) diff --git a/src/android/app/src/main/java/org/citra/citra_emu/features/settings/model/BooleanSetting.kt b/src/android/app/src/main/java/org/citra/citra_emu/features/settings/model/BooleanSetting.kt index ff3bbdf21..93259c66c 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/features/settings/model/BooleanSetting.kt +++ b/src/android/app/src/main/java/org/citra/citra_emu/features/settings/model/BooleanSetting.kt @@ -44,7 +44,7 @@ enum class BooleanSetting( CPU_JIT("use_cpu_jit", Settings.SECTION_CORE, true), HW_SHADER("use_hw_shader", Settings.SECTION_RENDERER, true), SHADER_JIT("use_shader_jit", Settings.SECTION_RENDERER, true), - VSYNC("use_vsync_new", Settings.SECTION_RENDERER, false), + VSYNC("use_vsync", Settings.SECTION_RENDERER, false), USE_FRAME_LIMIT("use_frame_limit", Settings.SECTION_RENDERER, true), DEBUG_RENDERER("renderer_debug", Settings.SECTION_DEBUG, false), DISABLE_RIGHT_EYE_RENDER("disable_right_eye_render", Settings.SECTION_RENDERER, false), diff --git a/src/android/app/src/main/jni/config.cpp b/src/android/app/src/main/jni/config.cpp index 9ac9f3737..1659dc3d6 100644 --- a/src/android/app/src/main/jni/config.cpp +++ b/src/android/app/src/main/jni/config.cpp @@ -147,7 +147,7 @@ void Config::ReadValues() { ReadSetting("Renderer", Settings::values.use_shader_jit); ReadSetting("Renderer", Settings::values.resolution_factor); ReadSetting("Renderer", Settings::values.use_disk_shader_cache); - ReadSetting("Renderer", Settings::values.use_vsync_new); + ReadSetting("Renderer", Settings::values.use_vsync); ReadSetting("Renderer", Settings::values.texture_filter); ReadSetting("Renderer", Settings::values.texture_sampling); ReadSetting("Renderer", Settings::values.turbo_limit); diff --git a/src/android/app/src/main/jni/default_ini.h b/src/android/app/src/main/jni/default_ini.h index 35fee46b7..26688a708 100644 --- a/src/android/app/src/main/jni/default_ini.h +++ b/src/android/app/src/main/jni/default_ini.h @@ -137,7 +137,7 @@ texture_sampling = # Forces VSync on the display thread. Can cause input delay, so only turn this on # if you have screen tearing, which is unusual on Android # 0 (default): Off, 1: On -use_vsync_new = +use_vsync = # Reduce stuttering by storing and loading generated shaders to disk # 0: Off, 1 (default. On) @@ -148,10 +148,6 @@ use_disk_shader_cache = # factor for the 3DS resolution resolution_factor = -# Whether to enable V-Sync (caps the framerate at 60FPS) or not. -# 0 (default): Off, 1: On -vsync_enabled = - # Turns on the frame limiter, which will limit frames output to the target game speed # 0: Off, 1: On (default) use_frame_limit = diff --git a/src/android/app/src/main/jni/emu_window/emu_window_gl.cpp b/src/android/app/src/main/jni/emu_window/emu_window_gl.cpp index acfb5fcf4..5c1b0ccbd 100644 --- a/src/android/app/src/main/jni/emu_window/emu_window_gl.cpp +++ b/src/android/app/src/main/jni/emu_window/emu_window_gl.cpp @@ -122,7 +122,7 @@ EmuWindow_Android_OpenGL::EmuWindow_Android_OpenGL(Core::System& system_, ANativ LOG_CRITICAL(Frontend, "gladLoadGLES2Loader() failed"); return; } - if (!eglSwapInterval(egl_display, Settings::values.use_vsync_new ? 1 : 0)) { + if (!eglSwapInterval(egl_display, Settings::values.use_vsync ? 1 : 0)) { LOG_CRITICAL(Frontend, "eglSwapInterval() failed"); return; } @@ -218,7 +218,7 @@ void EmuWindow_Android_OpenGL::TryPresenting() { } eglMakeCurrent(egl_display, egl_surface, egl_surface, egl_context); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); - eglSwapInterval(egl_display, Settings::values.use_vsync_new ? 1 : 0); + eglSwapInterval(egl_display, Settings::values.use_vsync ? 1 : 0); system.GPU().Renderer().TryPresent(0, is_secondary); eglSwapBuffers(egl_display, egl_surface); } diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index b53dbd5b9..cf88e7f47 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -754,7 +754,7 @@ bool GRenderWindow::InitializeOpenGL() { child->SetContext(std::move(child_context)); auto format = child_widget->windowHandle()->format(); - format.setSwapInterval(Settings::values.use_vsync_new.GetValue()); + format.setSwapInterval(Settings::values.use_vsync.GetValue()); child_widget->windowHandle()->setFormat(format); return true; diff --git a/src/citra_qt/configuration/config.cpp b/src/citra_qt/configuration/config.cpp index 0e7777911..cdb86c4c5 100644 --- a/src/citra_qt/configuration/config.cpp +++ b/src/citra_qt/configuration/config.cpp @@ -685,7 +685,7 @@ void QtConfig::ReadRendererValues() { ReadGlobalSetting(Settings::values.use_hw_shader); ReadGlobalSetting(Settings::values.shaders_accurate_mul); ReadGlobalSetting(Settings::values.use_disk_shader_cache); - ReadGlobalSetting(Settings::values.use_vsync_new); + ReadGlobalSetting(Settings::values.use_vsync); ReadGlobalSetting(Settings::values.resolution_factor); ReadGlobalSetting(Settings::values.frame_limit); ReadGlobalSetting(Settings::values.turbo_limit); @@ -1216,7 +1216,7 @@ void QtConfig::SaveRendererValues() { WriteGlobalSetting(Settings::values.use_hw_shader); WriteGlobalSetting(Settings::values.shaders_accurate_mul); WriteGlobalSetting(Settings::values.use_disk_shader_cache); - WriteGlobalSetting(Settings::values.use_vsync_new); + WriteGlobalSetting(Settings::values.use_vsync); WriteGlobalSetting(Settings::values.resolution_factor); WriteGlobalSetting(Settings::values.frame_limit); WriteGlobalSetting(Settings::values.turbo_limit); diff --git a/src/citra_qt/configuration/configure_graphics.cpp b/src/citra_qt/configuration/configure_graphics.cpp index eb706fb56..8f6a04a6c 100644 --- a/src/citra_qt/configuration/configure_graphics.cpp +++ b/src/citra_qt/configuration/configure_graphics.cpp @@ -142,7 +142,7 @@ void ConfigureGraphics::SetConfiguration() { ui->toggle_hw_shader->setChecked(Settings::values.use_hw_shader.GetValue()); ui->toggle_accurate_mul->setChecked(Settings::values.shaders_accurate_mul.GetValue()); ui->toggle_disk_shader_cache->setChecked(Settings::values.use_disk_shader_cache.GetValue()); - ui->toggle_vsync_new->setChecked(Settings::values.use_vsync_new.GetValue()); + ui->toggle_vsync->setChecked(Settings::values.use_vsync.GetValue()); ui->spirv_shader_gen->setChecked(Settings::values.spirv_shader_gen.GetValue()); ui->disable_spirv_optimizer->setChecked(Settings::values.disable_spirv_optimizer.GetValue()); ui->toggle_async_shaders->setChecked(Settings::values.async_shader_compilation.GetValue()); @@ -174,8 +174,8 @@ void ConfigureGraphics::ApplyConfiguration() { ui->texture_sampling_combobox); ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_disk_shader_cache, ui->toggle_disk_shader_cache, use_disk_shader_cache); - ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_vsync_new, ui->toggle_vsync_new, - use_vsync_new); + ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_vsync, ui->toggle_vsync, + use_vsync); ConfigurationShared::ApplyPerGameSetting( &Settings::values.delay_game_render_thread_us, ui->delay_render_combo, [this](s32) { return ui->delay_render_slider->value(); }); @@ -197,8 +197,8 @@ void ConfigureGraphics::SetupPerGameUI() { ui->toggle_accurate_mul->setEnabled(Settings::values.shaders_accurate_mul.UsingGlobal()); ui->toggle_disk_shader_cache->setEnabled( Settings::values.use_disk_shader_cache.UsingGlobal()); - ui->toggle_vsync_new->setEnabled(ui->toggle_vsync_new->isEnabled() && - Settings::values.use_vsync_new.UsingGlobal()); + ui->toggle_vsync->setEnabled(ui->toggle_vsync->isEnabled() && + Settings::values.use_vsync.UsingGlobal()); ui->toggle_async_shaders->setEnabled( Settings::values.async_shader_compilation.UsingGlobal()); ui->widget_texture_sampling->setEnabled(Settings::values.texture_sampling.UsingGlobal()); @@ -236,8 +236,8 @@ void ConfigureGraphics::SetupPerGameUI() { ConfigurationShared::SetColoredTristate(ui->toggle_disk_shader_cache, Settings::values.use_disk_shader_cache, use_disk_shader_cache); - ConfigurationShared::SetColoredTristate(ui->toggle_vsync_new, Settings::values.use_vsync_new, - use_vsync_new); + ConfigurationShared::SetColoredTristate(ui->toggle_vsync, Settings::values.use_vsync, + use_vsync); ConfigurationShared::SetColoredTristate(ui->toggle_async_shaders, Settings::values.async_shader_compilation, async_shader_compilation); diff --git a/src/citra_qt/configuration/configure_graphics.h b/src/citra_qt/configuration/configure_graphics.h index 1031b964a..46d74dc19 100644 --- a/src/citra_qt/configuration/configure_graphics.h +++ b/src/citra_qt/configuration/configure_graphics.h @@ -38,7 +38,7 @@ private: ConfigurationShared::CheckState use_hw_shader; ConfigurationShared::CheckState shaders_accurate_mul; ConfigurationShared::CheckState use_disk_shader_cache; - ConfigurationShared::CheckState use_vsync_new; + ConfigurationShared::CheckState use_vsync; ConfigurationShared::CheckState async_shader_compilation; ConfigurationShared::CheckState async_presentation; ConfigurationShared::CheckState spirv_shader_gen; diff --git a/src/citra_qt/configuration/configure_graphics.ui b/src/citra_qt/configuration/configure_graphics.ui index ec6a5392c..49f818129 100644 --- a/src/citra_qt/configuration/configure_graphics.ui +++ b/src/citra_qt/configuration/configure_graphics.ui @@ -308,7 +308,7 @@ - + VSync prevents the screen from tearing, but some graphics cards have lower performance with VSync enabled. Keep it enabled if you don't notice a performance difference. @@ -416,7 +416,7 @@ toggle_accurate_mul toggle_shader_jit toggle_disk_shader_cache - toggle_vsync_new + toggle_vsync diff --git a/src/citra_sdl/config.cpp b/src/citra_sdl/config.cpp index da800cc30..58ac46e3c 100644 --- a/src/citra_sdl/config.cpp +++ b/src/citra_sdl/config.cpp @@ -145,7 +145,7 @@ void SdlConfig::ReadValues() { ReadSetting("Renderer", Settings::values.resolution_factor); ReadSetting("Renderer", Settings::values.use_disk_shader_cache); ReadSetting("Renderer", Settings::values.frame_limit); - ReadSetting("Renderer", Settings::values.use_vsync_new); + ReadSetting("Renderer", Settings::values.use_vsync); ReadSetting("Renderer", Settings::values.texture_filter); ReadSetting("Renderer", Settings::values.texture_sampling); ReadSetting("Renderer", Settings::values.delay_game_render_thread_us); diff --git a/src/citra_sdl/default_ini.h b/src/citra_sdl/default_ini.h index 358740243..3fb471449 100644 --- a/src/citra_sdl/default_ini.h +++ b/src/citra_sdl/default_ini.h @@ -121,7 +121,7 @@ use_shader_jit = # Forces VSync on the display thread. Usually doesn't impact performance, but on some drivers it can # so only turn this off if you notice a speed difference. # 0: Off, 1 (default): On -use_vsync_new = +use_vsync = # Reduce stuttering by storing and loading generated shaders to disk # 0: Off, 1 (default. On) diff --git a/src/common/settings.cpp b/src/common/settings.cpp index f91d1ec58..cd604e34a 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -98,7 +98,7 @@ void LogSettings() { log_setting("Renderer_UseShaderJit", values.use_shader_jit.GetValue()); log_setting("Renderer_UseResolutionFactor", values.resolution_factor.GetValue()); log_setting("Renderer_FrameLimit", values.frame_limit.GetValue()); - log_setting("Renderer_VSyncNew", values.use_vsync_new.GetValue()); + log_setting("Renderer_VSyncNew", values.use_vsync.GetValue()); log_setting("Renderer_PostProcessingShader", values.pp_shader_name.GetValue()); log_setting("Renderer_FilterMode", values.filter_mode.GetValue()); log_setting("Renderer_TextureFilter", GetTextureFilterName(values.texture_filter.GetValue())); @@ -200,7 +200,7 @@ void RestoreGlobalState(bool is_powered_on) { values.use_hw_shader.SetGlobal(true); values.use_disk_shader_cache.SetGlobal(true); values.shaders_accurate_mul.SetGlobal(true); - values.use_vsync_new.SetGlobal(true); + values.use_vsync.SetGlobal(true); values.resolution_factor.SetGlobal(true); values.frame_limit.SetGlobal(true); values.texture_filter.SetGlobal(true); diff --git a/src/common/settings.h b/src/common/settings.h index 77061db16..589de0057 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -506,7 +506,7 @@ struct Values { SwitchableSetting use_hw_shader{true, "use_hw_shader"}; SwitchableSetting use_disk_shader_cache{true, "use_disk_shader_cache"}; SwitchableSetting shaders_accurate_mul{true, "shaders_accurate_mul"}; - SwitchableSetting use_vsync_new{true, "use_vsync_new"}; + SwitchableSetting use_vsync{true, "use_vsync"}; Setting use_shader_jit{true, "use_shader_jit"}; SwitchableSetting resolution_factor{1, 0, 10, "resolution_factor"}; SwitchableSetting frame_limit{100, 0, 1000, "frame_limit"}; diff --git a/src/video_core/renderer_vulkan/vk_present_window.cpp b/src/video_core/renderer_vulkan/vk_present_window.cpp index 7cdf455dc..4d049d97d 100644 --- a/src/video_core/renderer_vulkan/vk_present_window.cpp +++ b/src/video_core/renderer_vulkan/vk_present_window.cpp @@ -105,7 +105,7 @@ PresentWindow::PresentWindow(Frontend::EmuWindow& emu_window_, const Instance& i swapchain{instance, emu_window.GetFramebufferLayout().width, emu_window.GetFramebufferLayout().height, surface, low_refresh_rate_}, graphics_queue{instance.GetGraphicsQueue()}, present_renderpass{CreateRenderpass()}, - vsync_enabled{Settings::values.use_vsync_new.GetValue()}, + vsync_enabled{Settings::values.use_vsync.GetValue()}, blit_supported{ CanBlitToSwapchain(instance.GetPhysicalDevice(), swapchain.GetSurfaceFormat().format)}, use_present_thread{Settings::values.async_presentation.GetValue()}, @@ -360,7 +360,7 @@ void PresentWindow::CopyToSwapchain(Frame* frame) { }; #ifndef ANDROID - const bool use_vsync = Settings::values.use_vsync_new.GetValue(); + const bool use_vsync = Settings::values.use_vsync.GetValue(); const bool size_changed = swapchain.GetWidth() != frame->width || swapchain.GetHeight() != frame->height; const bool vsync_changed = vsync_enabled != use_vsync; diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cpp index ac5340653..56e4cf429 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.cpp +++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp @@ -161,7 +161,7 @@ void Swapchain::FindPresentFormat() { void Swapchain::SetPresentMode() { const auto modes = instance.GetPhysicalDevice().getSurfacePresentModesKHR(surface); - const bool use_vsync = Settings::values.use_vsync_new.GetValue(); + const bool use_vsync = Settings::values.use_vsync.GetValue(); const auto find_mode = [&modes](vk::PresentModeKHR requested) { const auto it = std::find_if(modes.begin(), modes.end(), From 4cc9792f66665bd66f32ac061d8faba4af62f15a Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Sat, 29 Nov 2025 14:43:24 +0000 Subject: [PATCH 4/5] configure_graphics.cpp: Corrected indentation --- src/citra_qt/configuration/configure_graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/citra_qt/configuration/configure_graphics.cpp b/src/citra_qt/configuration/configure_graphics.cpp index 8f6a04a6c..d695b6720 100644 --- a/src/citra_qt/configuration/configure_graphics.cpp +++ b/src/citra_qt/configuration/configure_graphics.cpp @@ -198,7 +198,7 @@ void ConfigureGraphics::SetupPerGameUI() { ui->toggle_disk_shader_cache->setEnabled( Settings::values.use_disk_shader_cache.UsingGlobal()); ui->toggle_vsync->setEnabled(ui->toggle_vsync->isEnabled() && - Settings::values.use_vsync.UsingGlobal()); + Settings::values.use_vsync.UsingGlobal()); ui->toggle_async_shaders->setEnabled( Settings::values.async_shader_compilation.UsingGlobal()); ui->widget_texture_sampling->setEnabled(Settings::values.texture_sampling.UsingGlobal()); From e0b8e8440ab64679f2e1b6b5b648d12bc4f93770 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Fri, 28 Nov 2025 14:06:42 +0000 Subject: [PATCH 5/5] cmake: Fixed AppImage build failure caused by upstream changes to linuxdeploy Also improved error message when linuxdeploy run fails --- CMakeModules/BundleTarget.cmake | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/CMakeModules/BundleTarget.cmake b/CMakeModules/BundleTarget.cmake index bd30faf91..fead41acf 100644 --- a/CMakeModules/BundleTarget.cmake +++ b/CMakeModules/BundleTarget.cmake @@ -130,25 +130,10 @@ if (BUNDLE_TARGET_EXECUTE) --icon-file "${CMAKE_BINARY_DIR}/dist/org.azahar_emu.Azahar.svg" --desktop-file "${source_path}/dist/${executable_name}.desktop" --appdir "${appdir_path}" - RESULT_VARIABLE linuxdeploy_appdir_result) + RESULT_VARIABLE linuxdeploy_appdir_result + ERROR_VARIABLE linuxdeploy_appdir_error) if (NOT linuxdeploy_appdir_result EQUAL "0") - message(FATAL_ERROR "linuxdeploy failed to create AppDir: ${linuxdeploy_appdir_result}") - endif() - - if (enable_qt) - set(qt_hook_file "${appdir_path}/apprun-hooks/linuxdeploy-plugin-qt-hook.sh") - file(READ "${qt_hook_file}" qt_hook_contents) - # Add Cinnamon to list of DEs for GTK3 theming. - string(REPLACE - "*XFCE*" - "*X-Cinnamon*|*XFCE*" - qt_hook_contents "${qt_hook_contents}") - # Wayland backend crashes due to changed schemas in Gnome 40. - string(REPLACE - "export QT_QPA_PLATFORMTHEME=gtk3" - "export QT_QPA_PLATFORMTHEME=gtk3; export GDK_BACKEND=x11" - qt_hook_contents "${qt_hook_contents}") - file(WRITE "${qt_hook_file}" "${qt_hook_contents}") + message(FATAL_ERROR "linuxdeploy failed to create AppDir w/ exit code ${linuxdeploy_appdir_result}:\n${linuxdeploy_appdir_error}") endif() message(STATUS "Creating AppImage for executable ${executable_path}")