/ src / Ryujinx.UI.Common / Helper / TitleHelper.cs
TitleHelper.cs
 1  using Ryujinx.HLE.Loaders.Processes;
 2  using System;
 3  
 4  namespace Ryujinx.UI.Common.Helper
 5  {
 6      public static class TitleHelper
 7      {
 8          public static string ActiveApplicationTitle(ProcessResult activeProcess, string applicationVersion, string pauseString = "")
 9          {
10              if (activeProcess == null)
11              {
12                  return String.Empty;
13              }
14  
15              string titleNameSection = string.IsNullOrWhiteSpace(activeProcess.Name) ? string.Empty : $" {activeProcess.Name}";
16              string titleVersionSection = string.IsNullOrWhiteSpace(activeProcess.DisplayVersion) ? string.Empty : $" v{activeProcess.DisplayVersion}";
17              string titleIdSection = $" ({activeProcess.ProgramIdText.ToUpper()})";
18              string titleArchSection = activeProcess.Is64Bit ? " (64-bit)" : " (32-bit)";
19  
20              string appTitle = $"Ryujinx {applicationVersion} -{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}";
21  
22              if (!string.IsNullOrEmpty(pauseString))
23              {
24                  appTitle += $" ({pauseString})";
25              }
26  
27              return appTitle;
28          }
29      }
30  }