diff options
| author | Lioncash <mathew1800@gmail.com> | 2017-11-10 22:45:32 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2017-11-18 23:17:56 -0500 |
| commit | 10697bcbe3c84599f11f49dfc38358a2e9b7140f (patch) | |
| tree | 58127ae3106da02b7e9356a7a8b6cc3d27d63bcc /Source/Core/VideoBackends | |
| parent | 609a17a0cd41a12c0fbf9a7c47c8889232594778 (diff) | |
VideoConfig: Make AspectMode an enum class
Makes for more strongly-typed identifiers (and doesn't pollute
surrounding namespaces)
Diffstat (limited to 'Source/Core/VideoBackends')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/Renderer.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.cpp b/Source/Core/VideoBackends/Vulkan/Renderer.cpp index d72f2929c3..18a0b415ed 100644 --- a/Source/Core/VideoBackends/Vulkan/Renderer.cpp +++ b/Source/Core/VideoBackends/Vulkan/Renderer.cpp @@ -717,10 +717,10 @@ void Renderer::CheckForSurfaceChange() void Renderer::CheckForConfigChanges() { // Save the video config so we can compare against to determine which settings have changed. - int old_anisotropy = g_ActiveConfig.iMaxAnisotropy; - int old_aspect_ratio = g_ActiveConfig.iAspectRatio; - int old_efb_scale = g_ActiveConfig.iEFBScale; - bool old_force_filtering = g_ActiveConfig.bForceFiltering; + const int old_anisotropy = g_ActiveConfig.iMaxAnisotropy; + const AspectMode old_aspect_mode = g_ActiveConfig.aspect_mode; + const int old_efb_scale = g_ActiveConfig.iEFBScale; + const bool old_force_filtering = g_ActiveConfig.bForceFiltering; // Copy g_Config to g_ActiveConfig. // NOTE: This can potentially race with the UI thread, however if it does, the changes will be @@ -728,10 +728,11 @@ void Renderer::CheckForConfigChanges() UpdateActiveConfig(); // Determine which (if any) settings have changed. - bool anisotropy_changed = old_anisotropy != g_ActiveConfig.iMaxAnisotropy; - bool force_texture_filtering_changed = old_force_filtering != g_ActiveConfig.bForceFiltering; - bool efb_scale_changed = old_efb_scale != g_ActiveConfig.iEFBScale; - bool aspect_changed = old_aspect_ratio != g_ActiveConfig.iAspectRatio; + const bool anisotropy_changed = old_anisotropy != g_ActiveConfig.iMaxAnisotropy; + const bool force_texture_filtering_changed = + old_force_filtering != g_ActiveConfig.bForceFiltering; + const bool efb_scale_changed = old_efb_scale != g_ActiveConfig.iEFBScale; + const bool aspect_changed = old_aspect_mode != g_ActiveConfig.aspect_mode; // Update texture cache settings with any changed options. TextureCache::GetInstance()->OnConfigChanged(g_ActiveConfig); |
