From: Solene Rapenne Subject: devel/sdl2 add my controller GUID To: ports@openbsd.org, Thomas Frohwein Date: Sat, 15 Jun 2024 00:42:02 +0200 this diff adds my Xbox One S Controller to sdl2 controller database so it works in chiaki (and maybe other) ok? thanks stsp@ and thfr@ for the hints, I would never have figured it myself! diff --git a/devel/sdl2/Makefile b/devel/sdl2/Makefile index 6da193e097f..ed5916f8f2f 100644 --- a/devel/sdl2/Makefile +++ b/devel/sdl2/Makefile @@ -5,6 +5,7 @@ DISTNAME= SDL2-${V} PKGNAME= sdl2-${V} CATEGORIES= devel SITES= https://www.libsdl.org/release/ +REVISION= 0 SHARED_LIBS= SDL2 0.15 # 2.30.0 diff --git a/devel/sdl2/patches/patch-src_joystick_SDL_gamecontrollerdb_h b/devel/sdl2/patches/patch-src_joystick_SDL_gamecontrollerdb_h index fe9c0792c45..433cf62f0a2 100644 --- a/devel/sdl2/patches/patch-src_joystick_SDL_gamecontrollerdb_h +++ b/devel/sdl2/patches/patch-src_joystick_SDL_gamecontrollerdb_h @@ -1,11 +1,12 @@ Index: src/joystick/SDL_gamecontrollerdb.h --- src/joystick/SDL_gamecontrollerdb.h.orig +++ src/joystick/SDL_gamecontrollerdb.h -@@ -871,6 +871,7 @@ static const char *s_ControllerMappings[] = { +@@ -871,6 +871,8 @@ static const char *s_ControllerMappings[] = { "030000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "030000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,", "030000005e0400008e02000010010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4~,start:b7,x:b2,y:b3,", + "0300d0424c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,", ++ "0300aa4e5e040000ea02000001030000,Xbox One S Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", #endif #if defined(__ANDROID__) "05000000c82d000006500000ffff3f00,8BitDo M30 Gamepad,a:b0,b:b1,back:b4,guide:b17,leftshoulder:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a4,start:b6,x:b2,y:b3,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",