diff options
Diffstat (limited to 'src/core/frontend/framebuffer_layout.cpp')
| -rw-r--r-- | src/core/frontend/framebuffer_layout.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/core/frontend/framebuffer_layout.cpp b/src/core/frontend/framebuffer_layout.cpp index 0832463d6..4b58b672a 100644 --- a/src/core/frontend/framebuffer_layout.cpp +++ b/src/core/frontend/framebuffer_layout.cpp | |||
| @@ -44,16 +44,13 @@ FramebufferLayout DefaultFrameLayout(u32 width, u32 height) { | |||
| 44 | return res; | 44 | return res; |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | FramebufferLayout FrameLayoutFromResolutionScale(u32 res_scale) { | 47 | FramebufferLayout FrameLayoutFromResolutionScale(f32 res_scale) { |
| 48 | u32 width, height; | 48 | const bool is_docked = Settings::values.use_docked_mode.GetValue(); |
| 49 | const u32 screen_width = is_docked ? ScreenDocked::Width : ScreenUndocked::Width; | ||
| 50 | const u32 screen_height = is_docked ? ScreenDocked::Height : ScreenUndocked::Height; | ||
| 49 | 51 | ||
| 50 | if (Settings::values.use_docked_mode.GetValue()) { | 52 | const u32 width = static_cast<u32>(static_cast<f32>(screen_width) * res_scale); |
| 51 | width = ScreenDocked::Width * res_scale; | 53 | const u32 height = static_cast<u32>(static_cast<f32>(screen_height) * res_scale); |
| 52 | height = ScreenDocked::Height * res_scale; | ||
| 53 | } else { | ||
| 54 | width = ScreenUndocked::Width * res_scale; | ||
| 55 | height = ScreenUndocked::Height * res_scale; | ||
| 56 | } | ||
| 57 | 54 | ||
| 58 | return DefaultFrameLayout(width, height); | 55 | return DefaultFrameLayout(width, height); |
| 59 | } | 56 | } |