From 11222516c4b5042cd8da6fdd72f53ee736139b66 Mon Sep 17 00:00:00 2001 From: Ac_K Date: Wed, 16 Dec 2020 03:19:07 +0100 Subject: [PATCH] gui/gpu: Implement setting and toggle for Aspect Ratio (#1777) * gui/gpu: Implement setting and toggle for Aspect Ratio * address gdkchan feedback and add 16:10 * fix config.json file * Fix rebase * Address gdkchan feedback * Address rip feedback * Fix aspectWidth --- .../Configuration/AspectRatioExtensions.cs | 59 +++++++++++++++++++ .../Configuration/ConfigurationFileFormat.cs | 7 ++- .../Configuration/ConfigurationState.cs | 20 ++++++- Ryujinx.Graphics.GAL/ImageCrop.cs | 46 +++++++++------ Ryujinx.Graphics.OpenGL/Window.cs | 12 +--- .../Services/SurfaceFlinger/SurfaceFlinger.cs | 12 +++- Ryujinx/Config.json | 3 +- Ryujinx/Ui/GLRenderer.cs | 16 ++--- Ryujinx/Ui/MainWindow.cs | 26 +++++--- Ryujinx/Ui/MainWindow.glade | 45 ++++++++++++-- Ryujinx/Ui/SettingsWindow.cs | 7 ++- Ryujinx/Ui/SettingsWindow.glade | 49 +++++++++++++++ Ryujinx/Ui/StatusUpdatedEventArgs.cs | 4 +- Ryujinx/_schema.json | 15 +++++ 14 files changed, 264 insertions(+), 57 deletions(-) create mode 100644 Ryujinx.Common/Configuration/AspectRatioExtensions.cs diff --git a/Ryujinx.Common/Configuration/AspectRatioExtensions.cs b/Ryujinx.Common/Configuration/AspectRatioExtensions.cs new file mode 100644 index 000000000..3d0be88e9 --- /dev/null +++ b/Ryujinx.Common/Configuration/AspectRatioExtensions.cs @@ -0,0 +1,59 @@ +namespace Ryujinx.Common.Configuration +{ + public enum AspectRatio + { + Fixed4x3, + Fixed16x9, + Fixed16x10, + Fixed21x9, + Fixed32x9, + Stretched + } + + public static class AspectRatioExtensions + { + public static float ToFloat(this AspectRatio aspectRatio) + { + return aspectRatio.ToFloatX() / aspectRatio.ToFloatY(); + } + + public static float ToFloatX(this AspectRatio aspectRatio) + { + return aspectRatio switch + { + AspectRatio.Fixed4x3 => 4.0f, + AspectRatio.Fixed16x9 => 16.0f, + AspectRatio.Fixed16x10 => 16.0f, + AspectRatio.Fixed21x9 => 21.0f, + AspectRatio.Fixed32x9 => 32.0f, + _ => 16.0f + }; + } + + public static float ToFloatY(this AspectRatio aspectRatio) + { + return aspectRatio switch + { + AspectRatio.Fixed4x3 => 3.0f, + AspectRatio.Fixed16x9 => 9.0f, + AspectRatio.Fixed16x10 => 10.0f, + AspectRatio.Fixed21x9 => 9.0f, + AspectRatio.Fixed32x9 => 9.0f, + _ => 9.0f + }; + } + + public static string ToText(this AspectRatio aspectRatio) + { + return aspectRatio switch + { + AspectRatio.Fixed4x3 => "4:3", + AspectRatio.Fixed16x9 => "16:9", + AspectRatio.Fixed16x10 => "16:10", + AspectRatio.Fixed21x9 => "21:9", + AspectRatio.Fixed32x9 => "32:9", + _ => "Stretched" + }; + } + } +} \ No newline at end of file diff --git a/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs b/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs index 5618b2287..cb7c3b7e0 100644 --- a/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs +++ b/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs @@ -14,7 +14,7 @@ namespace Ryujinx.Configuration /// /// The current version of the file format /// - public const int CurrentVersion = 17; + public const int CurrentVersion = 18; public int Version { get; set; } @@ -33,6 +33,11 @@ namespace Ryujinx.Configuration /// public float MaxAnisotropy { get; set; } + /// + /// Aspect Ratio applied to the renderer window. + /// + public AspectRatio AspectRatio { get; set; } + /// /// Dumps shaders in this local directory /// diff --git a/Ryujinx.Common/Configuration/ConfigurationState.cs b/Ryujinx.Common/Configuration/ConfigurationState.cs index 94c9ac0e2..e822dcf6d 100644 --- a/Ryujinx.Common/Configuration/ConfigurationState.cs +++ b/Ryujinx.Common/Configuration/ConfigurationState.cs @@ -278,6 +278,11 @@ namespace Ryujinx.Configuration /// public ReactiveObject MaxAnisotropy { get; private set; } + /// + /// Aspect Ratio applied to the renderer window. + /// + public ReactiveObject AspectRatio { get; private set; } + /// /// Resolution Scale. An integer scale applied to applicable render targets. Values 1-4, or -1 to use a custom floating point scale instead. /// @@ -308,6 +313,7 @@ namespace Ryujinx.Configuration ResScale = new ReactiveObject(); ResScaleCustom = new ReactiveObject(); MaxAnisotropy = new ReactiveObject(); + AspectRatio = new ReactiveObject(); ShadersDumpPath = new ReactiveObject(); EnableVsync = new ReactiveObject(); EnableShaderCache = new ReactiveObject(); @@ -388,6 +394,7 @@ namespace Ryujinx.Configuration ResScale = Graphics.ResScale, ResScaleCustom = Graphics.ResScaleCustom, MaxAnisotropy = Graphics.MaxAnisotropy, + AspectRatio = Graphics.AspectRatio, GraphicsShadersDumpPath = Graphics.ShadersDumpPath, LoggingEnableDebug = Logger.EnableDebug, LoggingEnableStub = Logger.EnableStub, @@ -449,6 +456,7 @@ namespace Ryujinx.Configuration Graphics.ResScale.Value = 1; Graphics.ResScaleCustom.Value = 1.0f; Graphics.MaxAnisotropy.Value = -1.0f; + Graphics.AspectRatio.Value = AspectRatio.Fixed16x9; Graphics.ShadersDumpPath.Value = ""; Logger.EnableDebug.Value = false; Logger.EnableStub.Value = true; @@ -457,7 +465,7 @@ namespace Ryujinx.Configuration Logger.EnableError.Value = true; Logger.EnableGuest.Value = true; Logger.EnableFsAccessLog.Value = false; - Logger.FilteredClasses.Value = new LogClass[] { }; + Logger.FilteredClasses.Value = Array.Empty(); Logger.GraphicsDebugLevel.Value = GraphicsDebugLevel.None; Logger.EnableFileLog.Value = true; System.Language.Value = Language.AmericanEnglish; @@ -753,6 +761,15 @@ namespace Ryujinx.Configuration configurationFileUpdated = true; } + if (configurationFileFormat.Version < 18) + { + Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 18."); + + configurationFileFormat.AspectRatio = AspectRatio.Fixed16x9; + + configurationFileUpdated = true; + } + List inputConfig = new List(); inputConfig.AddRange(configurationFileFormat.ControllerConfig); inputConfig.AddRange(configurationFileFormat.KeyboardConfig); @@ -760,6 +777,7 @@ namespace Ryujinx.Configuration Graphics.ResScale.Value = configurationFileFormat.ResScale; Graphics.ResScaleCustom.Value = configurationFileFormat.ResScaleCustom; Graphics.MaxAnisotropy.Value = configurationFileFormat.MaxAnisotropy; + Graphics.AspectRatio.Value = configurationFileFormat.AspectRatio; Graphics.ShadersDumpPath.Value = configurationFileFormat.GraphicsShadersDumpPath; Logger.EnableDebug.Value = configurationFileFormat.LoggingEnableDebug; Logger.EnableStub.Value = configurationFileFormat.LoggingEnableStub; diff --git a/Ryujinx.Graphics.GAL/ImageCrop.cs b/Ryujinx.Graphics.GAL/ImageCrop.cs index 4428eee97..ae81cfef2 100644 --- a/Ryujinx.Graphics.GAL/ImageCrop.cs +++ b/Ryujinx.Graphics.GAL/ImageCrop.cs @@ -2,27 +2,37 @@ namespace Ryujinx.Graphics.GAL { public struct ImageCrop { - public int Left { get; } - public int Right { get; } - public int Top { get; } - public int Bottom { get; } - public bool FlipX { get; } - public bool FlipY { get; } + public int Left { get; } + public int Right { get; } + public int Top { get; } + public int Bottom { get; } + public bool FlipX { get; } + public bool FlipY { get; } + public bool IsStretched { get; } + public float AspectRatioX { get; } + public float AspectRatioY { get; } public ImageCrop( - int left, - int right, - int top, - int bottom, - bool flipX, - bool flipY) + int left, + int right, + int top, + int bottom, + bool flipX, + bool flipY, + bool isStretched, + float aspectRatioX, + float aspectRatioY + ) { - Left = left; - Right = right; - Top = top; - Bottom = bottom; - FlipX = flipX; - FlipY = flipY; + Left = left; + Right = right; + Top = top; + Bottom = bottom; + FlipX = flipX; + FlipY = flipY; + IsStretched = isStretched; + AspectRatioX = aspectRatioX; + AspectRatioY = aspectRatioY; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics.OpenGL/Window.cs b/Ryujinx.Graphics.OpenGL/Window.cs index 4abc408e5..80149bf7b 100644 --- a/Ryujinx.Graphics.OpenGL/Window.cs +++ b/Ryujinx.Graphics.OpenGL/Window.cs @@ -1,7 +1,5 @@ -using OpenTK; using OpenTK.Graphics; using OpenTK.Graphics.OpenGL; -using OpenTK.Platform; using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.OpenGL.Image; using System; @@ -10,9 +8,6 @@ namespace Ryujinx.Graphics.OpenGL { class Window : IWindow, IDisposable { - private const int NativeWidth = 1280; - private const int NativeHeight = 720; - private readonly Renderer _renderer; private int _width; @@ -25,9 +20,6 @@ namespace Ryujinx.Graphics.OpenGL public Window(Renderer renderer) { _renderer = renderer; - - _width = NativeWidth; - _height = NativeHeight; } public void Present(ITexture texture, ImageCrop crop) @@ -104,8 +96,8 @@ namespace Ryujinx.Graphics.OpenGL srcY1 = (int)Math.Ceiling(srcY1 * scale); } - float ratioX = MathF.Min(1f, (_height * (float)NativeWidth) / ((float)NativeHeight * _width)); - float ratioY = MathF.Min(1f, (_width * (float)NativeHeight) / ((float)NativeWidth * _height)); + float ratioX = crop.IsStretched ? 1.0f : MathF.Min(1.0f, _height * crop.AspectRatioX / (_width * crop.AspectRatioY)); + float ratioY = crop.IsStretched ? 1.0f : MathF.Min(1.0f, _width * crop.AspectRatioY / (_height * crop.AspectRatioX)); int dstWidth = (int)(_width * ratioX); int dstHeight = (int)(_height * ratioY); diff --git a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs index 4927b40ec..bdffb4997 100644 --- a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs +++ b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs @@ -1,4 +1,6 @@ -using Ryujinx.Common.Logging; +using Ryujinx.Common.Configuration; +using Ryujinx.Common.Logging; +using Ryujinx.Configuration; using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.Gpu; using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap; @@ -277,13 +279,19 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger bool flipX = item.Transform.HasFlag(NativeWindowTransform.FlipX); bool flipY = item.Transform.HasFlag(NativeWindowTransform.FlipY); + AspectRatio aspectRatio = ConfigurationState.Instance.Graphics.AspectRatio.Value; + bool isStretched = aspectRatio == AspectRatio.Stretched; + ImageCrop crop = new ImageCrop( cropRect.Left, cropRect.Right, cropRect.Top, cropRect.Bottom, flipX, - flipY); + flipY, + isStretched, + aspectRatio.ToFloatX(), + aspectRatio.ToFloatY()); TextureCallbackInformation textureCallbackInformation = new TextureCallbackInformation { diff --git a/Ryujinx/Config.json b/Ryujinx/Config.json index 8990bd983..9bd858931 100644 --- a/Ryujinx/Config.json +++ b/Ryujinx/Config.json @@ -1,8 +1,9 @@ { - "version": 17, + "version": 18, "res_scale": 1, "res_scale_custom": 1, "max_anisotropy": -1, + "aspect_ratio": "Fixed16x9", "graphics_shaders_dump_path": "", "logging_enable_debug": false, "logging_enable_stub": true, diff --git a/Ryujinx/Ui/GLRenderer.cs b/Ryujinx/Ui/GLRenderer.cs index 755121c67..3a4dc3267 100644 --- a/Ryujinx/Ui/GLRenderer.cs +++ b/Ryujinx/Ui/GLRenderer.cs @@ -5,16 +5,16 @@ using OpenTK; using OpenTK.Graphics; using OpenTK.Graphics.OpenGL; using OpenTK.Input; -using Ryujinx.Configuration; using Ryujinx.Common.Configuration; using Ryujinx.Common.Configuration.Hid; +using Ryujinx.Configuration; using Ryujinx.Graphics.OpenGL; using Ryujinx.HLE; using Ryujinx.HLE.HOS.Services.Hid; +using Ryujinx.Motion; using System; using System.Collections.Generic; using System.Threading; -using Ryujinx.Motion; namespace Ryujinx.Ui { @@ -219,7 +219,6 @@ namespace Ryujinx.Ui { parent.Present(); - string titleNameSection = string.IsNullOrWhiteSpace(_device.Application.TitleName) ? string.Empty : $" - {_device.Application.TitleName}"; @@ -419,6 +418,7 @@ namespace Ryujinx.Ui StatusUpdatedEvent?.Invoke(this, new StatusUpdatedEventArgs( _device.EnableDeviceVsync, dockedMode, + ConfigurationState.Instance.Graphics.AspectRatio.Value.ToText(), $"Game: {_device.Statistics.GetGameFrameRate():00.00} FPS", $"FIFO: {_device.Statistics.GetFifoPercent():0.00} %", $"GPU: {_renderer.GpuVendor}")); @@ -632,16 +632,18 @@ namespace Ryujinx.Ui // OpenTK always captures mouse events, even if out of focus, so check if window is focused. if (_isFocused && _mousePressed) { + float aspectWidth = SwitchPanelHeight * ConfigurationState.Instance.Graphics.AspectRatio.Value.ToFloat(); + int screenWidth = AllocatedWidth; int screenHeight = AllocatedHeight; - if (AllocatedWidth > (AllocatedHeight * SwitchPanelWidth) / SwitchPanelHeight) + if (AllocatedWidth > AllocatedHeight * aspectWidth / SwitchPanelHeight) { - screenWidth = (AllocatedHeight * SwitchPanelWidth) / SwitchPanelHeight; + screenWidth = (int)(AllocatedHeight * aspectWidth) / SwitchPanelHeight; } else { - screenHeight = (AllocatedWidth * SwitchPanelHeight) / SwitchPanelWidth; + screenHeight = (AllocatedWidth * SwitchPanelHeight) / (int)aspectWidth; } int startX = (AllocatedWidth - screenWidth) >> 1; @@ -659,7 +661,7 @@ namespace Ryujinx.Ui int screenMouseX = (int)_mouseX - startX; int screenMouseY = (int)_mouseY - startY; - int mX = (screenMouseX * SwitchPanelWidth) / screenWidth; + int mX = (screenMouseX * (int)aspectWidth) / screenWidth; int mY = (screenMouseY * SwitchPanelHeight) / screenHeight; TouchPoint currentPoint = new TouchPoint diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs index 245d4b09c..f16158e26 100644 --- a/Ryujinx/Ui/MainWindow.cs +++ b/Ryujinx/Ui/MainWindow.cs @@ -72,6 +72,7 @@ namespace Ryujinx.Ui [GUI] CheckMenuItem _pathToggle; [GUI] CheckMenuItem _fileSizeToggle; [GUI] Label _dockedMode; + [GUI] Label _aspectRatio; [GUI] Label _gameStatus; [GUI] TreeView _gameTable; [GUI] TreeSelection _gameTableSelection; @@ -666,11 +667,12 @@ namespace Ryujinx.Ui public static void UpdateGraphicsConfig() { - int resScale = ConfigurationState.Instance.Graphics.ResScale; + int resScale = ConfigurationState.Instance.Graphics.ResScale; float resScaleCustom = ConfigurationState.Instance.Graphics.ResScaleCustom; - Graphics.Gpu.GraphicsConfig.ResScale = (resScale == -1) ? resScaleCustom : resScale; - Graphics.Gpu.GraphicsConfig.MaxAnisotropy = ConfigurationState.Instance.Graphics.MaxAnisotropy; - Graphics.Gpu.GraphicsConfig.ShadersDumpPath = ConfigurationState.Instance.Graphics.ShadersDumpPath; + + Graphics.Gpu.GraphicsConfig.ResScale = (resScale == -1) ? resScaleCustom : resScale; + Graphics.Gpu.GraphicsConfig.MaxAnisotropy = ConfigurationState.Instance.Graphics.MaxAnisotropy; + Graphics.Gpu.GraphicsConfig.ShadersDumpPath = ConfigurationState.Instance.Graphics.ShadersDumpPath; Graphics.Gpu.GraphicsConfig.EnableShaderCache = ConfigurationState.Instance.Graphics.EnableShaderCache; } @@ -806,10 +808,11 @@ namespace Ryujinx.Ui { Application.Invoke(delegate { - _gameStatus.Text = args.GameStatus; - _fifoStatus.Text = args.FifoStatus; - _gpuName.Text = args.GpuName; - _dockedMode.Text = args.DockedMode; + _gameStatus.Text = args.GameStatus; + _fifoStatus.Text = args.FifoStatus; + _gpuName.Text = args.GpuName; + _dockedMode.Text = args.DockedMode; + _aspectRatio.Text = args.AspectRatio; if (args.VSyncEnabled) { @@ -868,6 +871,13 @@ namespace Ryujinx.Ui ConfigurationState.Instance.System.EnableDockedMode.Value = !ConfigurationState.Instance.System.EnableDockedMode.Value; } + private void AspectRatio_Clicked(object sender, ButtonReleaseEventArgs args) + { + AspectRatio aspectRatio = ConfigurationState.Instance.Graphics.AspectRatio.Value; + + ConfigurationState.Instance.Graphics.AspectRatio.Value = ((int)aspectRatio + 1) > Enum.GetNames(typeof(AspectRatio)).Length - 1 ? AspectRatio.Fixed4x3 : aspectRatio + 1; + } + private void Row_Clicked(object sender, ButtonReleaseEventArgs args) { if (args.Event.Button != 3) return; diff --git a/Ryujinx/Ui/MainWindow.glade b/Ryujinx/Ui/MainWindow.glade index 24c6d1e59..c9218a55e 100644 --- a/Ryujinx/Ui/MainWindow.glade +++ b/Ryujinx/Ui/MainWindow.glade @@ -562,12 +562,20 @@ - + True False - start - 5 - 5 + 0 + + + + True + False + start + 5 + 5 + + False @@ -587,7 +595,7 @@ - + True False start @@ -611,6 +619,31 @@ 7 + + + True + False + start + 5 + 5 + + + False + True + 8 + + + + + True + False + + + False + True + 9 + + True @@ -621,7 +654,7 @@ True True - 8 + 10 diff --git a/Ryujinx/Ui/SettingsWindow.cs b/Ryujinx/Ui/SettingsWindow.cs index 07878ee41..d17bce608 100644 --- a/Ryujinx/Ui/SettingsWindow.cs +++ b/Ryujinx/Ui/SettingsWindow.cs @@ -71,6 +71,7 @@ namespace Ryujinx.Ui [GUI] Entry _addGameDirBox; [GUI] Entry _graphicsShadersDumpPath; [GUI] ComboBoxText _anisotropy; + [GUI] ComboBoxText _aspectRatio; [GUI] ComboBoxText _resScaleCombo; [GUI] Entry _resScaleText; [GUI] ToggleButton _configureController1; @@ -249,6 +250,7 @@ namespace Ryujinx.Ui _systemRegionSelect.SetActiveId(ConfigurationState.Instance.System.Region.Value.ToString()); _resScaleCombo.SetActiveId(ConfigurationState.Instance.Graphics.ResScale.Value.ToString()); _anisotropy.SetActiveId(ConfigurationState.Instance.Graphics.MaxAnisotropy.Value.ToString()); + _aspectRatio.SetActiveId(((int)ConfigurationState.Instance.Graphics.AspectRatio.Value).ToString()); _custThemePath.Buffer.Text = ConfigurationState.Instance.Ui.CustomThemePath; _resScaleText.Buffer.Text = ConfigurationState.Instance.Graphics.ResScaleCustom.Value.ToString(); @@ -408,6 +410,7 @@ namespace Ryujinx.Ui ConfigurationState.Instance.Ui.GameDirs.Value = gameDirs; ConfigurationState.Instance.System.FsGlobalAccessLogMode.Value = (int)_fsLogSpinAdjustment.Value; ConfigurationState.Instance.Graphics.MaxAnisotropy.Value = float.Parse(_anisotropy.ActiveId, CultureInfo.InvariantCulture); + ConfigurationState.Instance.Graphics.AspectRatio.Value = Enum.Parse(_aspectRatio.ActiveId); ConfigurationState.Instance.Graphics.ResScale.Value = int.Parse(_resScaleCombo.ActiveId); ConfigurationState.Instance.Graphics.ResScaleCustom.Value = resScaleCustom; @@ -422,7 +425,7 @@ namespace Ryujinx.Ui } //Events - private void TimeZoneEntry_FocusOut(Object sender, FocusOutEventArgs e) + private void TimeZoneEntry_FocusOut(object sender, FocusOutEventArgs e) { if (!_validTzRegions.Contains(_systemTimeZoneEntry.Text)) { @@ -439,7 +442,7 @@ namespace Ryujinx.Ui ((string)compl.Model.GetValue(iter, 0)).Substring(3).StartsWith(key); // offset } - private void SystemTimeSpin_ValueChanged(Object sender, EventArgs e) + private void SystemTimeSpin_ValueChanged(object sender, EventArgs e) { int year = _systemTimeYearSpin.ValueAsInt; int month = _systemTimeMonthSpin.ValueAsInt; diff --git a/Ryujinx/Ui/SettingsWindow.glade b/Ryujinx/Ui/SettingsWindow.glade index 1090bf2cc..936aa5209 100644 --- a/Ryujinx/Ui/SettingsWindow.glade +++ b/Ryujinx/Ui/SettingsWindow.glade @@ -1811,6 +1811,55 @@ 1 + + + True + False + 5 + 5 + + + True + False + Aspect Ratio applied to the renderer window. + Aspect Ratio: + + + False + True + 5 + 0 + + + + + True + False + Aspect Ratio applied to the renderer window. + 1 + + 4:3 + 16:9 + 16:10 + 21:9 + 32:9 + Stretch to Fit Window + + + + False + True + 1 + + + + + False + True + 5 + 3 + + False diff --git a/Ryujinx/Ui/StatusUpdatedEventArgs.cs b/Ryujinx/Ui/StatusUpdatedEventArgs.cs index 4b1941575..a028c8f82 100644 --- a/Ryujinx/Ui/StatusUpdatedEventArgs.cs +++ b/Ryujinx/Ui/StatusUpdatedEventArgs.cs @@ -6,14 +6,16 @@ namespace Ryujinx.Ui { public bool VSyncEnabled; public string DockedMode; + public string AspectRatio; public string GameStatus; public string FifoStatus; public string GpuName; - public StatusUpdatedEventArgs(bool vSyncEnabled, string dockedMode, string gameStatus, string fifoStatus, string gpuName) + public StatusUpdatedEventArgs(bool vSyncEnabled, string dockedMode, string aspectRatio, string gameStatus, string fifoStatus, string gpuName) { VSyncEnabled = vSyncEnabled; DockedMode = dockedMode; + AspectRatio = aspectRatio; GameStatus = gameStatus; FifoStatus = fifoStatus; GpuName = gpuName; diff --git a/Ryujinx/_schema.json b/Ryujinx/_schema.json index fb055c0d9..180b1ae6e 100644 --- a/Ryujinx/_schema.json +++ b/Ryujinx/_schema.json @@ -941,6 +941,21 @@ 16 ] }, + "aspect_ratio": { + "$id": "#/properties/aspect_ratio", + "type": "string", + "title": "Aspect Ratio applied to the renderer window.", + "description": "Aspect Ratio applied to the renderer window.", + "default": "Fixed16x9", + "examples": [ + "Fixed4x3", + "Fixed16x9", + "Fixed16x10", + "Fixed21x9", + "Fixed32x9", + "Stretched" + ] + }, "graphics_shaders_dump_path": { "$id": "#/properties/graphics_shaders_dump_path", "type": "string",