Sam Lantinga
4c59063d54
Check for well known XInput device GUIDs before enumerating the device list.
2013-06-07 18:26:55 -07:00
Sam Lantinga
7de1fa00ff
It's better not to have the full range of the axis (by 1 on the negative side) than turn 0 value into -1
2013-06-07 08:48:25 -07:00
Sam Lantinga
0e48e3563b
The triggers should be expanded out to the full range to match DirectInput behavior.
...
The game controller code will scale them back to 0 - 32767 when it converts the triggers axes.
2013-06-06 17:59:01 -07:00
Sam Lantinga
86b3564df2
Hopefully fixed mingw32 build
2013-06-02 08:48:52 -07:00
Sam Lantinga
cd88135edc
Gyrations to get the code to compile with the latest version of mingw-w64 as well as Visual Studio.
...
I think in this case mingw-w64 is incorrect in defining the GUID instead of declaring it like Visual Studio and the older mingw32 compilers.
2013-06-02 01:35:38 -07:00
Sam Lantinga
fbef22a01a
Fixed Visual Studio build
2013-05-26 14:37:41 -07:00
Sam Lantinga
8408ce85ee
Fixed compile errors building with mingw64
2013-05-26 11:34:04 -07:00
Sam Lantinga
0cb6385637
File style cleanup for the SDL 2.0 release
2013-05-18 14:17:52 -07:00
Philipp Wiesemann
e83262a725
Corrected spelling in C source files.
2013-05-01 11:59:54 +02:00
Ryan C. Gordon
4f438b70a2
Make SDL_SetError and friends unconditionally return -1.
...
This lets us change things like this...
if (Failed) {
SDL_SetError("We failed");
return -1;
}
...into this...
if (Failed) {
return SDL_SetError("We failed");
}
Fixes Bugzilla #1778 .
2013-03-31 12:48:50 -04:00
Ryan C. Gordon
8181152c53
Patched to compile on Visual Studio.
2013-03-10 13:36:20 -04:00
Ryan C. Gordon
2e19fefe52
Attempt to get XInput haptics building on Cygwin (or rather, avoid building).
2013-03-10 13:28:39 -04:00
Ryan C. Gordon
3d572bdf89
First shot at Windows XInput haptics.
...
--HG--
extra : rebase_source : 52e691a0917d173e891e67714a135373daea0ef5
2013-03-10 13:05:47 -04:00
Sam Lantinga
c6388c87c1
Changed the name of SDL_mutexP() SDL_mutexV()
2013-03-07 20:12:40 -08:00
Sam Lantinga
69b8182419
The joystick events contain a joystick instance ID, which is a signed value, with -1 being invalid.
2013-03-06 11:59:21 -08:00
Sam Lantinga
541a638836
Fixed compile errors on Windows
2013-03-06 09:45:53 -08:00
Edward Rudd
191718be44
add hint to allow disabling the use of Xinput.
2013-03-05 18:01:59 -05:00
Sam Lantinga
95dcfa4c28
Happy New Year!
2013-02-15 08:47:44 -08:00
Sam Lantinga
f4294fd806
Improvements from Alfred:
...
- Added new SDL_HINT_ALLOW_TOPMOST hint, when set to "0" then never set the topmost bit on a window. Useful when debugging fullscreen issues.
- fixed crash in windows joystick scanning if we failed to load the xinput dll
- added support for SDL_WINDOW_FULLSCREEN_DESKTOP under windows
- synthesize relative mouse movements if directinput fails to send relative moves, happens under virtual box.
2012-12-31 09:30:15 -08:00
Sam Lantinga
89ef9e3168
Changes from Alfred:
...
- rename JoystickGUID -> SDL_JoystickGUID
- change SDL_JoystickGetGUIDString to take the string as an arg, rather than doing a malloc
2012-12-11 11:54:32 -08:00
Ryan C. Gordon
6ac6dd737a
Move all DirectInput code from DI2 to DI8.
...
Fixes failing Haptic subsystem initialization on Windows.
2012-11-29 15:24:56 -05:00
Sam Lantinga
556c764047
Fixed crashes in new joystick code
2012-11-28 11:52:38 -08:00
Sam Lantinga
cf4a5b5570
Alfred Reynolds - add scanning of XInput for controller connectedness so we can detect when the wireless controller turns on and off, the usb side doesn't change when the controller goes away
2012-11-27 09:19:09 -08:00
Sam Lantinga
9ab24950fc
Fixed compiler warnings
2012-11-27 01:09:18 -08:00
Sam Lantinga
03e08a6a79
Organized joystick hotplug code a bit.
...
Cleaned up names, return types, etc.
2012-11-27 00:58:12 -08:00
Sam Lantinga
c9f59a287d
Completed adding new hotplug stubs for the joystick implementations
2012-11-26 22:27:49 -08:00
Sam Lantinga
968ccf93b1
Fixed iOS joystick support for new API
2012-11-26 21:11:28 -08:00
Sam Lantinga
34b88dfaae
Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
2012-11-26 16:37:54 -08:00
Sam Lantinga
f380ecb137
Removed executable bit from source files
2012-09-27 14:35:28 -07:00
Ryan C. Gordon
816523a285
Fixed a bunch of compiler warnings with Cygwin/MingW.
2012-08-24 19:34:28 -04:00
Sam Lantinga
68b32846b8
Fixed bug 1371 - DX joystick axis ordering fix
...
Alex Nankervis 2012-01-15 11:19:45 PST
DirectX joysticks can enumerate their axis out of order. This results in some
joysticks having vertical/horizontal swapped, for example (vertical axis gets
assigned to axis0). Joysticks that I've tested with this problem: XBOX 360
controller, Logitech Extreme 3D Pro.
Attached is a diff that fixes this by sorting the DX joystick objects by their
data offsets into the DX data structs. This puts the joystick objects into a
standard ordering (X axis -> axis0, Y axis -> axis1, and so on).
2012-01-15 15:48:27 -05:00
Sam Lantinga
028e5dcdbd
Happy New Year!
2011-12-31 09:28:07 -05:00
Ryan C. Gordon
8fa65eea5c
Cleaned up CoInitialize() politics on Windows.
2011-08-03 04:22:47 -04:00
Sam Lantinga
b0660ba5ff
SDL 1.3 is now under the zlib license.
2011-04-08 13:03:26 -07:00
Sam Lantinga
e5803d148c
Happy 2011! :)
2011-02-11 22:37:15 -08:00
Sam Lantinga
b4497865bd
Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
...
I think this also fixes the bug relating to non-latin characters in filenames, since UNICODE wasn't defined in SDL_rwops.c
--HG--
rename : src/SDL_android.cpp => src/core/android/SDL_android.cpp
rename : src/SDL_android.h => src/core/android/SDL_android.h
2011-01-24 21:20:30 -08:00
Sam Lantinga
9d25ba272a
Fixed bug #925
...
Changed "win32" to "windows"
--HG--
rename : include/SDL_config_win32.h => include/SDL_config_windows.h
rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h
rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c
rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c
rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h
rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c
rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c
rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c
rename : src/main/win32/version.rc => src/main/windows/version.rc
rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c
rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c
rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c
rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h
rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c
rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h
rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c
rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c
rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h
rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c
rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h
rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c
rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h
rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h
rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c
rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h
rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h
rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h
rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c
rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h
rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c
rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h
rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c
rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h
rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c
rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h
rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c
rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h
rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c
rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h
rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c
rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h
rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c
rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h
rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c
rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h
rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c
rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h
rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-20 18:04:05 -08:00