diff options
author | Mary-nyan <mary@mary.zone> | 2022-11-24 20:13:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-24 20:13:16 +0100 |
commit | 548bfd60a2468aa6258675efae5ed21102985cc6 (patch) | |
tree | ddd0271286d5d338ca204499b6d0d4ae73e4bd3c /Ryujinx.SDL2.Common/SDL2Driver.cs | |
parent | 65778a6b78ab8bde4090478482227e40c551db4d (diff) |
chore: Update Ryujinx.SDL2-CS to 2.24.2 (#3892)1.1.383
* chore: Update Ryujinx.SDL2-CS to 2.24.2
* Disable SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS
Diffstat (limited to 'Ryujinx.SDL2.Common/SDL2Driver.cs')
-rw-r--r-- | Ryujinx.SDL2.Common/SDL2Driver.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Ryujinx.SDL2.Common/SDL2Driver.cs b/Ryujinx.SDL2.Common/SDL2Driver.cs index fbf2b64a..4a30523c 100644 --- a/Ryujinx.SDL2.Common/SDL2Driver.cs +++ b/Ryujinx.SDL2.Common/SDL2Driver.cs @@ -43,6 +43,8 @@ namespace Ryujinx.SDL2.Common private SDL2Driver() {} + private const string SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS = "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"; + public void Initialize() { lock (_lock) @@ -60,6 +62,11 @@ namespace Ryujinx.SDL2.Common SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED, "0"); SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "1"); + + // NOTE: As of SDL2 2.24.0, joycons are combined by default but the motion source only come from one of them. + // We disable this behavior for now. + SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS, "0"); + if (SDL_Init(SdlInitFlags) != 0) { string errorMessage = $"SDL2 initlaization failed with error \"{SDL_GetError()}\""; |