Commit graph

6111 commits

Author SHA1 Message Date
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
203b9839d2 Fixed bug 1750 - Directfb renderer does not support SDL_RENDERER_TARGETTEXTURE
tomaszewski.p

DirectFB renderer does not support SDL_RENDERER_TARGETTEXTURE what makes it incompatible with GL or GLES(2) renderers.

Attached patched:
- adds support for SDL_RENDERER_TARGETTEXTURE,
- DirectFB RenderCopy converts destination rectangle from floats to ints,
- fixes whitespaces to be the same in whole file.
2013-03-10 09:09:31 -07:00
Sam Lantinga
2422c520ac Fixed bug 1749 - SDL_GL_CreateContext() causes fatal X11 protocol errors that should just be caught instead
Lee Salzman

When using SDL_GL_CreateContext() to create a >= 3.0 version or core/forward-compatible context, internally glXCreateContextAttribsARB is used. Mesa in particular seems to be having trouble with this call and returning all sorts of errors, so it is dangerous to poll for the highest GL version by using calls to SDL_GL_CreateContext unless you are sure, a priori, that the call will suceed, defeating the point of its use.

X11 protocol errors are of the following form, with varying details depending on user, but the cause is always SDL_GL_CreateContext as above...

X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  153 (GLX)
  Minor opcode of failed request:  34 ()
  Serial number of failed request:  215
  Current serial number in output stream:  221

These sorts of errors can be temporarily filtered out by setting an X11 error handler to catch and ignore them, which is safe with respect to SDL_GL_CreateContext behavior because this function is allowed to return NULL to indicate failure.

A patch is attached to do this temporary filtering/catching of errors generated by trying to use glXCreateContextAttribs and friends...
2013-03-10 09:07:23 -07:00
Sam Lantinga
1bb2a06fc7 Fixed bug 1748 - Patch for errors and mistakes in SDL 2 README files.
Philipp Wiesemann

SDL's README files seem to contain multiple errors and mistakes. I attached a patch with changes and updates.

README:
 * removed Windows CE because no more supported

README-SDL.txt:
 * corrected spelling mistake

README.DirectFB:
 * corrected spelling mistakes

README.MacOSX:
 * corrected spelling mistakes

README.Platforms:
 * changed Android version to match AndroidManifest.xml

README.Porting:
 * added missing directories from list
 * removed cdrom directories from list

README.android:
 * updated required NDK revision
 * add project.properties to list
 * changed lower limit for to android-10 and removed upper
 * added a statement why older devices not supported
 * added correct dates to statements about OpenGL ES
 * added info about Google's device numbers and date
 * corrected spelling mistakes

README.gesture:
 * corrected spelling mistakes

README.pandora:
 * corrected spelling mistake

README.touch:
 * changed that values are no in range 0..1
 * updated the names of some functions
 * updated the notes about usage
 * corrected spelling mistakes
 * added info that API changed near original author contact
2013-03-10 09:03:38 -07:00
Sam Lantinga
7ce1b4475f Fixed bug 1744 - DirectFB video and renderer API is not updated
tomaszewski.p

Recent changes in SDL_sysrenderer.h and SDL_sysvideo.h had no impact on directfb backend.

Attached patch:
- updates interface,
- resolves uninitialized variable reading,
- changes logging tio use SDL_Log API,
- updates configure to use DIRECTFBCONFIG variable instead direct call to directfb-config.
2013-03-09 10:35:12 -08:00
Andreas Schiffler
c51712467d Fix SDL_TryLockMutex compile error when FAKE_RECURSIVE_MUTEX is defined 2013-03-09 09:24:43 -08:00
Andreas Schiffler
edbf26b139 Add parameter checking to SetWindowSize functions; add tests to video suite 2013-03-08 23:33:07 -08:00
Andreas Schiffler
5916b2bc1e Fix Bug 1533 - SDL_Keycode value range allows segfaults with negative values; add test coverage to keyboard suite 2013-03-08 23:04:53 -08:00
Sam Lantinga
f41de44a36 Updated SDL_HINT_GAMECONTROLLERCONFIG documentation to reflect that it only takes effect before init. 2013-03-08 16:27:05 -08:00
Ryan C. Gordon
bd9fdb8099 Changed SDL_INIT_EVERYTHING to only request currently-known subsystems. 2013-03-08 11:38:08 -05:00
Sam Lantinga
7f2340dc6a Don't re-read the hints when opening the game controller. Instead use SDL_GameControllerAddMapping() to add hints after initialization. 2013-03-08 10:09:51 -08:00
Gabriel Jacobo
3f118b42fe README.android updates regarding the use of dirty rectangles rendering technique 2013-03-08 11:30:25 -03:00
Sam Lantinga
1494812f7c Put the real SDL_AtomicCAS() and SDL_AtomicCASPtr() symbols into the library. 2013-03-07 20:42:55 -08:00
Sam Lantinga
c6388c87c1 Changed the name of SDL_mutexP() SDL_mutexV() 2013-03-07 20:12:40 -08:00
Sam Lantinga
0707530b35 Load the game controller mapping hint when opening a game controller. 2013-03-07 15:37:08 -08:00
Sam Lantinga
1dec4dd800 Fixed read after free bug in the game controller. 2013-03-07 15:17:06 -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
fb49761922 Fixed 64-bit compile warnings on Visual C++ 2013-03-06 11:59:19 -08:00
Sam Lantinga
85d6d00788 Removed multi-input events, since we removed the unimplemented API recently. 2013-03-06 11:59:15 -08:00
Sam Lantinga
541a638836 Fixed compile errors on Windows 2013-03-06 09:45:53 -08:00
Sam Lantinga
4a942814bd Make it so SDL_RestoreWindow() implements the _NET_ACTIVE_WINDOW protocol which some window managers require to restore full screen windows. CR: saml 2013-03-06 09:37:03 -08:00
Edward Rudd
3ab8d4ce1a move variable declaration to beginning of function 2013-03-06 10:37:27 -05:00
Sam Lantinga
4e631c1583 Fixed warning messages when loading Direct3D DLL
kmx

