diff options
author | TSRBerry <20988865+TSRBerry@users.noreply.github.com> | 2023-04-12 03:09:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 01:09:47 +0000 |
commit | e187a8870a6f19ac0a85b08aece3c1a1e196e379 (patch) | |
tree | e31d9c1b1594db1d01e53b99315ba7ef3f785373 /Ryujinx/Ui/RendererWidgetBase.cs | |
parent | a64fee29dc6b8e523d61abb7e79ceaa95a558c6c (diff) |
HLE: Deal with empty title names properly (#4643)1.1.707
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
Diffstat (limited to 'Ryujinx/Ui/RendererWidgetBase.cs')
-rw-r--r-- | Ryujinx/Ui/RendererWidgetBase.cs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Ryujinx/Ui/RendererWidgetBase.cs b/Ryujinx/Ui/RendererWidgetBase.cs index 7cb5b327..65afa6e4 100644 --- a/Ryujinx/Ui/RendererWidgetBase.cs +++ b/Ryujinx/Ui/RendererWidgetBase.cs @@ -496,15 +496,13 @@ namespace Ryujinx.Ui parent.Present(); var activeProcess = Device.Processes.ActiveApplication; - var nacp = activeProcess.ApplicationControlProperties; - int desiredLanguage = (int)Device.System.State.DesiredTitleLanguage; - string titleNameSection = string.IsNullOrWhiteSpace(nacp.Title[desiredLanguage].NameString.ToString()) ? string.Empty : $" - {nacp.Title[desiredLanguage].NameString.ToString()}"; - string titleVersionSection = string.IsNullOrWhiteSpace(nacp.DisplayVersionString.ToString()) ? string.Empty : $" v{nacp.DisplayVersionString.ToString()}"; - string titleIdSection = string.IsNullOrWhiteSpace(activeProcess.ProgramIdText) ? string.Empty : $" ({activeProcess.ProgramIdText.ToUpper()})"; - string titleArchSection = activeProcess.Is64Bit ? " (64-bit)" : " (32-bit)"; + string titleNameSection = string.IsNullOrWhiteSpace(activeProcess.Name) ? string.Empty : $" {activeProcess.Name}"; + string titleVersionSection = string.IsNullOrWhiteSpace(activeProcess.DisplayVersion) ? string.Empty : $" v{activeProcess.DisplayVersion}"; + string titleIdSection = $" ({activeProcess.ProgramIdText.ToUpper()})"; + string titleArchSection = activeProcess.Is64Bit ? " (64-bit)" : " (32-bit)"; - parent.Title = $"Ryujinx {Program.Version}{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}"; + parent.Title = $"Ryujinx {Program.Version} -{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}"; }); Thread renderLoopThread = new Thread(Render) |