diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-08-22 11:30:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-22 11:30:25 -0400 |
commit | ef61d129d3ce357eeb12bc3ed14a1f5e376f1f95 (patch) | |
tree | 318a5af7edcf8c38de2d1d8a857fa25ce82cb827 /src/yuzu/uisettings.cpp | |
parent | b8bab551a4852395de473412bfc9d3f02f4cc01c (diff) | |
parent | 6af8cca2c1596f935cc9f71bf8b4b1497b9db5f7 (diff) |
Merge pull request #11303 from lat9nq/screenshots-configurable
yuzu-qt: Add configuration for screenshot resolution
Diffstat (limited to 'src/yuzu/uisettings.cpp')
-rw-r--r-- | src/yuzu/uisettings.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/yuzu/uisettings.cpp b/src/yuzu/uisettings.cpp index f03dc01dd..1c833767b 100644 --- a/src/yuzu/uisettings.cpp +++ b/src/yuzu/uisettings.cpp @@ -36,4 +36,20 @@ bool IsDarkTheme() { Values values = {}; +u32 CalculateWidth(u32 height, Settings::AspectRatio ratio) { + switch (ratio) { + case Settings::AspectRatio::R4_3: + return height * 4 / 3; + case Settings::AspectRatio::R21_9: + return height * 21 / 9; + case Settings::AspectRatio::R16_10: + return height * 16 / 10; + case Settings::AspectRatio::R16_9: + case Settings::AspectRatio::Stretch: + // TODO: Move this function wherever appropriate to implement Stretched aspect + break; + } + return height * 16 / 9; +} + } // namespace UISettings |