diff options
| author | plutoo <plutooo@users.noreply.github.com> | 2020-05-05 11:50:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-05 20:50:53 +0200 |
| commit | 7f500e7cae940958289abe1a3461e52684742053 (patch) | |
| tree | d9741ec47df879130555e8fb892f9ad42f982761 /Ryujinx.HLE/HOS/SystemState | |
| parent | 8be73351762f44620417b0dbe15129d8c00af6e1 (diff) | |
set: Quick implementation of GetKeyCodeMap/GetKeyCodeMap2 (#1210)
* set: Quick implementation of GetKeyCodeMap/GetKeyCodeMap2
This fixed USB keyboard access in official titles.
* hid: Stub SendKeyboardLockKeyEvent
* Update Ryujinx.HLE/HOS/Services/Settings/ISettingsServer.cs
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Update Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* set: KeyboardLayout bringup
* set: Small bugfix
* Fix GetKeyCodeMapImpl
* Revert SystemRegion > RegionCode in Configuration
* Fix SendKeyboardLockKeyEvent
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Diffstat (limited to 'Ryujinx.HLE/HOS/SystemState')
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/KeyboardLayout.cs | 25 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/RegionCode.cs (renamed from Ryujinx.HLE/HOS/SystemState/SystemRegion.cs) | 5 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs | 7 |
3 files changed, 34 insertions, 3 deletions
diff --git a/Ryujinx.HLE/HOS/SystemState/KeyboardLayout.cs b/Ryujinx.HLE/HOS/SystemState/KeyboardLayout.cs new file mode 100644 index 00000000..ba35ea6b --- /dev/null +++ b/Ryujinx.HLE/HOS/SystemState/KeyboardLayout.cs @@ -0,0 +1,25 @@ +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/SystemRegion.cs b/Ryujinx.HLE/HOS/SystemState/RegionCode.cs index 9a07a4a8..dd6ed8fa 100644 --- a/Ryujinx.HLE/HOS/SystemState/SystemRegion.cs +++ b/Ryujinx.HLE/HOS/SystemState/RegionCode.cs @@ -1,6 +1,7 @@ namespace Ryujinx.HLE.HOS.SystemState { - public enum SystemRegion + // nn::settings::RegionCode + public enum RegionCode { Japan, USA, @@ -13,4 +14,4 @@ namespace Ryujinx.HLE.HOS.SystemState Min = Japan, Max = Taiwan } -}
\ No newline at end of file +} diff --git a/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs b/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs index b65d1030..53b20955 100644 --- a/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs +++ b/Ryujinx.HLE/HOS/SystemState/SystemStateMgr.cs @@ -35,6 +35,8 @@ namespace Ryujinx.HLE.HOS.SystemState "AudioBuiltInSpeakerOutput" }; + internal long DesiredKeyboardLayout { get; private set; } + internal long DesiredLanguageCode { get; private set; } internal uint DesiredRegionCode { get; private set; } @@ -59,6 +61,9 @@ namespace Ryujinx.HLE.HOS.SystemState Account.AddUser(DefaultUserId, "Player"); Account.OpenUser(DefaultUserId); + + // TODO: Let user specify. + DesiredKeyboardLayout = (long)KeyboardLayout.Default; } public void SetLanguage(SystemLanguage language) @@ -81,7 +86,7 @@ namespace Ryujinx.HLE.HOS.SystemState } } - public void SetRegion(SystemRegion region) + public void SetRegion(RegionCode region) { DesiredRegionCode = (uint)region; } |
