summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VideoConfig.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-12-18 05:19:06 +0100
committerGitHub <noreply@github.com>2023-12-18 05:19:06 +0100
commit715a551daccc2a8e782089f7a70902ddf1a91a09 (patch)
tree7a2ccaa8e55d0718846140e2f45bad4f0ad96ce0 /Source/Core/VideoCommon/VideoConfig.cpp
parentde8bc32dc53a4821a97e5dccb37527598fe98c6c (diff)
parenta6dfeed3189b43a2267f5819e91e7a1c105ef3a9 (diff)
Merge pull request #12170 from Filoppi/custom_aspect_ratio
Add support for custom aspect ratios
Diffstat (limited to 'Source/Core/VideoCommon/VideoConfig.cpp')
-rw-r--r--Source/Core/VideoCommon/VideoConfig.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp
index 426d8f7c8b..d9cb9ad0c3 100644
--- a/Source/Core/VideoCommon/VideoConfig.cpp
+++ b/Source/Core/VideoCommon/VideoConfig.cpp
@@ -85,6 +85,8 @@ void VideoConfig::Refresh()
bWidescreenHack = Config::Get(Config::GFX_WIDESCREEN_HACK);
aspect_mode = Config::Get(Config::GFX_ASPECT_RATIO);
+ custom_aspect_width = Config::Get(Config::GFX_CUSTOM_ASPECT_RATIO_WIDTH);
+ custom_aspect_height = Config::Get(Config::GFX_CUSTOM_ASPECT_RATIO_HEIGHT);
suggested_aspect_mode = Config::Get(Config::GFX_SUGGESTED_ASPECT_RATIO);
widescreen_heuristic_transition_threshold =
Config::Get(Config::GFX_WIDESCREEN_HEURISTIC_TRANSITION_THRESHOLD);
@@ -287,6 +289,7 @@ void CheckForConfigChanges()
const u32 old_game_mod_changes =
g_ActiveConfig.graphics_mod_config ? g_ActiveConfig.graphics_mod_config->GetChangeCount() : 0;
const bool old_graphics_mods_enabled = g_ActiveConfig.bGraphicMods;
+ const AspectMode old_aspect_mode = g_ActiveConfig.aspect_mode;
const AspectMode old_suggested_aspect_mode = g_ActiveConfig.suggested_aspect_mode;
const bool old_widescreen_hack = g_ActiveConfig.bWidescreenHack;
const auto old_post_processing_shader = g_ActiveConfig.sPostProcessingShader;
@@ -336,6 +339,8 @@ void CheckForConfigChanges()
changed_bits |= CONFIG_CHANGE_BIT_BBOX;
if (old_efb_scale != g_ActiveConfig.iEFBScale)
changed_bits |= CONFIG_CHANGE_BIT_TARGET_SIZE;
+ if (old_aspect_mode != g_ActiveConfig.aspect_mode)
+ changed_bits |= CONFIG_CHANGE_BIT_ASPECT_RATIO;
if (old_suggested_aspect_mode != g_ActiveConfig.suggested_aspect_mode)
changed_bits |= CONFIG_CHANGE_BIT_ASPECT_RATIO;
if (old_widescreen_hack != g_ActiveConfig.bWidescreenHack)