Commit Graph

4 Commits

Author SHA1 Message Date
Sam Lantinga
64180d2261 Fixed bug 3138 - c_dfDIJoystick2 already defined in dinput8.lib
Machiel van Hooren

In SDL_dxjoystick.c line 349 there is a constant c_dfDIJoystick2.
However, this constant is aparently also defined in dinput8.lib.

I encountered a linking error when statically linking to SDL:
SDL2_static.lib(SDL_dxjoystick.obj) : error LNK2005: _c_dfDIJoystick2 already defined in dinput8.lib
My application is also linking to dinput8.lib because we rolled our own joystick input and are not using the joystick functionality from SDL.
2016-10-01 14:05:35 -07:00
Mikkel Krautz
a21e6af514 Add Xbox One controller GUIDs to the XInput filter in the DirectInput joystick driver.
The Windows 10 Anniversary Update (1607) breaks the method uses that SDL uses to
detect XInput devices. That is, on Windows 10 Anniversary Update, it is no longer
possible to query RAWINPUT for HID devices, and check for "IG_" in the device name.

Presumably, this will be fixed in the future.

This patch works around the issue by adding the Xbox One controller series to the
well-known device list.

This skips the more expensive RAWINPUT check for those devices, and causes them to
be detected as XInput devices once again.
2016-08-06 15:09:20 +02:00
Sam Lantinga
42065e785d Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Philipp Wiesemann
0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00