Commit graph

4925 commits

Author SHA1 Message Date
Sam Lantinga
c804678260 Ignore SVN metadata 2012-06-04 12:31:14 -04:00
Gabriel Jacobo
a9dfd741a4 Actually functional, hopefully!, Xext test 2012-06-03 17:34:18 -03:00
Ryan C. Gordon
110c52e2b4 Fix from 1.2 branch: ignore bogus Linux evdev joystick axes. 2012-06-03 05:05:34 -04:00
Sam Lantinga
924fe8e26e Fixed SDL_config.h build include path 2012-06-01 20:31:50 -04:00
Sam Lantinga
241a11738e Better test for Xext headers 2012-06-01 20:06:48 -04:00
Sam Lantinga
926b27e24a Fixed includes for Objective C 2012-06-01 20:05:38 -04:00
Gabriel Jacobo
17bdcc6e8e RenderCopyEx,rotation and flipping for all hardware/software backends (#1308) 2012-06-01 19:51:08 -03:00
Gabriel Jacobo
5791b11bc4 Fix test for Xext headers (bug 1498), now it should fail properly in systems with the old headers. 2012-06-01 19:42:15 -03:00
Dimitris Zenios
f39fe05937 1.Fixed a memory leak inside XInput2 code
2.Replaced XKeycodeToKeysym with XkbKeycodeToKeysym since XKeycodeToKeysym is deprecated in newer X11 version
3.Rewrote testime.c since it was disabled after SDL_compat.c removal
4.Take into account common arguments also in testrelative.c
2012-05-31 19:23:30 +03:00
Sam Lantinga
5c45be466b Updated with new configure.in changes 2012-05-31 09:06:47 -04:00
Dimitris Zenios
497b8deec4 1.Moved all xinput2 functionality to its own file
2.Implement touch events using Xinput2.Leave evtouch as a fallback when xinput2 is not supported
2012-05-31 13:37:02 +03:00
Sam Lantinga
e2bd76bff4 Updated iOS project to SDL 2.0 2012-05-30 15:21:13 -04:00
Sam Lantinga
0dbd4213ad Fixed define for consistency 2012-05-30 11:45:09 -04:00
Sam Lantinga
d558e90692 Fixed compile error with both new and old Xext headers (bug 1498) 2012-05-30 11:44:57 -04:00
Sam Lantinga
e9df7f2d7b Fixed compile error 2012-05-30 11:43:33 -04:00
Sam Lantinga
6accd81680 Initial support for XInput2 by Dimitris Zenios
1.initial work on XInput2 support
2.Implemented relative mouse motion when XInput2 is enabled
3.Created a test app to test relative mouse motion
4.Fixed Bug #1498
2012-05-30 11:25:35 -04:00
Sam Lantinga
36feea4efd Fixed compiling the keyboad iOS demo 2012-05-25 18:21:22 -04:00
Sam Lantinga
086b4525f6 Allow SDL_uikitkeyboard.h to be included in C++ applications 2012-05-25 18:21:10 -04:00
Gabriel Jacobo
f6e83ac6a2 Fixes issue #1500 "SDL_RWops fails under Android 4" by removing stale Local Refs
and replacing them for their global equivalents.
2012-05-25 15:35:41 -03:00
Gabriel Jacobo
4576303b58 Fix for issue #1465, Leak in Android_JNI_SetActivityTitle (SDL_SetWindowTitle)
Thanks Martin Gerhardy!
2012-05-25 15:10:13 -03:00
Ryan C. Gordon
d9a8305bda SDL_ExitProcess() was ignoring exit code parameter. 2012-04-09 23:55:43 -04:00
Sam Lantinga
21a9248d04 I think this may fix the altivec blitters. 2012-04-08 03:59:36 -04:00
Sam Lantinga
93bd217847 Fixed bug 1429 - Compiling static library with -arch fails when linking showimage
We no longer need this ancient hack and it's causing problems when building shared libraries against SDL.
2012-02-28 21:58:36 -05:00
Wim Looman
0925c1dd78 Make mouse relative mode save the original co-ordinates to restore them
properly.
2012-02-04 00:13:21 +13:00
Wim Looman
b7f2ad8ad0 Change SDL_SetCursor to set the cursor back to the default cursor when the
window is unfocused.
2012-02-03 23:53:51 +13:00
Wim Looman
0da1c5b3ae Fix null reference exception.
Occurred when using relative mouse mode without a focused window.
2012-02-03 23:08:48 +13:00
Sam Lantinga
721ac5f4d8 Fixed bug 1423 - Finger touch events don't report pressure
Philip Taylor 2012-02-19 08:34:52 PST

SDL_touch.c never actually uses the 'pressurein' arguments to
SDL_SendFingerDown/SDL_SendTouchMotion, so it doesn't report the real pressure.
Also it uses touch->pressureres which is never initialised. Also it fails to
initialise some fields of event.tfinger for certain events, so applications
might try to use bogus data.

The attached patch seems to be enough to produce generally sensible output on
Android.
2012-02-20 23:54:33 -05:00
Sam Lantinga
099dd8f095 Fixed bug 1426 - SDL_SemWaitTimeout returns -1 and sets error instead of SDL_MUTEX_TIMEDOUT on time out
deraj 2012-02-19 19:01:08 PST

Fix to treat ETIMEDOUT as a time out instead of an error (and update the test)
2012-02-20 23:51:53 -05:00
Sam Lantinga
38463b3a0c Add OpenGL 3.X context creation support
Matthias Bentrup 2011-10-30 03:58:24 PDT

I've updated the context creation patch to include the bugfixes by Martin
Schreiber and also included a profile bit to request a ES2 compatible profile.

The wgl context creation may use 2 call to wglChoosePixelFormat if no
acceleration attribute is selected, this should work around a bug with buggy
AMD drivers (see #1254).
2012-02-20 23:37:57 -05:00
Sam Lantinga
e4461d199e Fixed bug 1424 - Handling of alpha channel in Altivec accelerated blit functions
evilbite 2012-02-19 09:38:21 PST

There is only one Altivec accelerated blit function
(ConvertAltivec32to32_prefetch() or ConvertAltivec32to32_noprefetch(),
depending on the CPU used) that is supposed to handle all alpha combinations.
This works as follows for every pixel line:
1. Blit single pixels until an aligned address is reached
2. Accelerated blit as far as possible
3. Blit single remaining pixels
Part 2. is set up correctly to handle different combinations of the alpha
channels of the participating surfaces. Parts 1. and 3. only do a simple copy
of all the pixel's components from souce to destination. But when the source
surface has no alpha channel (Amask is 0, e.g. the video surface) the surface's
alpha value must be used instead. Otherwise crap (uninitialized data) is being
copied to the destiniation's alpha channel.

The attached patch is a quick'n'dirty solution to the problem. A more
sophisticated solution might require separate functions for different
combinations of the alpha channels of the participating surfaces.
2012-02-20 20:56:52 -05:00
Sam Lantinga
4fed7973b3 Fix for double free when quitting on iOS
Tim Angus 2012-02-20 09:40:35 PST

As alluded to in the email thread "SDL2 error on iOS (doublefree)", I believe
the original cause of this bug is confusion over the purpose of
SDL_VideoDisplay::current_mode. It looks as though it is a weak reference to
another mode, albeit with value semantics. The iOS port treated it as a strong
reference however and claimed ownership, which is why things blew up. All the
patch really does it to stop treating current_mode as a strong reference.

To prevent this happening again it might be an idea to change current_mode to
be a pointer type rather than a value. This would certainly make its semantics
much more obvious. Failing that, a comment in the struct indicating its weak
reference properties might be wise.
2012-02-20 20:46:30 -05:00
Sam Lantinga
d7a2976620 Fixed bug 1419 - SDL_libgl2D.c breaks ndk-build
Philip Taylor 2012-02-15 10:43:47 PST

render/nds/SDL_libgl2D.c unconditionally includes NDS-only code. SDL's
Android.mk compiles source files matching

  $(wildcard $(LOCAL_PATH)/src/render/*/*.c)

which includes that file, causing build errors when running ndk-build.
2012-02-15 21:11:21 -05:00
Sam Lantinga
d0a7e39c3b FreeBSD compile fix
Robert Millan

src/joystick/bsd/SDL_sysjoystick.c makes the invalid assumption that
__FreeBSD_kernel__ implies presence of "ucr_data" struct member.  This
breaks recent versions of FreeBSD 10-CURRENT, FreeBSD 9-STABLE and
Debian GNU/kFreeBSD "wheezy/sid".
2012-02-15 21:06:45 -05:00
Sam Lantinga
cac74139d1 Quick android Makefile fix from Gabriel Jacobo 2012-02-14 20:54:44 -05:00
Sam Lantinga
4a9eaa4c6e Missed a file in Frank's patch 2012-02-12 23:22:44 -05:00
Sam Lantinga
d78c4ac3ee Updated the .hgignore for the current set of test programs 2012-02-12 21:05:24 -05:00
Sam Lantinga
982b4b8c20 Updated Nintendo DS support
Frank Zago

This patch updates the DS port:
- do not use the now removed compat layer.
- integrate parts of libgl2D since I got permission from the author, and thus
removed an external dependancy,
- a few bugs fixes.

Now, the textures should be completely supported, except reading from them
which doesn't makes sense to have on the DS. Sound is still not supported.

If someone else wants to work on the missing pieces, feel free.
2012-02-12 21:04:01 -05:00
Sam Lantinga
9514b6a286 Fixed bug 1417 - Android_JNI_FileClose local reference bug
A better solution for automatic local reference management.
2012-02-12 20:57:32 -05:00
Sam Lantinga
6552e51a2b Fixed bug 1412 - Patch - Software renderer crash
Dimitris Zenios Date: 2012-02-06 15:12:37 GMT

Hi gus there is a bug when using software renderer and the window
surface gets destroyed (Fullscreen and back).The solution is easy
2012-02-07 19:34:24 -05:00
Ryan C. Gordon
3e4b380d2c Removed GLX_BUFFER_SIZE attribute; it doesn't do anything with GLX_RGBA. 2012-02-07 02:11:42 -05:00
Ryan C. Gordon
df8784cd61 Replaced some assert macros with SDL_assert. 2012-02-07 02:11:15 -05:00
Ryan C. Gordon
067b1ec8a2 Check for _STDINT_H in SDL_config_minimal.h 2012-02-07 01:26:00 -05:00
Sam Lantinga
84a5ad6d06 Updated the Android Java activity for SDL2 2012-02-04 16:39:52 -05:00
Sam Lantinga
777b9659e9 Updated VS2010 project for the new version.rc location - thanks to Rainer Deyke 2012-02-04 10:42:12 -05:00
Sam Lantinga
3ed5d99c40 Fixed bug 1410 - fatbuild.sh is broken
Martin Gerhardy 2012-02-03 23:04:45 PST

after the name change from SDL to SDL2 the fatbuild.sh got broken. The attached
patch should fix this.
2012-02-04 10:40:04 -05:00
Sam Lantinga
4c9a5c130f Fixed bug 1403 - Creating a window with resizable flags may crash
jordirovira 2012-01-28 12:07:39 PST

in SDL_x11window around 520:

    /* Setup the normal size hints */
    if (!(window->flags & SDL_WINDOW_RESIZABLE)) {
        sizehints.min_width = sizehints.max_width = window->w;
        sizehints.min_height = sizehints.max_height = window->h;
        sizehints.flags = PMaxSize | PMinSize;
    }
    sizehints.x = window->x;
    sizehints.y = window->y;
    sizehints.flags |= USPosition;

the sizehints.flags member is not initizalised if it doesn't enter the
conditional. It is as easy as setting it to zero before the conditional.
2012-02-03 22:24:33 -05:00
Sam Lantinga
affa363396 Fixed OpenGL ES 1.1 on Android
From Gabriel Jacobo:
What I did notice is that calling
data->glGetIntegerv(GL_FRAMEBUFFER_BINDING_OES, &value); doesn't produce any
result in Android GLES1.1 if the active framebuffer is the default one, ie,
whatever is in value stays unmodified.
2012-01-31 21:03:35 -05:00
Sam Lantinga
c4c52635fb Fixed bug 1405 - README.android misses build instruction: copy SDL_config_android.h -> SDL_config.h 2012-01-31 20:55:17 -05:00
Sam Lantinga
37d3ab36d1 Switched the SDL 2 autoconf macro to AM_PATH_SDL2 2012-01-30 21:39:26 -05:00
Sam Lantinga
f917e29ad7 Fixed magenta texture on iOS with OpenGL ES 2.0 2012-01-30 20:56:25 -05:00