diff options
Diffstat (limited to 'src/yuzu/uisettings.cpp')
-rw-r--r-- | src/yuzu/uisettings.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/yuzu/uisettings.cpp b/src/yuzu/uisettings.cpp index 2c1b547fb..1c833767b 100644 --- a/src/yuzu/uisettings.cpp +++ b/src/yuzu/uisettings.cpp @@ -3,6 +3,18 @@ #include "yuzu/uisettings.h" +#ifndef CANNOT_EXPLICITLY_INSTANTIATE +namespace Settings { +template class Setting<bool>; +template class Setting<std::string>; +template class Setting<u16, true>; +template class Setting<u32>; +template class Setting<u8, true>; +template class Setting<u8>; +template class Setting<unsigned long long>; +} // namespace Settings +#endif + namespace UISettings { const Themes themes{{ @@ -24,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 |