mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2026-03-11 20:45:32 +00:00
Add macOS Joycon mappings
This commit is contained in:
parent
28b85302e4
commit
b0fdaf15df
1 changed files with 10 additions and 2 deletions
|
|
@ -30,6 +30,8 @@ namespace Ryujinx.SDL3.Common
|
|||
|
||||
private const string JoyconLeftMappingLinux = "050067007e0500000620000001800000,Nintendo Switch Joy-Con (L),platform:Linux,back:b5,dpdown:b8,dpleft:b9,dpright:b10,dpup:b7,leftshoulder:b1,leftstick:b6,lefttrigger:b3,leftx:a1,lefty:a0,misc1:b0,paddle2:b2,paddle4:b4,";
|
||||
private const string JoyconRightMappingLinux = "05006ea07e0500000720000001800000,Nintendo Switch Joy-Con (R),platform:Linux,a:b0,b:b1,guide:b9,leftx:a1,lefty:a0,paddle1:b6,paddle3:b4,rightshoulder:b5,rightstick:b10,righttrigger:b7,start:b8,x:b3,y:b2,";
|
||||
private const string JoyconLeftMappingMac = "050067007e0500000620000001006801,Nintendo Switch Joy-Con (L),platform:macOS,back:b6,dpdown:b1,dpleft:b0,dpright:b3,dpup:b2,leftshoulder:b13,leftstick:b7,lefttrigger:b15,leftx:a0,lefty:a1~,misc1:b5,paddle2:b9,paddle4:b10,";
|
||||
private const string JoyconRightMappingMac = "05006ea07e0500000720000001006802,Nintendo Switch Joy-Con (R),platform:macOS,a:b2,b:b0,guide:b5,leftx:a0~,lefty:a1,paddle1:b10,paddle3:b9,rightshoulder:b12,rightstick:b7,righttrigger:b14,start:b6,x:b3,y:b1,";
|
||||
|
||||
private bool _isRunning;
|
||||
private uint _refereceCount;
|
||||
|
|
@ -100,10 +102,16 @@ namespace Ryujinx.SDL3.Common
|
|||
SDL_SetEventEnabled((uint)SDL_EventType.SDL_EVENT_GAMEPAD_SENSOR_UPDATE, false);
|
||||
|
||||
if (SDL_AddGamepadMapping(JoyconLeftMappingLinux) == -1) {
|
||||
Logger.Error?.Print(LogClass.Hid, $"Could not set SDL Joycon (L) mappings");
|
||||
Logger.Warning?.Print(LogClass.Hid, $"Could not set SDL Joycon (L) mappings");
|
||||
}
|
||||
if (SDL_AddGamepadMapping(JoyconRightMappingLinux) == -1) {
|
||||
Logger.Error?.Print(LogClass.Hid, $"Could not set SDL Joycon (R) mappings");
|
||||
Logger.Warning?.Print(LogClass.Hid, $"Could not set SDL Joycon (R) mappings");
|
||||
}
|
||||
if (SDL_AddGamepadMapping(JoyconLeftMappingMac) == -1) {
|
||||
Logger.Warning?.Print(LogClass.Hid, $"Could not set SDL Joycon (L) mappings");
|
||||
}
|
||||
if (SDL_AddGamepadMapping(JoyconRightMappingMac) == -1) {
|
||||
Logger.Warning?.Print(LogClass.Hid, $"Could not set SDL Joycon (R) mappings");
|
||||
}
|
||||
|
||||
string gamepadDbPath = Path.Combine(AppDataManager.BaseDirPath, "SDL_GameControllerDB.txt");
|
||||
|
|
|
|||
Loading…
Reference in a new issue