diff options
| author | 2021-11-16 18:52:11 -0800 | |
|---|---|---|
| committer | 2021-11-16 18:52:11 -0800 | |
| commit | 71313509f75aeafe425e531824d1faa9e7c0a40b (patch) | |
| tree | cb1df371d288677fcede6a3409eb079e0d278163 /src/core/frontend/framebuffer_layout.cpp | |
| parent | Merge pull request #7347 from lioncash/catch (diff) | |
| parent | TextureCache: Fix Automatic Anisotropic. (diff) | |
| download | yuzu-71313509f75aeafe425e531824d1faa9e7c0a40b.tar.gz yuzu-71313509f75aeafe425e531824d1faa9e7c0a40b.tar.xz yuzu-71313509f75aeafe425e531824d1faa9e7c0a40b.zip | |
Merge pull request #7219 from FernandoS27/aristotles-right-testicle
Project A.R.T. Advanced Rendering Techniques
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 | } |