1
0
Fork 0
forked from suyu/suyu

common/settings: Remove unused scaling options

This commit is contained in:
ReinUsesLisp 2021-07-25 21:20:12 -03:00 committed by Fernando Sahmkow
parent e580299467
commit 43aa695a04
2 changed files with 7 additions and 18 deletions

View file

@ -109,51 +109,42 @@ void UpdateRescalingInfo() {
auto setup = values.resolution_setup.GetValue(); auto setup = values.resolution_setup.GetValue();
auto& info = values.resolution_info; auto& info = values.resolution_info;
switch (setup) { switch (setup) {
case ResolutionSetup::Res1_2X: { case ResolutionSetup::Res1_2X:
info.up_scale = 1; info.up_scale = 1;
info.down_shift = 1; info.down_shift = 1;
break; break;
} case ResolutionSetup::Res3_4X:
case ResolutionSetup::Res3_4X: {
info.up_scale = 3; info.up_scale = 3;
info.down_shift = 2; info.down_shift = 2;
break; break;
} case ResolutionSetup::Res1X:
case ResolutionSetup::Res1X: {
info.up_scale = 1; info.up_scale = 1;
info.down_shift = 0; info.down_shift = 0;
break; break;
}
case ResolutionSetup::Res3_2X: { case ResolutionSetup::Res3_2X: {
info.up_scale = 3; info.up_scale = 3;
info.down_shift = 1; info.down_shift = 1;
break; break;
} }
case ResolutionSetup::Res2X: { case ResolutionSetup::Res2X:
info.up_scale = 2; info.up_scale = 2;
info.down_shift = 0; info.down_shift = 0;
break; break;
} case ResolutionSetup::Res3X:
case ResolutionSetup::Res3X: {
info.up_scale = 3; info.up_scale = 3;
info.down_shift = 0; info.down_shift = 0;
break; break;
} case ResolutionSetup::Res4X:
case ResolutionSetup::Res4X: {
info.up_scale = 4; info.up_scale = 4;
info.down_shift = 0; info.down_shift = 0;
break; break;
} default:
default: {
UNREACHABLE(); UNREACHABLE();
info.up_scale = 1; info.up_scale = 1;
info.down_shift = 0; info.down_shift = 0;
} }
}
info.up_factor = static_cast<f32>(info.up_scale) / (1U << info.down_shift); 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.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; info.active = info.up_scale != 1 || info.down_shift != 0;
} }

View file

@ -67,8 +67,6 @@ struct ResolutionScalingInfo {
u32 down_shift{0}; u32 down_shift{0};
f32 up_factor{1.0f}; f32 up_factor{1.0f};
f32 down_factor{1.0f}; f32 down_factor{1.0f};
u32 size_up{1};
u32 size_shift{0};
bool active{}; bool active{};
}; };