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>
This commit is contained in:
parent
8be7335176
commit
7f500e7cae
7 changed files with 5001 additions and 8 deletions
25
Ryujinx.HLE/HOS/SystemState/KeyboardLayout.cs
Normal file
25
Ryujinx.HLE/HOS/SystemState/KeyboardLayout.cs
Normal file
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue