diff options
author | bunnei <bunneidev@gmail.com> | 2020-02-18 04:02:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-18 04:02:18 +0100 |
commit | 72d4c6fee0eed8bad5686f1db6043446900020d9 (patch) | |
tree | 70114ee835cd2e666290a678742d164ffe7fdd3f /src/core/frontend/framebuffer_layout.h | |
parent | Merge pull request #3429 from brianclinkenbeard/fix-cmake-sdl2-arch (diff) | |
parent | Add 4:3 aspect ratio and address feedback (diff) | |
download | yuzu-72d4c6fee0eed8bad5686f1db6043446900020d9.tar yuzu-72d4c6fee0eed8bad5686f1db6043446900020d9.tar.gz yuzu-72d4c6fee0eed8bad5686f1db6043446900020d9.tar.bz2 yuzu-72d4c6fee0eed8bad5686f1db6043446900020d9.tar.lz yuzu-72d4c6fee0eed8bad5686f1db6043446900020d9.tar.xz yuzu-72d4c6fee0eed8bad5686f1db6043446900020d9.tar.zst yuzu-72d4c6fee0eed8bad5686f1db6043446900020d9.zip |
Diffstat (limited to 'src/core/frontend/framebuffer_layout.h')
-rw-r--r-- | src/core/frontend/framebuffer_layout.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/frontend/framebuffer_layout.h b/src/core/frontend/framebuffer_layout.h index d2370adde..1d39c1faf 100644 --- a/src/core/frontend/framebuffer_layout.h +++ b/src/core/frontend/framebuffer_layout.h @@ -18,6 +18,13 @@ enum ScreenDocked : u32 { HeightDocked = 1080, }; +enum class AspectRatio { + Default, + R4_3, + R21_9, + StretchToWindow, +}; + /// Describes the layout of the window framebuffer struct FramebufferLayout { u32 width{ScreenUndocked::Width}; @@ -48,4 +55,12 @@ FramebufferLayout DefaultFrameLayout(u32 width, u32 height); */ FramebufferLayout FrameLayoutFromResolutionScale(u32 res_scale); +/** + * Convenience method to determine emulation aspect ratio + * @param aspect Represents the index of aspect ratio stored in Settings::values.aspect_ratio + * @param window_aspect_ratio Current window aspect ratio + * @return Emulation render window aspect ratio + */ +float EmulationAspectRatio(AspectRatio aspect, float window_aspect_ratio); + } // namespace Layout |