diff --git a/cmake/SelectPcsx2Plugins.cmake b/cmake/SelectPcsx2Plugins.cmake index 91897563fd..2abb60fcee 100644 --- a/cmake/SelectPcsx2Plugins.cmake +++ b/cmake/SelectPcsx2Plugins.cmake @@ -168,8 +168,6 @@ set(PadNull TRUE) #--------------------------------------- # requires: -SDL #--------------------------------------- -# FIXME: internal sdl does not like X11 input with dynamic feature (SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT) -if(NOT FORCE_INTERNAL_SDL) if(SDL_FOUND) set(onepad TRUE) else(SDL_FOUND) @@ -177,9 +175,6 @@ else(SDL_FOUND) message(STATUS "Skip build of onepad: miss some dependencies") message(STATUS "${msg_dep_onepad}") endif(SDL_FOUND) -else(NOT FORCE_INTERNAL_SDL) - message(STATUS "Skip build of onepad not compatible with internal SDL") -endif(NOT FORCE_INTERNAL_SDL) #--------------------------------------- #--------------------------------------- @@ -187,8 +182,6 @@ endif(NOT FORCE_INTERNAL_SDL) #--------------------------------------- # requires: -SDL #--------------------------------------- -# FIXME: internal sdl does not like X11 input with dynamic feature (SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT) -if(NOT FORCE_INTERNAL_SDL) if(SDL_FOUND) set(zeropad TRUE) else(SDL_FOUND) @@ -196,9 +189,6 @@ else(SDL_FOUND) message(STATUS "Skip build of zeropad: miss some dependencies") message(STATUS "${msg_dep_zeropad}") endif(SDL_FOUND) -else(NOT FORCE_INTERNAL_SDL) - message(STATUS "Skip build of zeropad not compatible with internal SDL") -endif(NOT FORCE_INTERNAL_SDL) #--------------------------------------- #--------------------------------------- diff --git a/plugins/onepad/joystick.cpp b/plugins/onepad/joystick.cpp index 8fe47ab420..9ad0b1c3f2 100644 --- a/plugins/onepad/joystick.cpp +++ b/plugins/onepad/joystick.cpp @@ -72,7 +72,16 @@ void JoystickInfo::EnumerateJoysticks(vector& vjoysticks) if (!s_bSDLInit) { +#if SDL_VERSION_ATLEAST(1,3,0) + // SDL in 3rdparty wrap X11 call. In order to get x11 symbols loaded + // video must be loaded too. + // Example of X11 symbol are XAutoRepeatOn/XAutoRepeatOff + // Just to play it safe I separate 1.2 and 1.3 but I think it will be + // fine in 1.2 too -- greg + if (SDL_Init(SDL_INIT_JOYSTICK|SDL_INIT_VIDEO) < 0) return; +#else if (SDL_Init(SDL_INIT_JOYSTICK) < 0) return; +#endif SDL_JoystickEventState(SDL_QUERY); s_bSDLInit = true; } diff --git a/plugins/zeropad/joystick.cpp b/plugins/zeropad/joystick.cpp index fa43d0ebb2..d1f680f904 100644 --- a/plugins/zeropad/joystick.cpp +++ b/plugins/zeropad/joystick.cpp @@ -79,7 +79,16 @@ void JoystickInfo::EnumerateJoysticks(vector& vjoysticks) if (!s_bSDLInit) { +#if SDL_VERSION_ATLEAST(1,3,0) + // SDL in 3rdparty wrap X11 call. In order to get x11 symbols loaded + // video must be loaded too. + // Example of X11 symbol are XAutoRepeatOn/XAutoRepeatOff + // Just to play it safe I separate 1.2 and 1.3 but I think it will be + // fine in 1.2 too -- greg + if (SDL_Init(SDL_INIT_JOYSTICK|SDL_INIT_VIDEO) < 0) return; +#else if (SDL_Init(SDL_INIT_JOYSTICK) < 0) return; +#endif SDL_JoystickEventState(SDL_QUERY); s_bSDLInit = true; }