Compare commits

...

6 commits

Author SHA1 Message Date
Nicola
775ce2432c
Merge branch 'master' into translation-it 2024-11-15 10:38:17 +01:00
Nicola
9c6f8e1dbf Merge branch 'translation-it' of https://github.com/nicola02nb/Ryujinx into translation-it 2024-11-15 09:49:33 +01:00
Nicola
dc93e51c23 Added some missing translations 2024-11-15 09:49:30 +01:00
EmulationEnjoyer
9b90e81817
Fix window sizing when "Show Title Bar" is enabled (#247)
Fixes a bug that causes the main window to not size properly when the
TitleBar is enabled (i.e.: when the TitleBar and MenuStrip are separate
entities). Corrects the size for main window startup and when a user
clicks a "View > Window Size > *Resolution Here*" MenuStripItem

Prior to this fix if a user selects 720p/1080p and "Show Title Bar" is
enabled, the window would be sized smaller than intended and display
black bars on the sides of the render area
2024-11-15 01:26:35 -06:00
Evan Husted
1e53a17041 misc: Add LEGO Horizon Adventures image asset to Discord RPC 2024-11-15 01:18:00 -06:00
GabCoolGuy
0c23104792
Add mention of canary to README.md (#236) 2024-11-15 00:24:18 -06:00
5 changed files with 36 additions and 17 deletions

View file

@ -70,12 +70,18 @@ Use the search function to see if a game has been tested already!
To run this emulator, your PC must be equipped with at least 8GiB of RAM;
failing to meet this requirement may result in a poor gameplay experience or unexpected crashes.
## Latest release
## Latest build
Releases are compiled automatically for each commit on the master branch.
While we strive to ensure optimal stability and performance prior to pushing an update, our automated builds **may be unstable or completely broken**.
Stable builds are made every so often onto a separate "release" branch that then gets put into the releases you know and love.
These stable builds exist so that the end user can get a more **enjoyable and stable experience**.
You can find the latest release [here](https://github.com/GreemDev/Ryujinx/releases/latest).
You can find the latest stable release [here](https://github.com/GreemDev/Ryujinx/releases/latest).
Canary builds are compiled automatically for each commit on the master branch.
While we strive to ensure optimal stability and performance prior to pushing an update, these builds **may be unstable or completely broken**.
These canary builds are only recommended for experienced users.
You can find the latest canary release [here](https://github.com/GreemDev/Ryujinx-Canary/releases/latest).
## Documentation

View file

@ -248,7 +248,7 @@ namespace Ryujinx.UI.Common
"0100744001588000", // Cars 3: Driven to Win
"0100b41013c82000", // Cruis'n Blast
"01008c8012920000", // Dying Light Platinum Edition
"01000a10041ea000", // The Elder Scrolls V: Skyrim
"010073c01af34000", // LEGO Horizon Adventures
"0100770008dd8000", // Monster Hunter Generations Ultimate
"0100b04011742000", // Monster Hunter Rise
"0100853015e86000", // No Man's Sky
@ -263,6 +263,7 @@ namespace Ryujinx.UI.Common
"0100d7a01b7a2000", // Star Wars: Bounty Hunter
"0100800015926000", // Suika Game
"0100e46006708000", // Terraria
"01000a10041ea000", // The Elder Scrolls V: Skyrim
"010080b00ad66000", // Undertale
];
}

View file

@ -34,8 +34,8 @@
"MenuBarFileLoadTitleUpdatesFromFolder": "Carica Aggiornamenti Da una Cartella",
"MenuBarFileOpenFromFileError": "Nessuna applicazione trovata nel file selezionato",
"MenuBarToolsXCITrimmer": "Trim XCI Files",
"MenuBarView": "_View",
"MenuBarViewWindow": "Window Size",
"MenuBarView": "_Vista",
"MenuBarViewWindow": "Dimensione Finestra",
"MenuBarViewWindow720": "720p",
"MenuBarViewWindow1080": "1080p",
"MenuBarHelp": "_Aiuto",

View file

@ -184,18 +184,24 @@ namespace Ryujinx.Ava.UI.Views.Main
if (sender is not MenuItem { Tag: string resolution })
return;
(int width, int height) = resolution.Split(' ', 2)
(int resolutionWidth, int resolutionHeight) = resolution.Split(' ', 2)
.Into(parts =>
(int.Parse(parts[0]), int.Parse(parts[1]))
);
// Correctly size window when 'TitleBar' is enabled (Nov. 14, 2024)
double barsHeight = ((Window.StatusBarHeight + Window.MenuBarHeight) +
(ConfigurationState.Instance.ShowTitleBar ? (int)Window.TitleBar.Height : 0));
double windowWidthScaled = (resolutionWidth * Program.WindowScaleFactor);
double windowHeightScaled = ((resolutionHeight + barsHeight) * Program.WindowScaleFactor);
await Dispatcher.UIThread.InvokeAsync(() =>
{
ViewModel.WindowState = WindowState.Normal;
height += (int)Window.StatusBarHeight + (int)Window.MenuBarHeight;
Window.Arrange(new Rect(Window.Position.X, Window.Position.Y, width, height));
Window.Arrange(new Rect(Window.Position.X, Window.Position.Y, windowWidthScaled, windowHeightScaled));
});
}

View file

@ -65,6 +65,9 @@ namespace Ryujinx.Ava.UI.Windows
public static bool ShowKeyErrorOnLoad { get; set; }
public ApplicationLibrary ApplicationLibrary { get; set; }
// Correctly size window when 'TitleBar' is enabled (Nov. 14, 2024)
public readonly double TitleBarHeight;
public readonly double StatusBarHeight;
public readonly double MenuBarHeight;
@ -85,12 +88,12 @@ namespace Ryujinx.Ava.UI.Windows
TitleBar.ExtendsContentIntoTitleBar = !ConfigurationState.Instance.ShowTitleBar;
TitleBar.TitleBarHitTestType = (ConfigurationState.Instance.ShowTitleBar) ? TitleBarHitTestType.Simple : TitleBarHitTestType.Complex;
// Correctly size window when 'TitleBar' is enabled (Nov. 14, 2024)
TitleBarHeight = (ConfigurationState.Instance.ShowTitleBar ? TitleBar.Height : 0);
// NOTE: Height of MenuBar and StatusBar is not usable here, since it would still be 0 at this point.
StatusBarHeight = StatusBarView.StatusBar.MinHeight;
MenuBarHeight = MenuBar.MinHeight;
double barHeight = MenuBarHeight + StatusBarHeight;
Height = ((Height - barHeight) / Program.WindowScaleFactor) + barHeight;
Width /= Program.WindowScaleFactor;
SetWindowSizePosition();
@ -406,7 +409,8 @@ namespace Ryujinx.Ava.UI.Windows
{
if (!ConfigurationState.Instance.RememberWindowState)
{
ViewModel.WindowHeight = (720 + StatusBarHeight + MenuBarHeight) * Program.WindowScaleFactor;
// Correctly size window when 'TitleBar' is enabled (Nov. 14, 2024)
ViewModel.WindowHeight = (720 + StatusBarHeight + MenuBarHeight + TitleBarHeight) * Program.WindowScaleFactor;
ViewModel.WindowWidth = 1280 * Program.WindowScaleFactor;
WindowState = WindowState.Normal;
@ -441,8 +445,10 @@ namespace Ryujinx.Ava.UI.Windows
// Only save rectangle properties if the window is not in a maximized state.
if (WindowState != WindowState.Maximized)
{
ConfigurationState.Instance.UI.WindowStartup.WindowSizeHeight.Value = (int)Height;
ConfigurationState.Instance.UI.WindowStartup.WindowSizeWidth.Value = (int)Width;
// Since scaling is being applied to the loaded settings from disk (see SetWindowSizePosition() above), scaling should be removed from width/height before saving out to disk
// as well - otherwise anyone not using a 1.0 scale factor their window will increase in size with every subsequent launch of the program when scaling is applied (Nov. 14, 2024)
ConfigurationState.Instance.UI.WindowStartup.WindowSizeHeight.Value = (int)(Height / Program.WindowScaleFactor);
ConfigurationState.Instance.UI.WindowStartup.WindowSizeWidth.Value = (int)(Width / Program.WindowScaleFactor);
ConfigurationState.Instance.UI.WindowStartup.WindowPositionX.Value = Position.X;
ConfigurationState.Instance.UI.WindowStartup.WindowPositionY.Value = Position.Y;