mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-29 06:36:24 +02:00
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
This commit is contained in:
parent
2989c163a8
commit
93aeecc4f3
5 changed files with 42 additions and 14 deletions
30
src/Ryujinx.Ui.Common/Helper/TitleHelper.cs
Normal file
30
src/Ryujinx.Ui.Common/Helper/TitleHelper.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using Ryujinx.HLE.Loaders.Processes;
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Ui.Common.Helper
|
||||
{
|
||||
public static class TitleHelper
|
||||
{
|
||||
public static string ActiveApplicationTitle(ProcessResult activeProcess, string applicationVersion, string pauseString = "")
|
||||
{
|
||||
if (activeProcess == null)
|
||||
{
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
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)";
|
||||
|
||||
string appTitle = $"Ryujinx {applicationVersion} -{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}";
|
||||
|
||||
if (!string.IsNullOrEmpty(pauseString))
|
||||
{
|
||||
appTitle += $" ({pauseString})";
|
||||
}
|
||||
|
||||
return appTitle;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue