Compare commits

...

12 Commits

Author SHA1 Message Date
Nicola
d394dd769a Updated IT translation file (#243) 2024-11-17 00:15:06 -06:00
Evan Husted
6de3afc43d misc: chore: Move build instructions into its own markdown file; remove compatibility section since there's no games list. 2024-11-15 06:02:26 -06: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
Evan Husted
1ed2aea029 Update ko_KR again 2024-11-14 02:28:00 -06:00
Evan Husted
34caa03385 Update ko_KR.json 2024-11-14 02:16:54 -06:00
Hack茶ん
104701e80d Updtate Korean translation! (#226)
I participated in the Ryujinx Korean localisation through crowdin, but
there were some parts that I couldn't express in my own colours because
of the existing translation, but I started from scratch and coloured it
with my own colours.

There were some duplicates while editing, so I fixed them all.
2024-11-14 02:08:56 -06:00
Luke Warner
cef88febb2 Implement IAllSystemAppletProxiesService: 350 (OpenSystemApplicationProxy) (#237)
Implements IAllSystemAppletProxiesService: 350
(OpenSystemApplicationProxy)

This fixes a crash that occurs when launching an NSP forwarder generated
by Nro2Nsp.
2024-11-13 22:29:00 -06:00
extherian
5fccfb76b9 Fix divide by zero when recovering from missed draw (Vulkan), authored by EmulationEnjoyer (#235)
Adds the fix for the crash in the opening cutscene of Baldo: The Sacred
Owls when using Vulkan, from ryujinx-mirror. The original discussion
about the fix can be found
[here.](https://github.com/ryujinx-mirror/ryujinx/pull/52)

It's up to you if you want to merge this, it's one of the very few
improvements that ryujinx-mirror got that hasn't made it into your fork
yet. My opinion is that without a graphics expert on board, we can't
know the real cause of this divide-by-zero issue and will have to make
do with this patch to fix it. And I think we will have to do this many
times in the future for other games that suffer crashes at the moment as
well, at least going by current discussions in the #development section
of the discord.

I did not come up with this fix, all credit goes to
[EmulationEnjoyer](https://github.com/EmulationEnjoyer) for putting
Ryujinx through a debugger and discovering the cause of the crash.
2024-11-13 20:36:59 -06:00
Evan Husted
4cb5946be4 UI: RPC: Only show hours at maximum for play time 2024-11-11 18:22:19 -06:00
Evan Husted
e1dfb48e23 misc: Specify Normal or Canary in Version log line 2024-11-11 18:22:19 -06:00
10 changed files with 563 additions and 451 deletions

23
COMPILING.md Normal file
View File

@@ -0,0 +1,23 @@
## Compilation
Building the project is for advanced users.
If you wish to build the emulator yourself, follow these steps:
### Step 1
Install the [.NET 8.0 (or higher) SDK](https://dotnet.microsoft.com/download/dotnet/8.0).
Make sure your SDK version is higher or equal to the required version specified in [global.json](global.json).
### Step 2
Either use `git clone https://github.com/GreemDev/Ryujinx` on the command line to clone the repository or use Code --> Download zip button to get the files.
### Step 3
To build Ryujinx, open a command prompt inside the project directory.
You can quickly access it on Windows by holding shift in File Explorer, then right clicking and selecting `Open command window here`.
Then type the following command: `dotnet build -c Release -o build`
the built files will be found in the newly created build directory.
Ryujinx system files are stored in the `Ryujinx` folder.
This folder is located in the user folder, which can be accessed by clicking `Open Ryujinx Folder` under the File menu in the GUI.

View File

@@ -56,55 +56,28 @@
<img src="https://raw.githubusercontent.com/GreemDev/Ryujinx/refs/heads/master/docs/shell.png">
</p>
## Compatibility
As of May 2024, Ryujinx has been tested on approximately 4,300 titles;
over 4,100 boot past menus and into gameplay, with roughly 3,550 of those being considered playable.
Anyone is free to submit a new game test or update an existing game test entry;
simply follow the new issue template and testing guidelines, or post as a reply to the applicable game issue.
Use the search function to see if a game has been tested already!
## Usage
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
If you are planning to contribute or just want to learn more about this project please read through our [documentation](docs/README.md).
## Building
Building the project is for advanced users.
If you wish to build the emulator yourself, follow these steps:
### Step 1
Install the [.NET 8.0 (or higher) SDK](https://dotnet.microsoft.com/download/dotnet/8.0).
Make sure your SDK version is higher or equal to the required version specified in [global.json](global.json).
### Step 2
Either use `git clone https://github.com/GreemDev/Ryujinx` on the command line to clone the repository or use Code --> Download zip button to get the files.
### Step 3
To build Ryujinx, open a command prompt inside the project directory.
You can quickly access it on Windows by holding shift in File Explorer, then right clicking and selecting `Open command window here`.
Then type the following command: `dotnet build -c Release -o build`
the built files will be found in the newly created build directory.
Ryujinx system files are stored in the `Ryujinx` folder.
This folder is located in the user folder, which can be accessed by clicking `Open Ryujinx Folder` under the File menu in the GUI.
## Features
- **Audio**

View File

@@ -55,8 +55,10 @@ namespace Ryujinx.Graphics.Vulkan
if (_handle != BufferHandle.Null)
{
// May need to restride the vertex buffer.
if (gd.NeedsVertexBufferAlignment(AttributeScalarAlignment, out int alignment) && (_stride % alignment) != 0)
//
// Fix divide by zero when recovering from missed draw (Oct. 16 2024)
// (fixes crash in 'Baldo: The Guardian Owls' opening cutscene)
if (gd.NeedsVertexBufferAlignment(AttributeScalarAlignment, out int alignment) && alignment != 0 && (_stride % alignment) != 0)
{
autoBuffer = gd.BufferManager.GetAlignedVertexBuffer(cbs, _handle, _offset, _size, _stride, alignment);

View File

@@ -1,4 +1,5 @@
using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService;
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService;
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
{
@@ -25,5 +26,14 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
return ResultCode.Success;
}
[CommandCmif(350)]
// OpenSystemApplicationProxy(u64, pid, handle<copy>) -> object<nn::am::service::IApplicationProxy>
public ResultCode OpenSystemApplicationProxy(ServiceCtx context)
{
MakeObject(context, new IApplicationProxy(context.Request.HandleDesc.PId));
return ResultCode.Success;
}
}
}

View File

@@ -1,11 +1,10 @@
using DiscordRPC;
using Humanizer;
using LibHac.Bcat;
using Humanizer.Localisation;
using Ryujinx.Common;
using Ryujinx.HLE.Loaders.Processes;
using Ryujinx.UI.App.Common;
using Ryujinx.UI.Common.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -78,13 +77,13 @@ namespace Ryujinx.UI.Common
Assets = new Assets
{
LargeImageKey = _discordGameAssetKeys.Contains(procRes.ProgramIdText) ? procRes.ProgramIdText : "game",
LargeImageText = TruncateToByteLength($"{appMeta.Title} | {procRes.DisplayVersion}"),
LargeImageText = TruncateToByteLength($"{appMeta.Title} (v{procRes.DisplayVersion})"),
SmallImageKey = "ryujinx",
SmallImageText = TruncateToByteLength(_description)
},
Details = TruncateToByteLength($"Playing {appMeta.Title}"),
State = appMeta.LastPlayed.HasValue && appMeta.TimePlayed.TotalSeconds > 5
? $"Total play time: {appMeta.TimePlayed.Humanize(2, false)}"
? $"Total play time: {appMeta.TimePlayed.Humanize(2, false, maxUnit: TimeUnit.Hour)}"
: "Never played",
Timestamps = Timestamps.Now
});
@@ -249,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
@@ -264,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

@@ -33,8 +33,9 @@
"MenuBarFileLoadDlcFromFolder": "Carica DLC Da una Cartella",
"MenuBarFileLoadTitleUpdatesFromFolder": "Carica Aggiornamenti Da una Cartella",
"MenuBarFileOpenFromFileError": "Nessuna applicazione trovata nel file selezionato",
"MenuBarView": "_View",
"MenuBarViewWindow": "Window Size",
"MenuBarToolsXCITrimmer": "Trim XCI Files",
"MenuBarView": "_Vista",
"MenuBarViewWindow": "Dimensione Finestra",
"MenuBarViewWindow720": "720p",
"MenuBarViewWindow1080": "1080p",
"MenuBarHelp": "_Aiuto",
@@ -84,8 +85,11 @@
"GameListContextMenuOpenModsDirectoryToolTip": "Apre la cartella che contiene le mod dell'applicazione",
"GameListContextMenuOpenSdModsDirectory": "Apri la cartella delle mod Atmosphere",
"GameListContextMenuOpenSdModsDirectoryToolTip": "Apre la cartella alternativa di Atmosphere sulla scheda SD che contiene le mod dell'applicazione. Utile per le mod create per funzionare sull'hardware reale.",
"StatusBarGamesLoaded": "{0}/{1} giochi caricati",
"GameListContextMenuTrimXCI": "Controlla e Trimma i file XCI",
"GameListContextMenuTrimXCIToolTip": "Controlla e Trimma i file XCI da Salvare Sullo Spazio del Disco",
"StatusBarGamesLoaded": "{0}/{1} Giochi Caricati",
"StatusBarSystemVersion": "Versione di sistema: {0}",
"StatusBarXCIFileTrimming": "Trimmando i file XCI '{0}'",
"LinuxVmMaxMapCountDialogTitle": "Rilevato limite basso per le mappature di memoria",
"LinuxVmMaxMapCountDialogTextPrimary": "Vuoi aumentare il valore di vm.max_map_count a {0}?",
"LinuxVmMaxMapCountDialogTextSecondary": "Alcuni giochi potrebbero provare a creare più mappature di memoria di quanto sia attualmente consentito. Ryujinx si bloccherà non appena questo limite viene superato.",
@@ -99,8 +103,8 @@
"SettingsTabGeneralEnableDiscordRichPresence": "Attiva Discord Rich Presence",
"SettingsTabGeneralCheckUpdatesOnLaunch": "Controlla aggiornamenti all'avvio",
"SettingsTabGeneralShowConfirmExitDialog": "Mostra dialogo \"Conferma Uscita\"",
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
"SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)",
"SettingsTabGeneralRememberWindowState": "Ricorda Dimensione/Posizione Finestra",
"SettingsTabGeneralShowTitleBar": "Mostra barra del titolo (Richiede il riavvio)",
"SettingsTabGeneralHideCursor": "Nascondi il cursore:",
"SettingsTabGeneralHideCursorNever": "Mai",
"SettingsTabGeneralHideCursorOnIdle": "Quando è inattivo",
@@ -400,6 +404,8 @@
"InputDialogTitle": "Finestra di input",
"InputDialogOk": "OK",
"InputDialogCancel": "Annulla",
"InputDialogCancelling": "Cancellando",
"InputDialogClose": "Chiudi",
"InputDialogAddNewProfileTitle": "Scegli il nome del profilo",
"InputDialogAddNewProfileHeader": "Digita un nome profilo",
"InputDialogAddNewProfileSubtext": "(Lunghezza massima: {0})",
@@ -407,7 +413,7 @@
"AvatarSetBackgroundColor": "Imposta colore di sfondo",
"AvatarClose": "Chiudi",
"ControllerSettingsLoadProfileToolTip": "Carica profilo",
"ControllerSettingsViewProfileToolTip": "View Profile",
"ControllerSettingsViewProfileToolTip": "Visualizza profilo",
"ControllerSettingsAddProfileToolTip": "Aggiungi profilo",
"ControllerSettingsRemoveProfileToolTip": "Rimuovi profilo",
"ControllerSettingsSaveProfileToolTip": "Salva profilo",
@@ -417,7 +423,7 @@
"GameListContextMenuToggleFavorite": "Preferito",
"GameListContextMenuToggleFavoriteToolTip": "Segna il gioco come preferito",
"SettingsTabGeneralTheme": "Tema:",
"SettingsTabGeneralThemeAuto": "Auto",
"SettingsTabGeneralThemeAuto": "Automatico",
"SettingsTabGeneralThemeDark": "Scuro",
"SettingsTabGeneralThemeLight": "Chiaro",
"ControllerSettingsConfigureGeneral": "Configura",
@@ -469,6 +475,7 @@
"DialogUninstallFileTypesSuccessMessage": "Tipi di file disinstallati con successo!",
"DialogUninstallFileTypesErrorMessage": "Disinstallazione dei tipi di file non riuscita.",
"DialogOpenSettingsWindowLabel": "Apri finestra delle impostazioni",
"DialogOpenXCITrimmerWindowLabel": "Finestra XCI Trimmer",
"DialogControllerAppletTitle": "Applet del controller",
"DialogMessageDialogErrorExceptionMessage": "Errore nella visualizzazione del Message Dialog: {0}",
"DialogSoftwareKeyboardErrorExceptionMessage": "Errore nella visualizzazione della tastiera software: {0}",
@@ -522,7 +529,7 @@
"DialogModManagerDeletionAllWarningMessage": "Stai per eliminare tutte le mod per questo titolo.\n\nVuoi davvero procedere?",
"SettingsTabGraphicsFeaturesOptions": "Funzionalità",
"SettingsTabGraphicsBackendMultithreading": "Multithreading del backend grafico:",
"CommonAuto": "Auto",
"CommonAuto": "Automatico",
"CommonOff": "Disattivato",
"CommonOn": "Attivo",
"InputDialogYes": "Sì",
@@ -669,9 +676,15 @@
"OpenSetupGuideMessage": "Apri la guida all'installazione",
"NoUpdate": "Nessun aggiornamento",
"TitleUpdateVersionLabel": "Versione {0}",
"TitleBundledUpdateVersionLabel": "Incluso: Version {0}",
"TitleBundledDlcLabel": "Incluso:",
"RyujinxInfo": "Ryujinx - Info",
"TitleBundledUpdateVersionLabel": "In bundle: Versione {0}",
"TitleBundledDlcLabel": "In bundle:",
"TitleXCIStatusPartialLabel": "Parziale",
"TitleXCIStatusTrimmableLabel": "Non Trimmato",
"TitleXCIStatusUntrimmableLabel": "Trimmato",
"TitleXCIStatusFailedLabel": "(Fallito)",
"TitleXCICanSaveLabel": "Salva {0:n0} Mb",
"TitleXCISavingLabel": "Salva {0:n0} Mb",
"RyujinxInfo": "Ryujinx - Informazioni",
"RyujinxConfirm": "Ryujinx - Conferma",
"FileDialogAllTypes": "Tutti i tipi",
"Never": "Mai",
@@ -723,27 +736,54 @@
"SelectDlcDialogTitle": "Seleziona file dei DLC",
"SelectUpdateDialogTitle": "Seleziona file di aggiornamento",
"SelectModDialogTitle": "Seleziona cartella delle mod",
"TrimXCIFileDialogTitle": "Controlla e Trimma i file XCI ",
"TrimXCIFileDialogPrimaryText": "Questa funzionalita controllerà prima lo spazio libero e poi trimmerà il file XCI per liberare dello spazio.",
"TrimXCIFileDialogSecondaryText": "Dimensioni Attuali File: {0:n} MB\nDimensioni Dati Gioco: {1:n} MB\nRisparimio Spazio Disco: {2:n} MB",
"TrimXCIFileNoTrimNecessary": "Il file XCI non deve essere trimmato. Controlla i log per ulteriori dettagli",
"TrimXCIFileNoUntrimPossible": "Il file XCI non può essere untrimmato. Controlla i log per ulteriori dettagli",
"TrimXCIFileReadOnlyFileCannotFix": "Il file XCI è in sola lettura e non può essere reso Scrivibile. Controlla i log per ulteriori dettagli",
"TrimXCIFileFileSizeChanged": "Il file XCI ha cambiato dimensioni da quando è stato scansionato. Controlla che il file non stia venendo scritto da qualche altro programma e poi riprova.",
"TrimXCIFileFreeSpaceCheckFailed": "Il file XCI ha dati nello spazio libero, non è sicuro effettuare il trimming",
"TrimXCIFileInvalidXCIFile": "Il file XCI contiene dati invlidi. Controlla i log per ulteriori dettagli",
"TrimXCIFileFileIOWriteError": "Il file XCI non può essere aperto per essere scritto. Controlla i log per ulteriori dettagli",
"TrimXCIFileFailedPrimaryText": "Trimming del file XCI fallito",
"TrimXCIFileCancelled": "Operazione Cancellata",
"TrimXCIFileFileUndertermined": "Nessuna operazione è stata effettuata",
"UserProfileWindowTitle": "Gestione profili utente",
"CheatWindowTitle": "Gestione trucchi",
"DlcWindowTitle": "Gestisci DLC per {0} ({1})",
"ModWindowTitle": "Gestisci mod per {0} ({1})",
"UpdateWindowTitle": "Gestione aggiornamenti",
"XCITrimmerWindowTitle": "XCI File Trimmer",
"XCITrimmerTitleStatusCount": "{0} di {1} Titolo(i) Selezionati",
"XCITrimmerTitleStatusCountWithFilter": "{0} of {1} Titolo(i) Selezionati ({2} visualizzato)",
"XCITrimmerTitleStatusTrimming": "Trimming {0} Titolo(i)...",
"XCITrimmerTitleStatusUntrimming": "Untrimming {0} Titolo(i)...",
"XCITrimmerTitleStatusFailed": "Fallito",
"XCITrimmerPotentialSavings": "Potenziali Salvataggi",
"XCITrimmerActualSavings": "Effettivi Salvataggi",
"XCITrimmerSavingsMb": "{0:n0} Mb",
"XCITrimmerSelectDisplayed": "Seleziona Visualizzati",
"XCITrimmerDeselectDisplayed": "Deselziona Visualizzati",
"XCITrimmerSortName": "Titolo",
"XCITrimmerSortSaved": "Salvataggio Spazio",
"UpdateWindowUpdateAddedMessage": "{0} aggiornamento/i aggiunto/i",
"UpdateWindowBundledContentNotice": "Gli aggiornamenti inclusi non possono essere eliminati, ma solo disattivati",
"CheatWindowHeading": "Trucchi disponibili per {0} [{1}]",
"BuildId": "ID Build",
"DlcWindowBundledContentNotice": "i DLC \"impacchettati\" non possono essere rimossi, ma solo disabilitati.",
"DlcWindowHeading": "DLC disponibili per {0} [{1}]",
"ModWindowHeading": "{0} mod",
"UserProfilesEditProfile": "Modifica selezionati",
"Cancel": "Annulla",
"Save": "Salva",
"Discard": "Scarta",
"UpdateWindowBundledContentNotice": "Gli aggiornamenti inclusi non possono essere eliminati, ma solo disattivati",
"DlcWindowDlcAddedMessage": "{0} nuovo/i contenuto/i scaricabile/i aggiunto/i",
"AutoloadDlcAddedMessage": "{0} contenuto/i scaricabile/i aggiunto/i",
"AutoloadDlcRemovedMessage": "{0} contenuto/i scaricabile/i mancante/i rimosso/i",
"AutoloadUpdateAddedMessage": "{0} aggiornamento/i aggiunto/i",
"AutoloadUpdateRemovedMessage": "{0} aggiornamento/i mancante/i rimosso/i",
"DlcWindowBundledContentNotice": "i DLC \"impacchettati\" non possono essere rimossi, ma solo disabilitati.",
"DlcWindowDlcAddedMessage": "{0} nuovo/i contenuto/i scaricabile/i aggiunto/i",
"UpdateWindowUpdateAddedMessage": "{0} aggiornamento/i aggiunto/i",
"ModWindowHeading": "{0} mod",
"UserProfilesEditProfile": "Modifica selezionati",
"Continue": "Continua",
"Cancel": "Annulla",
"Save": "Salva",
"Discard": "Scarta",
"Paused": "In pausa",
"UserProfilesSetProfileImage": "Imposta immagine profilo",
"UserProfileEmptyNameError": "Il nome è obbligatorio",

File diff suppressed because it is too large Load Diff

View File

@@ -224,7 +224,7 @@ namespace Ryujinx.Ava
private static void PrintSystemInfo()
{
Logger.Notice.Print(LogClass.Application, $"Ryujinx Version: {Version}");
Logger.Notice.Print(LogClass.Application, $"{App.FullAppName} Version: {Version}");
SystemInfo.Gather().Print();
var enabledLogLevels = Logger.GetEnabledLevels().ToArray();

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;