mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-08-30 07:25:05 +00:00
* Rename Ryujinx.UI.Common * Rename Ryujinx.UI.LocaleGenerator * Update in Files AboutWindow * Configuration State * Rename projects * Ryujinx/UI * Fix build * Main remaining inconsistencies * HLE.UI Namespace * HLE.UI Files * Namespace * Ryujinx.UI.Common.Configuration.UI * Ryujinx.UI.Common,Configuration.UI Files * More instances
30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
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;
|
|
}
|
|
}
|
|
}
|