$OpenBSD$

enable GameController API the Linux way (by posing as Xbox360 controller)
- note: the actual Xbox360 controller has buttons and axes messed up
        on openbsd with these mappings, but "normal" controllers work

Index: src/joystick/SDL_gamecontroller.c
--- src/joystick/SDL_gamecontroller.c.orig
+++ src/joystick/SDL_gamecontroller.c
@@ -884,17 +884,17 @@ static ControllerMapping_t *SDL_PrivateGetControllerMa
 #else
     (void) s_pEmscriptenMapping;  /* pacify ARMCC */
 #endif
-#ifdef __LINUX__
+#if defined(__LINUX__) || defined(__OpenBSD__)
     if (!mapping && name) {
-        if (SDL_strstr(name, "Xbox 360 Wireless Receiver")) {
+        //if (SDL_strstr(name, "Xbox 360 Wireless Receiver")) {
             /* The Linux driver xpad.c maps the wireless dpad to buttons */
             SDL_bool existing;
             mapping = SDL_PrivateAddMappingForGUID(guid,
 "none,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
                           &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT);
-        }
+        //}
     }
-#endif /* __LINUX__ */
+#endif /* __LINUX__ || __OpenBSD__ */
 
     if (!mapping && name) {
         if (SDL_strstr(name, "Xbox") || SDL_strstr(name, "X-Box") || SDL_strstr(name, "XBOX")) {
