Commit graph

183 commits

Author SHA1 Message Date
Sam Lantinga
ed1c6aaefa Fixed the windows message debug output so it works without HAVE_LIBC 2013-10-14 08:56:50 -07:00
Sam Lantinga
29c4cd990e Adding static lib to SDL builds on Windows.
CR: SamL
2013-10-14 08:56:45 -07:00
Sam Lantinga
2d866e7a42 Added support for SDL_PIXELFORMAT_UYVY surfaces on Mac OS X 2013-10-14 08:56:37 -07:00
Sam Lantinga
75a0dc20b5 Fixed accumulating mouse wheel motion for the Microsoft Wireless Mouse 5000 2013-10-13 19:59:40 -07:00
Sam Lantinga
becadb4d2d Fixed function feature test for Visual Studio 2012
norfanin

Fixes the version check for some functions that are only present with the MSVC 2013 CRT libraries.

I did my testing wrong and failed to see that 2012 doesn't have these functions. Microsoft implemented them in their upcoming 2013 version, though. The attached patch changes it to the check for the next version.

I also removed the HAVE_ITOA because that would require linking with oldnames.lib and it's easier to just let the SDL implementation take over.
2013-10-13 19:51:58 -07:00
Sam Lantinga
a79a5f384f Fixed bug 2149 - Don't search for libusbhid except on BSD
Joseph Carter

There's a whole set of configure tests for BSD's libusbhid, and they only matter on BSD.  However, if you have the library on Linux, it gets pulled in as library bloat.  And it's bloat of the highest order since not a single function call to the library is ever made unless you're on a *BSD.
2013-10-13 19:49:45 -07:00
Sam Lantinga
1b65c50cff Added an assert to catch init/quit call mismatch that might bite people. 2013-10-13 19:48:45 -07:00
Gabriel Jacobo
53ceeb94f0 Prevent keystrokes from leaking through to the console when using evdev.
This uses the same method Weston and X use. Sadly, to be fully effective when
launching remotely, this needs root permissions.
2013-10-13 17:15:43 -03:00
Gabriel Jacobo
fa34e8d946 Fixes X11 video backend compilation when no GL is available
For example, in our Raspberry Pi sysroot.
2013-10-12 16:29:34 -03:00
Edward Rudd
329c6cd9ee added simple Drag & drop test 2013-10-12 11:21:40 -04:00
Gabriel Jacobo
33123047eb Updates the Raspberry Pi README 2013-10-12 11:35:47 -03:00
Ryan C. Gordon
2843c98725 Do a full sysroot for the Raspberry Pi buildbot.
This gets us ALSA and X11, etc.
2013-10-11 10:58:05 -04:00
Sam Lantinga
56d744e0d2 Fixed bug 2146 - Enable static linking of libSDL on Android
Denis Bernard

This patch to Android.mk adds support for static linking of libSDL for Android applications. A patched readme with static build instructions is also provided.

It does not break existing build environments setup according to the README-android.txt since the static library version will not be built in not required.

The static build uses the Android NDK module system (see docs/IMPORT-MODULE.html in the NDK folder and step 5 in the instructions below).

Instructions:
1. Copy the android-project directory wherever you want to keep your projects
   and rename it to the name of your project.
2. Create a symlink to SDL/src/main/android/SDL_android_main.c as
   <project>/jni/src/SDL_android_main.c
3. Rename <project>/jni/src/Android_static.mk to <project>/jni/src/Android.mk
   (overwrite the existing one)
4. Edit <project>/jni/src/Android.mk to include your source files
5. create and export an environment variable named NDK_MODULE_PATH that points
   to the parent directory of this SDL directory. e.g.:

   export NDK_MODULE_PATH="$PWD"/..

6. Edit <project>/src/org/libsdl/app/SDLActivity.java and remove the call to
   System.loadLibrary("SDL2") line 42.
7. Run 'ndk-build' (a script provided by the NDK). This compiles the C source

