diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-12-04 22:52:39 -0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-04 22:52:39 -0200 |
| commit | 3615a70cae3f89197fe185dfc5d0a47fa42151d9 (patch) | |
| tree | 8e4737422fba15199c1a6ce7c6345996c0e907b5 /Ryujinx.HLE/HOS/SystemState | |
| parent | 85dbb9559ad317a657dafd24da27fec4b3f5250f (diff) | |
Revert "Adjust naming conventions and general refactoring in HLE Project (#490)" (#526)
This reverts commit 85dbb9559ad317a657dafd24da27fec4b3f5250f.
Diffstat (limited to 'Ryujinx.HLE/HOS/SystemState')
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs | 24 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs | 60 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/UserProfile.cs | 10 |
3 files changed, 47 insertions, 47 deletions
diff --git a/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs b/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs index 3a4fa3c5..274892c0 100644 --- a/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs +++ b/Ryujinx.HLE/HOS/SystemState/AppletStateMgr.cs @@ -6,43 +6,43 @@ namespace Ryujinx.HLE.HOS.SystemState { class AppletStateMgr { - private ConcurrentQueue<MessageInfo> _messages; + private ConcurrentQueue<MessageInfo> Messages; public FocusState FocusState { get; private set; } - public KEvent MessageEvent { get; } + public KEvent MessageEvent { get; private set; } - public AppletStateMgr(Horizon system) + public AppletStateMgr(Horizon System) { - _messages = new ConcurrentQueue<MessageInfo>(); + Messages = new ConcurrentQueue<MessageInfo>(); - MessageEvent = new KEvent(system); + MessageEvent = new KEvent(System); } - public void SetFocus(bool isFocused) + public void SetFocus(bool IsFocused) { - FocusState = isFocused + FocusState = IsFocused ? FocusState.InFocus : FocusState.OutOfFocus; EnqueueMessage(MessageInfo.FocusStateChanged); } - public void EnqueueMessage(MessageInfo message) + public void EnqueueMessage(MessageInfo Message) { - _messages.Enqueue(message); + Messages.Enqueue(Message); MessageEvent.ReadableEvent.Signal(); } - public bool TryDequeueMessage(out MessageInfo message) + public bool TryDequeueMessage(out MessageInfo Message) { - if (_messages.Count < 2) + if (Messages.Count < 2) { MessageEvent.ReadableEvent.Clear(); } - return _messages.TryDequeue(out message); + return Messages.TryDequeue(out Message); } } }
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs b/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs index 74513795..aa96a416 100644 --- a/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs +++ b/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs @@ -48,7 +48,7 @@ namespace Ryujinx.HLE.HOS.SystemState public bool InstallContents { get; set; } - private ConcurrentDictionary<string, UserProfile> _profiles; + private ConcurrentDictionary<string, UserProfile> Profiles; internal UserProfile LastOpenUser { get; private set; } @@ -58,20 +58,20 @@ namespace Ryujinx.HLE.HOS.SystemState SetAudioOutputAsBuiltInSpeaker(); - _profiles = new ConcurrentDictionary<string, UserProfile>(); + Profiles = new ConcurrentDictionary<string, UserProfile>(); - UInt128 defaultUuid = new UInt128("00000000000000000000000000000001"); + UInt128 DefaultUuid = new UInt128("00000000000000000000000000000001"); - AddUser(defaultUuid, "Player"); + AddUser(DefaultUuid, "Player"); - OpenUser(defaultUuid); + OpenUser(DefaultUuid); } - public void SetLanguage(SystemLanguage language) + public void SetLanguage(SystemLanguage Language) { - DesiredLanguageCode = GetLanguageCode((int)language); + DesiredLanguageCode = GetLanguageCode((int)Language); - DesiredTitleLanguage = Enum.Parse<TitleLanguage>(Enum.GetName(typeof(SystemLanguage), language)); + DesiredTitleLanguage = Enum.Parse<TitleLanguage>(Enum.GetName(typeof(SystemLanguage), Language)); } public void SetAudioOutputAsTv() @@ -89,65 +89,65 @@ namespace Ryujinx.HLE.HOS.SystemState ActiveAudioOutput = AudioOutputs[2]; } - public void AddUser(UInt128 uuid, string name) + public void AddUser(UInt128 Uuid, string Name) { - UserProfile profile = new UserProfile(uuid, name); + UserProfile Profile = new UserProfile(Uuid, Name); - _profiles.AddOrUpdate(uuid.ToString(), profile, (key, old) => profile); + Profiles.AddOrUpdate(Uuid.ToString(), Profile, (Key, Old) => Profile); } - public void OpenUser(UInt128 uuid) + public void OpenUser(UInt128 Uuid) { - if (_profiles.TryGetValue(uuid.ToString(), out UserProfile profile)) + if (Profiles.TryGetValue(Uuid.ToString(), out UserProfile Profile)) { - (LastOpenUser = profile).AccountState = OpenCloseState.Open; + (LastOpenUser = Profile).AccountState = OpenCloseState.Open; } } - public void CloseUser(UInt128 uuid) + public void CloseUser(UInt128 Uuid) { - if (_profiles.TryGetValue(uuid.ToString(), out UserProfile profile)) + if (Profiles.TryGetValue(Uuid.ToString(), out UserProfile Profile)) { - profile.AccountState = OpenCloseState.Closed; + Profile.AccountState = OpenCloseState.Closed; } } public int GetUserCount() { - return _profiles.Count; + return Profiles.Count; } - internal bool TryGetUser(UInt128 uuid, out UserProfile profile) + internal bool TryGetUser(UInt128 Uuid, out UserProfile Profile) { - return _profiles.TryGetValue(uuid.ToString(), out profile); + return Profiles.TryGetValue(Uuid.ToString(), out Profile); } internal IEnumerable<UserProfile> GetAllUsers() { - return _profiles.Values; + return Profiles.Values; } internal IEnumerable<UserProfile> GetOpenUsers() { - return _profiles.Values.Where(x => x.AccountState == OpenCloseState.Open); + return Profiles.Values.Where(x => x.AccountState == OpenCloseState.Open); } - internal static long GetLanguageCode(int index) + internal static long GetLanguageCode(int Index) { - if ((uint)index >= LanguageCodes.Length) + if ((uint)Index >= LanguageCodes.Length) { - throw new ArgumentOutOfRangeException(nameof(index)); + throw new ArgumentOutOfRangeException(nameof(Index)); } - long code = 0; - int shift = 0; + long Code = 0; + int Shift = 0; - foreach (char chr in LanguageCodes[index]) + foreach (char Chr in LanguageCodes[Index]) { - code |= (long)(byte)chr << shift++ * 8; + Code |= (long)(byte)Chr << Shift++ * 8; } - return code; + return Code; } } } diff --git a/Ryujinx.HLE/HOS/SystemState/UserProfile.cs b/Ryujinx.HLE/HOS/SystemState/UserProfile.cs index cbf6034d..e08bc48a 100644 --- a/Ryujinx.HLE/HOS/SystemState/UserProfile.cs +++ b/Ryujinx.HLE/HOS/SystemState/UserProfile.cs @@ -7,19 +7,19 @@ namespace Ryujinx.HLE.HOS.SystemState { private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); - public UInt128 Uuid { get; } + public UInt128 Uuid { get; private set; } - public string Name { get; } + public string Name { get; private set; } public long LastModifiedTimestamp { get; private set; } public OpenCloseState AccountState { get; set; } public OpenCloseState OnlinePlayState { get; set; } - public UserProfile(UInt128 uuid, string name) + public UserProfile(UInt128 Uuid, string Name) { - Uuid = uuid; - Name = name; + this.Uuid = Uuid; + this.Name = Name; LastModifiedTimestamp = 0; |
