From 7bf117f7c9327ef8fae51c6c5eb091dfde92b241 Mon Sep 17 00:00:00 2001 From: LotP1 Date: Wed, 18 Dec 2024 14:53:01 +0100 Subject: [PATCH] Fix struct name not following C# standards --- src/Ryujinx.BuildValidationTasks/LocaleValidationTask.cs | 4 ++-- src/Ryujinx/Common/LocaleManager.cs | 8 ++++---- src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Ryujinx.BuildValidationTasks/LocaleValidationTask.cs b/src/Ryujinx.BuildValidationTasks/LocaleValidationTask.cs index 0c42f684b..82a6228ac 100644 --- a/src/Ryujinx.BuildValidationTasks/LocaleValidationTask.cs +++ b/src/Ryujinx.BuildValidationTasks/LocaleValidationTask.cs @@ -26,7 +26,7 @@ namespace Ryujinx.BuildValidationTasks data = sr.ReadToEnd(); } - LocalesJSON json = JsonConvert.DeserializeObject(data); + LocalesJson json = JsonConvert.DeserializeObject(data); for (int i = 0; i < json.Locales.Count; i++) { @@ -55,7 +55,7 @@ namespace Ryujinx.BuildValidationTasks return true; } - struct LocalesJSON + struct LocalesJson { public List Languages { get; set; } public List Locales { get; set; } diff --git a/src/Ryujinx/Common/LocaleManager.cs b/src/Ryujinx/Common/LocaleManager.cs index cc668fbcb..909ec2ba0 100644 --- a/src/Ryujinx/Common/LocaleManager.cs +++ b/src/Ryujinx/Common/LocaleManager.cs @@ -158,7 +158,7 @@ namespace Ryujinx.Ava.Common.Locale return null; } - LocalesJSON json = JsonHelper.Deserialize(fileData, LocalesJSONContext.Default.LocalesJSON); + LocalesJson json = JsonHelper.Deserialize(fileData, LocalesJsonContext.Default.LocalesJSON); foreach (LocalesEntry locale in json.Locales) { @@ -186,7 +186,7 @@ namespace Ryujinx.Ava.Common.Locale } } - public struct LocalesJSON + public struct LocalesJson { public List Languages { get; set; } public List Locales { get; set; } @@ -199,6 +199,6 @@ namespace Ryujinx.Ava.Common.Locale } [JsonSourceGenerationOptions(WriteIndented = true)] - [JsonSerializable(typeof(LocalesJSON))] - internal partial class LocalesJSONContext : JsonSerializerContext { } + [JsonSerializable(typeof(LocalesJson))] + internal partial class LocalesJsonContext : JsonSerializerContext { } } diff --git a/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs b/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs index 3dc2b4e33..3f83638cf 100644 --- a/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs +++ b/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs @@ -57,7 +57,7 @@ namespace Ryujinx.Ava.UI.Views.Main string languageJson = EmbeddedResources.ReadAllText(localePath); - LocalesJSON locales = JsonHelper.Deserialize(languageJson, LocalesJSONContext.Default.LocalesJSON); + LocalesJson locales = JsonHelper.Deserialize(languageJson, LocalesJsonContext.Default.LocalesJSON); foreach (string language in locales.Languages) {