Sam Lantinga
7267ea8f8b
Christoph Mallon: Use SDL_arraysize()
2013-08-29 08:26:55 -07:00
Sam Lantinga
9e23d17869
Christoph Mallon: Simplify assignment.
2013-08-29 08:26:24 -07:00
Sam Lantinga
67c10169ee
Christoph Mallon: Report an error, if creating the directories in SDL_GetPrefPath() failed.
2013-08-29 08:25:54 -07:00
Sam Lantinga
db7c92b4b4
Christoph Mallon: Remove lone /* if */ comment.
2013-08-29 08:25:24 -07:00
Sam Lantinga
321aa4ae10
Christoph Mallon: Simplify avoidance of duplicate / in SDL_GetPrefPath()
2013-08-29 08:24:43 -07:00
Ryan C. Gordon
257cef3024
Change order we enumerate Windows joysticks.
...
Make it so XInput devices are listed before DirectInput devices, and that the XInput
devices are sorted by userid in ascending numeric order (so device 0 comes first).
2013-08-28 22:09:17 -04:00
Ryan C. Gordon
ea4350d821
Don't corrupt XInput device state during SDL_SYS_JoystickClose().
2013-08-28 22:07:54 -04:00
Ryan C. Gordon
2538d31140
Fix endlines for logging via OutputDebugString().
2013-08-28 22:05:16 -04:00
Ryan C. Gordon
aa65211486
Make XInput joystick names match the numbers on the device.
...
(And how the Haptic code already names them.)
2013-08-28 17:17:21 -04:00
Ryan C. Gordon
7949989884
Fixed comment typo.
2013-08-28 17:12:07 -04:00
Ryan C. Gordon
4b255c63f1
Reworked XInput and DirectInput joystick code.
...
Now multiple XInput controllers map correctly to device indexes instead of grabbing
the first available userid, and are completely separated out from DirectInput.
Also, the hardcoded limitation on number of DirectInput devices is gone. I don't
expect there to really ever be more than eight joysticks plugged into a machine, but
it was a leftover limitation for a static array we didn't actually use anymore.
Fixes Bugzilla #1984 . (etc?)
2013-08-28 16:43:47 -04:00
Ryan C. Gordon
c89e04694d
Better XInput detection code for DirectInput device enumeration.
...
This code is way faster than the Wbem code, and less ugly.
2013-08-28 16:35:32 -04:00
Gabriel Jacobo
ad20c801cb
Fixes typo in EGL code (thanks jmcfarlane!)
2013-08-26 14:23:18 -03:00
Ryan C. Gordon
2abe45e8cb
Removed obvious comment to trigger buildbot.
2013-08-25 21:28:03 -04:00
Edward Rudd
833fd30eb8
reworked GetBasePath on OS X to use Contents/Resource by default if bundled, or exedir if not bundled.
...
- also adds OS X specific magic for bundled apps adding an Info.plist property of name SDL_FILESYSTEM_BASE_DIR_TYPE to the following values will change the bahaviour.
* bundle -- use the bundle directory e.g. "/Applications/MyGame/Blah.app/"
* parent -- use the bundle parent directory e.g. "/Applications/MyGame/"
* resource -- use the bundle resource directory (default) e.g. "/Applications/MyGame/Blah.app/Contents/Resources/"
2013-08-25 11:24:01 -04:00
Gabriel Jacobo
64e6eeac7f
Fixes "error: conflicting types for 'GLintptr'"
2013-08-25 11:48:49 -03:00
Ryan C. Gordon
c9c6852f84
Minor FreeBSD code cleanup.
2013-08-24 21:15:10 -04:00
Edward Rudd
e5b65e4e03
Fix #2062 Be more diligent about validating trailing "/" existence in HOME and XDG_DATA_HOME env vars
2013-08-24 09:05:18 -04:00
Ryan C. Gordon
58a558e326
Patched to compile on Solaris.
2013-08-23 23:34:23 -04:00
Ryan C. Gordon
88cd94a0eb
Patched to compile on FreeBSD.
2013-08-23 21:48:40 -04:00
Ryan C. Gordon
97948aef66
Add support for some BSDs and Solaris to SDL_GetBasePath().
2013-08-23 21:38:54 -04:00
Gabriel Jacobo
f60bcf8b50
Fix warning in GL ES2 renderer
2013-08-22 17:26:22 -03:00
Ryan C. Gordon
faf760d203
XAudio2/DirectSound: Use the usual Windows string convert (thanks, Norfanin!).
2013-08-22 13:32:27 -04:00
Sam Lantinga
cd27a1ef05
Fixed compiling on old versions of the DirectX SDK
2013-08-21 12:12:04 -07:00
Sam Lantinga
9faefccd48
SDL
...
- detect that you tried to open a gamecontroller in xinput mode and failed, then re-get the mapping for the dinput variant you did open (and most likely now just fail the open)
CR: SamL
2013-08-21 10:32:04 -07:00
Sam Lantinga
05d8c2dcd2
Fix SDL xinput code to work at all when xinput has devices at high indexes but no device connected at lower index, for instance 0->disconnected, 1->wireles, 2->wired. Previously the SDL code assumed the indexes were always used up in order which is not true at all and lead to a bunch of failure cases where controllers would go unrecognized.
...
This entire function is kind of a mess and more complicated than needed, but I don't want to refactor it too heavily tonight. May look at improving how the indexes are assigned more significanly later. The way it handles not finding a valid "gamepad" type device is also super broken, it leaves in place the xinput bindings but opens the controller with dinput and ends up with completely wrong mappings, not solving that now, but fixing the bug where we'd very frequently not find a controller due to gaps in assigned player numbers should mostly avoid it.
2013-08-21 10:31:44 -07:00
Sam Lantinga
3d217ed7b5
Fixed crash if the IC isn't set up for some reason (bad X11 locale?)
2013-08-21 10:07:48 -07:00
Gabriel Jacobo
6107705a40
Fix a couple of warnings
2013-08-21 10:34:32 -03:00
Gabriel Jacobo
5f8de2b936
Patched to compile on Darwin
2013-08-21 10:27:39 -03:00
Gabriel Jacobo
29dfdd1edc
More fixes for -Wdeclaration-after-statement
2013-08-21 10:13:12 -03:00
Gabriel Jacobo
2490166d2d
Fixes for -Wdeclaration-after-statement
2013-08-21 10:12:16 -03:00
Gabriel Jacobo
1e49b1ed6e
OCD fixes: Adds a space after /* (glory to regular expressions!)
2013-08-21 09:47:10 -03:00
Gabriel Jacobo
695344d163
OCD fixes: Adds a space before */
2013-08-21 09:43:09 -03:00
Ryan C. Gordon
3984c7d8e3
Actually, this should be a memcpy().
...
We already know the exact length we just allocated, and we plan to append
our own null terminator to the end of the copy, so this makes more sense.
2013-08-20 23:20:32 -04:00
Ryan C. Gordon
9ff379ba67
Patched to compile on iOS.
2013-08-20 21:21:57 -04:00
Ryan C. Gordon
fb7a02912a
More Haiku fixes.
2013-08-20 20:39:22 -04:00
Ryan C. Gordon
24006be288
Fixed compiler warning.
2013-08-20 20:31:57 -04:00
Ryan C. Gordon
ad8aa33bce
More Windows fixes for filesystem code.
2013-08-20 20:29:30 -04:00
Ryan C. Gordon
c9152adcb0
Patched new filesystem code to compile.
2013-08-20 20:15:15 -04:00
Ryan C. Gordon
2dd7091e50
Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module.
2013-08-20 19:57:11 -04:00
Gabriel Jacobo
552b04c58a
More non C89 compliant comments
2013-08-20 20:34:40 -03:00
Gabriel Jacobo
63fe3a7753
Fixes a few non C89 compliant comments
2013-08-20 19:49:24 -03:00
Ryan C. Gordon
e43ff8fb59
Added some FIXMEs for later.
2013-08-20 12:43:06 -04:00
Gabriel Jacobo
0eeb76d869
Fixes bug #2037 , common EGL code for Android and X11
2013-08-19 16:29:46 -03:00
Ryan C. Gordon
b44267693d
Fixed leaking of pixel shader object in D3D renderer (thanks, Peter!).
...
Fixes Bugzilla #2047 .
2013-08-19 11:02:44 -04:00
Sam Lantinga
c2a29aede9
Fixed Haiku build (thanks Alexander!)
2013-08-18 22:05:53 -07:00
Ryan C. Gordon
7e3b7dbcb6
Patched to compile with Visual Studio.
2013-08-17 20:46:34 -04:00
Sam Lantinga
1455a94714
Fixed Windows build
2013-08-17 17:14:15 -07:00
Sam Lantinga
d7817f424b
Fixed for consistency with the other platforms
2013-08-17 17:04:14 -07:00
Edward Rudd
e187810eca
auto init the ticks if the GetTicks and the like methods are called before SDL_Init().. This prevents annoying game bugs such as caching SDL_GetPerformanceFrequency in a static initializer
2013-08-17 18:07:29 -04:00