From 8ab5d8b898c1c163481b0eb63c5daa5dbc272969 Mon Sep 17 00:00:00 2001 From: Starlet Date: Tue, 14 Aug 2018 15:32:31 -0400 Subject: [PATCH] Add commit string in resources. --- .gitignore | 3 + Ryujinx/Properties/Resources.Designer.cs | 73 +++++++++++++ Ryujinx/Properties/Resources.resx | 124 +++++++++++++++++++++++ Ryujinx/Ryujinx.csproj | 23 +++++ Ryujinx/Ui/GLScreen.cs | 2 +- 5 files changed, 224 insertions(+), 1 deletion(-) create mode 100644 Ryujinx/Properties/Resources.Designer.cs create mode 100644 Ryujinx/Properties/Resources.resx diff --git a/.gitignore b/.gitignore index 123f46184d..c1d2f51ce2 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,6 @@ $RECYCLE.BIN/ # VS Launch Settings launchSettings.json + +# Commit String +CurrentCommit.txt \ No newline at end of file diff --git a/Ryujinx/Properties/Resources.Designer.cs b/Ryujinx/Properties/Resources.Designer.cs new file mode 100644 index 0000000000..ba892533d3 --- /dev/null +++ b/Ryujinx/Properties/Resources.Designer.cs @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Ryujinx.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Ryujinx.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to 17f54b5 + ///. + /// + public static string CurrentCommit { + get { + return ResourceManager.GetString("CurrentCommit", resourceCulture); + } + } + } +} diff --git a/Ryujinx/Properties/Resources.resx b/Ryujinx/Properties/Resources.resx new file mode 100644 index 0000000000..8d9611a832 --- /dev/null +++ b/Ryujinx/Properties/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\CurrentCommit.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + \ No newline at end of file diff --git a/Ryujinx/Ryujinx.csproj b/Ryujinx/Ryujinx.csproj index ad132ada4a..322042e9c7 100644 --- a/Ryujinx/Ryujinx.csproj +++ b/Ryujinx/Ryujinx.csproj @@ -7,6 +7,10 @@ true + + + + @@ -19,10 +23,29 @@ + + + True + True + Resources.resx + + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + PreserveNewest + + + + diff --git a/Ryujinx/Ui/GLScreen.cs b/Ryujinx/Ui/GLScreen.cs index dfc0b9a418..bb42a88866 100644 --- a/Ryujinx/Ui/GLScreen.cs +++ b/Ryujinx/Ui/GLScreen.cs @@ -259,7 +259,7 @@ namespace Ryujinx double HostFps = Ns.Statistics.GetSystemFrameRate(); double GameFps = Ns.Statistics.GetGameFrameRate(); - NewTitle = $"Ryujinx | Host FPS: {HostFps:0.0} | Game FPS: {GameFps:0.0}"; + NewTitle = $"Ryujinx [{Properties.Resources.CurrentCommit}] | Host FPS: {HostFps:0.0} | Game FPS: {GameFps:0.0}"; TitleEvent = true;