diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-07-26 02:20:12 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:28 +0100 |
commit | 43aa695a0415821e42fabf78a8a624edaadebab7 (patch) | |
tree | 6384de6334df5121ea194df5a7b8cd99627ab3b3 /src/common | |
parent | shader: Fix rescaling pass (diff) | |
download | yuzu-43aa695a0415821e42fabf78a8a624edaadebab7.tar yuzu-43aa695a0415821e42fabf78a8a624edaadebab7.tar.gz yuzu-43aa695a0415821e42fabf78a8a624edaadebab7.tar.bz2 yuzu-43aa695a0415821e42fabf78a8a624edaadebab7.tar.lz yuzu-43aa695a0415821e42fabf78a8a624edaadebab7.tar.xz yuzu-43aa695a0415821e42fabf78a8a624edaadebab7.tar.zst yuzu-43aa695a0415821e42fabf78a8a624edaadebab7.zip |
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/settings.cpp | 23 | ||||
-rw-r--r-- | src/common/settings.h | 2 |
2 files changed, 7 insertions, 18 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 6f3acee79..4b7fa4b82 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -109,51 +109,42 @@ void UpdateRescalingInfo() { auto setup = values.resolution_setup.GetValue(); auto& info = values.resolution_info; switch (setup) { - case ResolutionSetup::Res1_2X: { + case ResolutionSetup::Res1_2X: info.up_scale = 1; info.down_shift = 1; break; - } - case ResolutionSetup::Res3_4X: { + case ResolutionSetup::Res3_4X: info.up_scale = 3; info.down_shift = 2; break; - } - case ResolutionSetup::Res1X: { + case ResolutionSetup::Res1X: info.up_scale = 1; info.down_shift = 0; break; - } case ResolutionSetup::Res3_2X: { info.up_scale = 3; info.down_shift = 1; break; } - case ResolutionSetup::Res2X: { + case ResolutionSetup::Res2X: info.up_scale = 2; info.down_shift = 0; break; - } - case ResolutionSetup::Res3X: { + case ResolutionSetup::Res3X: info.up_scale = 3; info.down_shift = 0; break; - } - case ResolutionSetup::Res4X: { + case ResolutionSetup::Res4X: info.up_scale = 4; info.down_shift = 0; break; - } - default: { + default: UNREACHABLE(); info.up_scale = 1; info.down_shift = 0; } - } info.up_factor = static_cast<f32>(info.up_scale) / (1U << info.down_shift); info.down_factor = static_cast<f32>(1U << info.down_shift) / info.up_scale; - info.size_up = info.up_scale * info.up_scale; - info.size_shift = info.down_shift * 2; info.active = info.up_scale != 1 || info.down_shift != 0; } diff --git a/src/common/settings.h b/src/common/settings.h index 2b11984b4..ca88c086b 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -67,8 +67,6 @@ struct ResolutionScalingInfo { u32 down_shift{0}; f32 up_factor{1.0f}; f32 down_factor{1.0f}; - u32 size_up{1}; - u32 size_shift{0}; bool active{}; }; |