diff options
| author | gnisman <gleb.nisman@gmail.com> | 2023-12-04 18:52:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-04 17:52:25 +0100 |
| commit | 93aeecc4f337325ed11e3a0a72dd85768db6618f (patch) | |
| tree | ef79566a77502043bbafe141cb24b64d85420abe /src/Ryujinx.Ava/AppHost.cs | |
| parent | 2989c163a891c4ac730e799e1457b1bfb2ecc028 (diff) | |
Improve indication of emulation being paused by the User (#5836)
* Improve indication of emulation being paused by the User
* Use localised for Paused
* Backup original title - PR comments fix
* Add common helper method to assemble App title
Diffstat (limited to 'src/Ryujinx.Ava/AppHost.cs')
| -rw-r--r-- | src/Ryujinx.Ava/AppHost.cs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Ryujinx.Ava/AppHost.cs b/src/Ryujinx.Ava/AppHost.cs index a443c0be..dac4a3c5 100644 --- a/src/Ryujinx.Ava/AppHost.cs +++ b/src/Ryujinx.Ava/AppHost.cs @@ -346,16 +346,9 @@ namespace Ryujinx.Ava _viewModel.IsGameRunning = true; - var activeProcess = Device.Processes.ActiveApplication; - - 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)"; - Dispatcher.UIThread.InvokeAsync(() => { - _viewModel.Title = $"Ryujinx {Program.Version} -{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}"; + _viewModel.Title = TitleHelper.ActiveApplicationTitle(Device.Processes.ActiveApplication, Program.Version); }); _viewModel.SetUiProgressHandlers(Device); @@ -727,6 +720,8 @@ namespace Ryujinx.Ava Device?.System.TogglePauseEmulation(false); _viewModel.IsPaused = false; + _viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version); + Logger.Info?.Print(LogClass.Emulation, "Emulation was resumed"); } internal void Pause() @@ -734,6 +729,8 @@ namespace Ryujinx.Ava Device?.System.TogglePauseEmulation(true); _viewModel.IsPaused = true; + _viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, LocaleManager.Instance[LocaleKeys.Paused]); + Logger.Info?.Print(LogClass.Emulation, "Emulation was paused"); } private void InitializeSwitchInstance() |
