diff options
| author | TSR Berry <20988865+TSRBerry@users.noreply.github.com> | 2023-04-08 01:22:00 +0200 |
|---|---|---|
| committer | Mary <thog@protonmail.com> | 2023-04-27 23:51:14 +0200 |
| commit | cee712105850ac3385cd0091a923438167433f9f (patch) | |
| tree | 4a5274b21d8b7f938c0d0ce18736d3f2993b11b1 /Ryujinx.HLE/HOS/SystemState | |
| parent | cd124bda587ef09668a971fa1cac1c3f0cfc9f21 (diff) | |
Move solution and projects to src
Diffstat (limited to 'Ryujinx.HLE/HOS/SystemState')
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs | 42 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/ColorSet.cs | 8 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/KeyboardLayout.cs | 25 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/RegionCode.cs | 17 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/SystemLanguage.cs | 24 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs | 90 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/TitleLanguage.cs | 22 |
7 files changed, 0 insertions, 228 deletions
diff --git a/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs b/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs deleted file mode 100644 index 5704ef4b..00000000 --- a/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Ryujinx.HLE.HOS.Kernel.Threading; -using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy; -using System.Collections.Concurrent; - -namespace Ryujinx.HLE.HOS.SystemState -{ - class AppletStateMgr - { - public ConcurrentQueue<AppletMessage> Messages { get; } - - public FocusState FocusState { get; private set; } - - public KEvent MessageEvent { get; } - - public IdDictionary AppletResourceUserIds { get; } - - public IdDictionary IndirectLayerHandles { get; } - - public AppletStateMgr(Horizon system) - { - Messages = new ConcurrentQueue<AppletMessage>(); - MessageEvent = new KEvent(system.KernelContext); - - AppletResourceUserIds = new IdDictionary(); - IndirectLayerHandles = new IdDictionary(); - } - - public void SetFocus(bool isFocused) - { - FocusState = isFocused ? FocusState.InFocus : FocusState.OutOfFocus; - - Messages.Enqueue(AppletMessage.FocusStateChanged); - - if (isFocused) - { - Messages.Enqueue(AppletMessage.ChangeIntoForeground); - } - - MessageEvent.ReadableEvent.Signal(); - } - } -}
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/SystemState/ColorSet.cs b/Ryujinx.HLE/HOS/SystemState/ColorSet.cs deleted file mode 100644 index 4d7a7e2f..00000000 --- a/Ryujinx.HLE/HOS/SystemState/ColorSet.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Ryujinx.HLE.HOS.SystemState -{ - public enum ColorSet - { - BasicWhite = 0, - BasicBlack = 1 - } -} diff --git a/Ryujinx.HLE/HOS/SystemState/KeyboardLayout.cs b/Ryujinx.HLE/HOS/SystemState/KeyboardLayout.cs deleted file mode 100644 index ba35ea6b..00000000 --- a/Ryujinx.HLE/HOS/SystemState/KeyboardLayout.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace Ryujinx.HLE.HOS.SystemState -{ - // nn::settings::KeyboardLayout - public enum KeyboardLayout - { - Default = 0, - EnglishUs, - EnglishUsInternational, - EnglishUk, - French, - FrenchCa, - Spanish, - SpanishLatin, - German, - Italian, - Portuguese, - Russian, - Korean, - ChineseSimplified, - ChineseTraditional, - - Min = Default, - Max = ChineseTraditional - } -} diff --git a/Ryujinx.HLE/HOS/SystemState/RegionCode.cs b/Ryujinx.HLE/HOS/SystemState/RegionCode.cs deleted file mode 100644 index dd6ed8fa..00000000 --- a/Ryujinx.HLE/HOS/SystemState/RegionCode.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Ryujinx.HLE.HOS.SystemState -{ - // nn::settings::RegionCode - public enum RegionCode - { - Japan, - USA, - Europe, - Australia, - China, - Korea, - Taiwan, - - Min = Japan, - Max = Taiwan - } -} diff --git a/Ryujinx.HLE/HOS/SystemState/SystemLanguage.cs b/Ryujinx.HLE/HOS/SystemState/SystemLanguage.cs deleted file mode 100644 index 3f755105..00000000 --- a/Ryujinx.HLE/HOS/SystemState/SystemLanguage.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace Ryujinx.HLE.HOS.SystemState -{ - public enum SystemLanguage - { - Japanese, - AmericanEnglish, - French, - German, - Italian, - Spanish, - Chinese, - Korean, - Dutch, - Portuguese, - Russian, - Taiwanese, - BritishEnglish, - CanadianFrench, - LatinAmericanSpanish, - SimplifiedChinese, - TraditionalChinese, - BrazilianPortuguese - } -}
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs b/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs deleted file mode 100644 index 6627700f..00000000 --- a/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; - -namespace Ryujinx.HLE.HOS.SystemState -{ - public class SystemStateMgr - { - internal static string[] LanguageCodes = new string[] - { - "ja", - "en-US", - "fr", - "de", - "it", - "es", - "zh-CN", - "ko", - "nl", - "pt", - "ru", - "zh-TW", - "en-GB", - "fr-CA", - "es-419", - "zh-Hans", - "zh-Hant", - "pt-BR" - }; - - internal long DesiredKeyboardLayout { get; private set; } - - internal SystemLanguage DesiredSystemLanguage { get; private set; } - - internal long DesiredLanguageCode { get; private set; } - - internal uint DesiredRegionCode { get; private set; } - - public TitleLanguage DesiredTitleLanguage { get; private set; } - - public bool DockedMode { get; set; } - - public ColorSet ThemeColor { get; set; } - - public string DeviceNickName { get; set; } - - public SystemStateMgr() - { - // TODO: Let user specify fields. - DesiredKeyboardLayout = (long)KeyboardLayout.Default; - DeviceNickName = "Ryujinx's Switch"; - } - - public void SetLanguage(SystemLanguage language) - { - DesiredSystemLanguage = language; - DesiredLanguageCode = GetLanguageCode((int)DesiredSystemLanguage); - - DesiredTitleLanguage = language switch - { - SystemLanguage.Taiwanese or - SystemLanguage.TraditionalChinese => TitleLanguage.TraditionalChinese, - SystemLanguage.Chinese or - SystemLanguage.SimplifiedChinese => TitleLanguage.SimplifiedChinese, - _ => Enum.Parse<TitleLanguage>(Enum.GetName<SystemLanguage>(language)), - }; - } - - public void SetRegion(RegionCode region) - { - DesiredRegionCode = (uint)region; - } - - internal static long GetLanguageCode(int index) - { - if ((uint)index >= LanguageCodes.Length) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - - long code = 0; - int shift = 0; - - foreach (char chr in LanguageCodes[index]) - { - code |= (long)(byte)chr << shift++ * 8; - } - - return code; - } - } -}
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/SystemState/TitleLanguage.cs b/Ryujinx.HLE/HOS/SystemState/TitleLanguage.cs deleted file mode 100644 index c612259b..00000000 --- a/Ryujinx.HLE/HOS/SystemState/TitleLanguage.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace Ryujinx.HLE.HOS.SystemState -{ - public enum TitleLanguage - { - AmericanEnglish, - BritishEnglish, - Japanese, - French, - German, - LatinAmericanSpanish, - Spanish, - Italian, - Dutch, - CanadianFrench, - Portuguese, - Russian, - Korean, - TraditionalChinese, - SimplifiedChinese, - BrazilianPortuguese - } -} |
