Procházet zdrojové kódy

Added 32:9 aspect ratio

niansa před 2 roky
rodič
revize
cb9654651a

+ 1 - 1
src/common/settings_enums.h

@@ -149,7 +149,7 @@ ENUM(ScalingFilter, NearestNeighbor, Bilinear, Bicubic, Gaussian, ScaleForce, Fs
 
 ENUM(AntiAliasing, None, Fxaa, Smaa, MaxEnum);
 
-ENUM(AspectRatio, R16_9, R4_3, R21_9, R16_10, Stretch);
+ENUM(AspectRatio, R16_9, R4_3, R21_9, R16_10, R32_9, Stretch);
 
 ENUM(ConsoleMode, Handheld, Docked);
 

+ 2 - 0
src/core/frontend/framebuffer_layout.cpp

@@ -70,6 +70,8 @@ float EmulationAspectRatio(AspectRatio aspect, float window_aspect_ratio) {
         return 9.0f / 21.0f;
     case AspectRatio::R16_10:
         return 10.0f / 16.0f;
+    case AspectRatio::R32_9:
+        return 9.0f / 32.0f;
     case AspectRatio::StretchToWindow:
         return window_aspect_ratio;
     default:

+ 1 - 0
src/core/frontend/framebuffer_layout.h

@@ -28,6 +28,7 @@ enum class AspectRatio {
     R4_3,
     R21_9,
     R16_10,
+    R32_9,
     StretchToWindow,
 };
 

+ 1 - 0
src/suyu/configuration/shared_translation.cpp

@@ -406,6 +406,7 @@ std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QWidget* parent) {
                               PAIR(AspectRatio, R4_3, tr("Force 4:3")),
                               PAIR(AspectRatio, R21_9, tr("Force 21:9")),
                               PAIR(AspectRatio, R16_10, tr("Force 16:10")),
+                              PAIR(AspectRatio, R32_9, tr("Force 32:9")),
                               PAIR(AspectRatio, Stretch, tr("Stretch to Window")),
                           }});
     translations->insert({Settings::EnumMetadata<Settings::AnisotropyMode>::Index(),

+ 2 - 0
src/suyu/uisettings.cpp

@@ -47,6 +47,8 @@ u32 CalculateWidth(u32 height, Settings::AspectRatio ratio) {
         return height * 21 / 9;
     case Settings::AspectRatio::R16_10:
         return height * 16 / 10;
+    case Settings::AspectRatio::R32_9:
+        return height * 32 / 9;
     case Settings::AspectRatio::R16_9:
     case Settings::AspectRatio::Stretch:
         // TODO: Move this function wherever appropriate to implement Stretched aspect