summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Widescreen.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2023-09-05 13:25:07 -0400
committerGitHub <noreply@github.com>2023-09-05 13:25:07 -0400
commit76a00551d10a61622f67b6574a7c6f515369ee6c (patch)
tree696eb3c3d31d495777d1a224445cfab284b59102 /Source/Core/VideoCommon/Widescreen.cpp
parent9419d92446f4bb47c2192dc0bd3da7c23c611a4f (diff)
parent4938b99600da9fc6e1241e6aad476286b74850a9 (diff)
Merge pull request #11419 from OatmealDome/widescreen
VideoCommon: Allow widescreen heuristic's constants to be overridden by onion config
Diffstat (limited to 'Source/Core/VideoCommon/Widescreen.cpp')
-rw-r--r--Source/Core/VideoCommon/Widescreen.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/Widescreen.cpp b/Source/Core/VideoCommon/Widescreen.cpp
index dd1393d309..4ca1ac3ccd 100644
--- a/Source/Core/VideoCommon/Widescreen.cpp
+++ b/Source/Core/VideoCommon/Widescreen.cpp
@@ -70,13 +70,13 @@ void WidescreenManager::UpdateWidescreenHeuristic()
// Modify the threshold based on which aspect ratio we're already using:
// If the game's in 4:3, it probably won't switch to anamorphic, and vice-versa.
- static constexpr u32 TRANSITION_THRESHOLD = 3;
+ const u32 transition_threshold = g_ActiveConfig.widescreen_heuristic_transition_threshold;
- const auto looks_normal = [](auto& counts) {
- return counts.normal_vertex_count > counts.anamorphic_vertex_count * TRANSITION_THRESHOLD;
+ const auto looks_normal = [transition_threshold](auto& counts) {
+ return counts.normal_vertex_count > counts.anamorphic_vertex_count * transition_threshold;
};
- const auto looks_anamorphic = [](auto& counts) {
- return counts.anamorphic_vertex_count > counts.normal_vertex_count * TRANSITION_THRESHOLD;
+ const auto looks_anamorphic = [transition_threshold](auto& counts) {
+ return counts.anamorphic_vertex_count > counts.normal_vertex_count * transition_threshold;
};
const auto& persp = flush_statistics.perspective;