Although this requires an environment variable to be setup, it can be added once and for all to the main Android.mk of the project.
2013-10-10 21:51:39 -07:00
Sam Lantinga
02eded2276 Updated SDL to version 2.0.1 2013-10-10 21:50:25 -07:00
Sam Lantinga
11e8447008 Report joystick added/removed events even if we don't have udev.
T. Joseph Carter

As discussed (possibly to death), the Linux joystick driver does not actually report events for added or removed joysticks when you haven't got udev support.

We simply cannot know about removed joysticks without udev.  But we can (and we should) report adding them.  This brings the legacy case in line with pretty much the rest of SDL's joystick drivers.
2013-10-10 20:58:20 -07:00
J?rgen P. Tjern?
02a42dfe23 Mac: Better handling when someone else is the app delegate. 2013-10-07 16:01:40 -07:00
Ryan C. Gordon
cc65ad2de1 Raspberry Pi build script: let caller specify final tarball name. 2013-10-10 02:37:36 -04:00
Ryan C. Gordon
7bf33541e7 Patched to compile in C90 mode. 2013-10-10 02:21:41 -04:00
Ryan C. Gordon
1c52023b53 Fixed tarball name in Raspberry Pi build script. 2013-10-10 02:06:14 -04:00
Ryan C. Gordon
191dd1c3bb Added script that the buildbot will use for cross-compiling to Raspberry Pi. 2013-10-10 01:46:39 -04:00
Gabriel Jacobo
9959bb23ac Adds gl_profile_mask to test framework, uses it in testgles 2013-10-10 00:49:57 -03:00
Gabriel Jacobo
1abeec401e Fixes Bug 2134 - [Android] Black screen after resume (sometimes) 2013-10-10 00:30:03 -03:00
Gabriel Jacobo
f3f6e6f62c Fixes testgles and testgl 2013-10-09 11:30:01 -03:00
Gabriel Jacobo
de7c996a50 Adds test framework to Android.mk and a simple utility to build Android projects 2013-10-09 10:29:01 -03:00
J?rgen P. Tjern?
9bc46b25ed Fix SDL_SetWindowPosition on fullscreen windows.
This reverts http://hg.libsdl.org/SDL/rev/7cdeb64faa72 and fixes it in
the correct way. If you call SDL_SetWindowPosition on a fullscreen
window, it would update the x & y variables for the window, but not
actually move the window (since it was fullscreen). That would make the
internal state of the SDL_Window incorrect, causing
SDL_WarpMouseInWindow to offset incorrectly.

