From 03bbbcd85e503d7f142abf8981330dc993ebe6ac Mon Sep 17 00:00:00 2001 From: Pierre Wendling Date: Sun, 18 Sep 2022 09:06:36 -0400 Subject: [PATCH] N3DS: Use CreateJoystickGUIDForName. --- src/joystick/SDL_gamecontrollerdb.h | 2 +- src/joystick/n3ds/SDL_sysjoystick.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/joystick/SDL_gamecontrollerdb.h b/src/joystick/SDL_gamecontrollerdb.h index a39a46d37..28afddb53 100644 --- a/src/joystick/SDL_gamecontrollerdb.h +++ b/src/joystick/SDL_gamecontrollerdb.h @@ -979,7 +979,7 @@ static const char *s_ControllerMappings [] = "0000000050535669746120436f6e7400,PSVita Controller,crc:d598,a:b2,b:b1,back:b10,dpdown:b6,dpleft:b7,dpright:b9,dpup:b8,leftshoulder:b4,leftstick:b14,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,", #endif #if SDL_JOYSTICK_N3DS - "4e696e74656e646f20334453206d6170,Nintendo 3DS,a:b0,b:b1,back:b2,dpdown:b7,dpleft:b5,dpright:b4,dpup:b6,leftshoulder:b9,leftstick:b14,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b15,rightx:a2,righty:a3,start:b3,x:b10,y:b11,", + "000010324e696e74656e646f20334400,Nintendo 3DS,a:b0,b:b1,back:b2,dpdown:b7,dpleft:b5,dpright:b4,dpup:b6,leftshoulder:b9,leftstick:b14,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b15,rightx:a2,righty:a3,start:b3,x:b10,y:b11,", #endif "hidapi,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,", NULL diff --git a/src/joystick/n3ds/SDL_sysjoystick.c b/src/joystick/n3ds/SDL_sysjoystick.c index f2f15c16b..f65626290 100644 --- a/src/joystick/n3ds/SDL_sysjoystick.c +++ b/src/joystick/n3ds/SDL_sysjoystick.c @@ -96,8 +96,7 @@ N3DS_JoystickGetCount(void) static SDL_JoystickGUID N3DS_JoystickGetDeviceGUID(int device_index) { - /* GUID corresponds to the name "Nintendo 3DS map" */ - SDL_JoystickGUID guid = { { 0x4e, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x6f, 0x20, 0x33, 0x44, 0x53, 0x20, 0x6d, 0x61, 0x70 } }; + SDL_JoystickGUID guid = SDL_CreateJoystickGUIDForName("Nintendo 3DS"); return guid; }