From 1c93476a803f8cb93de341a43a013d5cc302b05b Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Fri, 8 Oct 2021 20:47:14 -0400 Subject: [PATCH] video_core,yuzu: Move UpdateRescalingInfo call to video_core This only needs to happen once per game boot, so we can just call it during CreateGPU and be done with it, avoiding the need to call it in the frontends. --- src/video_core/video_core.cpp | 2 ++ src/yuzu/configuration/config.cpp | 4 ---- src/yuzu/configuration/configure_graphics.cpp | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index 508173db3..e852c817e 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp @@ -37,6 +37,8 @@ std::unique_ptr CreateRenderer( namespace VideoCore { std::unique_ptr CreateGPU(Core::Frontend::EmuWindow& emu_window, Core::System& system) { + Settings::UpdateRescalingInfo(); + const auto nvdec_value = Settings::values.nvdec_emulation.GetValue(); const bool use_nvdec = nvdec_value != Settings::NvdecEmulation::Off; const bool use_async = Settings::values.use_asynchronous_gpu_emulation.GetValue(); diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 3803bf501..4c296a94d 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -850,8 +850,6 @@ void Config::ReadRendererValues() { ReadBasicSetting(Settings::values.disable_shader_loop_safety_checks); } - Settings::UpdateRescalingInfo(); - qt_config->endGroup(); } @@ -1409,8 +1407,6 @@ void Config::SaveRendererValues() { WriteBasicSetting(Settings::values.disable_shader_loop_safety_checks); } - Settings::UpdateRescalingInfo(); - qt_config->endGroup(); } diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index e01efaeda..02498fad7 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp @@ -247,7 +247,6 @@ void ConfigureGraphics::ApplyConfiguration() { Settings::values.bg_blue.SetValue(static_cast(bg_color.blue())); } } - Settings::UpdateRescalingInfo(); } void ConfigureGraphics::changeEvent(QEvent* event) {