I have investigated the warning "Failed loading D3DX9_*.dll" and come up with the enclosed patch (please forward it to relevant SDL2 mailing list/bugtracker).
2013-03-05 18:52:25 -08:00
Shawn Walker
6398f00da7 Fix pulseaudio dynamic linking for Solaris builds.
Fix Solaris Studio compilation errors.
Fix sunaudio backend for SDL2.
2013-02-25 22:46:21 +00:00
Edward Rudd
ac51aff110 Add SDL_TryLockMutex and implementations for all platforms 2013-03-05 18:54:55 -05:00
Edward Rudd
191718be44 add hint to allow disabling the use of Xinput. 2013-03-05 18:01:59 -05:00
Edward Rudd
5fd98b3297 add new gamecontroller APIs
- add mappings after init (or even before w/o using the hint)
- get string for axis
- get string for button
- get mapping string for controller or for GUID
- new event to notify when a controller is remapped. (e.g. mapping was changed via the AddMapping method)
2013-03-05 17:59:36 -05:00
Sam Lantinga
979239e130 Fixed bug 1553 - Fix USB joystick input for FreeBSD 9.0+
Marcus von Appen

Receiving input from USB joysticks on FreeBSD 9.0 or newer is broken at the moment. The attached patch fixes this.
2013-03-04 20:27:51 -08:00
Gabriel Jacobo
0d5cf5e924 Updated the README.android file stating the required API level and reasons why. 2013-03-04 11:35:03 -03:00
Gabriel Jacobo
24df19a3d3 Fixes AndroidManifest comment, Android API level 10 = Android 2.3.3 2013-03-04 10:39:21 -03:00
Gabriel Jacobo
967e7efcc0 Adds some required CFLAGS and LDFLAGS for the iOS platform 2013-03-04 10:33:48 -03:00
Sam Lantinga
2c077061e0 Fied bug 1719 - Remove unnecessary PrecompiledHeaderOutputFile.
Hiroyuki Iwatsuki
Patch for removing unnecessary PrecompiledHeaderOutputFile.
2013-03-03 22:08:00 -08:00
Sam Lantinga
f8e304b6ed Added new tests to the .hgignore file 2013-03-03 22:06:27 -08:00
Sam Lantinga
6a40ac979a Fixed bug 1740 - Android pixel format constants out of sync
wjp

In SDL HG (2.0) the pixel format constants in
android-project/src/org/libsdl/app/SDLActivity.java seem to have gone out of
sync with include/SDL_pixels.h in HG rev b1124b32b07d.

E.g., at a glance it seems like 0x85151002 should have become 0x15151002.
2013-03-03 21:52:51 -08:00
Andreas Schiffler
f7b0b73b64 Fix behavior of SDL_GetWindowPosition for invalid input; add test cases to video suite 2013-03-03 17:22:51 -08:00
Sam Lantinga
4bb1b24573 Don't specify the texture unit when binding a texture, instead use whatever has been set up by the application.
This matches behavior in the OpenGL and OpenGL ES 1.1 renderers.
2013-03-03 11:25:43 -08:00
Sam Lantinga
7999859dda Fixed formatting 2013-03-03 11:25:09 -08:00
Sam Lantinga
05a3ae94ae Fix compiler warning in Cocoa touch code 2013-03-03 08:41:50 -08:00
Sam Lantinga
7da56d26dd Compile SDL on older versions of Xcode 2013-03-03 08:32:08 -08:00
Sam Lantinga
bb0752e573 Updated touch API
* Normalized touch coordinates as floats in the 0...1 range
* Removed unused touchpad concepts from the API
* Added API functions to get active touch devices and current finger state
2013-03-03 01:01:33 -08:00
Sam Lantinga
71ea3033fa Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input. 2013-03-02 20:44:16 -08:00
Sam Lantinga
c02018f852 Fixed the joystick id usage in the joystick and game controller events. 2013-03-02 17:51:32 -08:00
Sam Lantinga
c6dc8b64e7 Remove XSync from X11_GL_MakeCurrent() function 2013-03-01 11:27:01 -08:00
Sam Lantinga
932ea49e88 Merged 2013-03-01 11:18:35 -08:00
Sam Lantinga
5bf084a08b Merged changes 2013-03-01 11:15:50 -08:00
Gabriel Jacobo
afdba27236 Use XFree to release X11 allocated data 2013-03-01 13:28:07 -03:00
Sam Lantinga
7c3f6dcb24 Fixed bug 1736 - Memory leak in X11_InitModes
tomaszewski.p

XRRListOutputProperties allocates Atom* array, which is not freed.
XRRGetOutputProperty allocates 'unsigned char *prop' array, which is not freed.
2013-02-28 22:20:25 -08:00
Sam Lantinga
c6ac556871 The table is now a scancode mapping table, not a virtual key mapping table 2013-02-28 21:48:12 -08:00
Sam Lantinga
1b30d1a566 Cleaned up and fixed the Windows keyboard mapping code.
Use KP_PERIOD instead of KP_DECIMAL
Don't remap keys which are always keycode named versions of scancodes
2013-02-28 21:40:08 -08:00
Sam Lantinga
43f89a9836 Updated the link to the USB usage page document 2013-02-28 20:01:17 -08:00