diff options
| author | bunnei <bunneidev@gmail.com> | 2020-02-17 22:02:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-17 22:02:18 -0500 |
| commit | 72d4c6fee0eed8bad5686f1db6043446900020d9 (patch) | |
| tree | 70114ee835cd2e666290a678742d164ffe7fdd3f /src/core/frontend/framebuffer_layout.h | |
| parent | 7f380f4ffaa90c968b9bd1d362bbef5677de0497 (diff) | |
| parent | c3d0a0d6277c97d6e3c99914358dce15cc26871c (diff) | |
Merge pull request #3412 from Morph1984/aspect-ratio
GUI: Add aspect ratio dropdown
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 |