This makes it so SDL_SetWindowPosition updates the `windowed' x & y
coordinates, which take effect when you revert from fullscreen.
2013-10-07 14:16:38 -07:00
Sam Lantinga
dfbb16995a Only allocate a joystick instance ID once we know it's a joystick.
This fixes compatibility with code that assumes 0 based joystick instance IDs.
2013-10-06 20:39:23 -07:00
Sam Lantinga
7588797989 Removed unused variables (thanks Joseph!) 2013-10-06 13:50:36 -07:00
Sam Lantinga
5f6afe6eb0 Check for NULL joystick in SDL_JoystickGetGUID() 2013-10-06 13:49:23 -07:00
Sam Lantinga
d8bdf0cf4b Fixed bug where a Logitech wireless keyboard with built-in mouse touchpad didn't get recongized as both devices. 2013-10-05 21:15:55 -07:00
Sam Lantinga
8f92b6d857 Fixed bug 2132 - Tests may use invalid SDL_window pointers when windows are closed
norfanin

Some of the tests keep using the pointers of a destroyed SDL_Window when the common event handling handled the close event. The event handler itself does not NULL the pointer after the destruction.

The attached patch adds a loop in the handler that will assign NULL to the destroyed window. It also adds checks to some of the tests so they skip those windows by checking for NULL.
2013-10-05 19:09:03 -07:00
Philipp Wiesemann
f7c69a02c8 Added detection of touch devices before first touch events happen on Android.
On Android available touch devices are now added with video initialization (like
the keyboard). This fixes SDL_GetNumTouchDevices() returning 0 before any touch
events happened although there is a touch screen available. The adding of touch
devices after a touch event was received is still active to allow connecting
devices later (if this is possible) and to provide a fallback if the new init
did not work somehow. For the implementation JNI was used and API level 9 is
required. There seems to be nothing in the Android NDK's input header (input.h)
to implement everything on C side without communication with Java side.
2013-10-05 17:08:19 +02:00
Sam Lantinga
49f4ff7ac9 Do a 32-bit compare on RGBA values. Thsi should be inlined in optimized builds. 2013-10-05 12:29:05 -07:00
Ryan C. Gordon
82d7fedc89 Avoid redundant state changes in the GLES2 renderer. 2013-10-05 00:29:57 -04:00
Ryan C. Gordon
ef2530347b Removed "u_colorTable" uniform from the GLES2 renderer. It's not used anywhere. 2013-10-04 11:25:14 -04:00
Gabriel Jacobo
bc47ba2451 Fix EGL/OpenGL ES paths 2013-10-04 08:23:37 -03:00
Sam Lantinga
1661dd506b Report an error if creating a render target fails 2013-10-03 21:41:09 -07:00
Sam Lantinga
5d57f287fc Added optional error checking for OpenGL ES 2.0 in the same style as the OpenGL renderer.
You can enable it like this: SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
2013-10-03 20:48:52 -07:00
Sam Lantinga
40a4291a27 Fixed a potential double-free bug if glGenTextures() failed. 2013-10-03 20:42:43 -07:00
Gabriel Jacobo
1884488cdb SDL_TEXTINPUT support for EVDEV 2013-10-03 10:28:10 -03:00
Sam Lantinga
0a811ea4bc Fixed const/non-const warning 2013-10-03 03:31:05 -07:00
Sam Lantinga
858c5a0ea2 Added the platform specific messagebox function to the video function list 2013-07-14 11:28:44 -07:00
Sam Lantinga
99ba5f2386 Fixed bug 2130 - Two members of Windows WindowData not initialized
norfanin

SetupWindowData in SDL_windowswindow.c doesn't initialize two members of SDL_WindowData with NULL. This is an issue because other parts of the SDL code seem to make the assumption that this is the case. WIN_DestroyWindowFramebuffer for example uses data->mdc and data->hbm if they're not NULL.
2013-10-03 00:54:58 -07:00
Ryan C. Gordon
3eefc6e16f SDLK_DELETE should probably be SDLK_BACKSPACE on iOS.
The key on the software keyboard works like backspace, at least. Not sure
 what happens with a bluetooth keyboard here.
2013-10-02 22:18:04 -04:00
Ryan C. Gordon
e3f38e9c18 Get rid of glGetError() calls in GLES2 renderer.
It's not usually useful, and it causes pipeline stalls.
2013-10-02 22:16:11 -04:00
Gabriel Jacobo
70730e188f Uses SDL_UDEV for Linux joystick hotplugging 2013-10-01 08:47:06 -03:00
Sam Lantinga
ab56c04bfe Fixed bug 2121 - GCC throws error on SDL_FORCE_INLINE when compiling with -ansi 2013-09-30 22:35:32 -07:00
Sam Lantinga
80d193d0a0 Fixed bug 2122 - SDL_CreateTexture allows illegal texture sizes
Lloyd Bryant

SDL_CreateTexture() is succeeding (i.e. returning a valid pointer) when the requested horizontal or vertical size of the texture exceeds the maximum allowed by the render.  This results in hard-to-understand errors showing up when later attempting to use that texture (such as with SDL_SetRenderTarget()).
2013-09-30 22:16:14 -07:00
Sam Lantinga
620565add2 Fixed bug 2119 - compiler warnings (-pedantic) SDL_video.h:111:42 2013-09-30 21:57:03 -07:00
Gabriel Jacobo
1a0f7719ad Removes unused property use_egl from internal structure gl_config 2013-09-28 19:23:59 -03:00
Gabriel Jacobo
3f7340ddca Fix: SDL_EVDEV_device_removed does not need UDEV 2013-09-28 19:17:27 -03:00