Commit graph

7462 commits

Author SHA1 Message Date
Sam Lantinga
2011e44843 Made SDL_PIXELFORMAT_ARGB8888 the default texture format for consistency across renderer implementations. 2014-06-21 21:46:42 -07:00
Sam Lantinga
229d08177a You shouldn't get axis and hat events when your application doesn't have focus (unless you use the SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS hint) 2014-06-21 21:30:49 -07:00
Sam Lantinga
8072898dc9 Fixed bug 2562 - SDL_hapticlist/_tail not set correctly
Zachary L

SDL_hapticlist and SDL_hapticlist_tail are not set correctly when quitting the subsystem. This matters because they are represented as global variables. In the case you quit and reinitialize the subsystems, problems with dangling pointers arise.

For instance, SDL_hapticlist_tail will not be null on second initialization and because of the check on line 298, it will fail to set SDL_hapticlist appropriately. This can cause a few things to go wrong, like feeding SDL_strcmp a null fname which can cause a segfault.
2014-06-21 20:40:00 -07:00
Sam Lantinga
f5054661e6 Merged changes from Alexey Petruchik to support Android obb files
http://developer.android.com/google/play/expansion-files.html
2014-06-21 20:35:36 -07:00
Sam Lantinga
a12283899b Added libibus-1.0-dev build dependency 2014-06-21 17:31:36 -07:00
Sam Lantinga
4d0f46dd79 Fixed warning when building without ibus 2014-06-21 17:25:59 -07:00
Sam Lantinga
4beb5bcbb4 Generated configure from recent configure.in changes (for ibus support) 2014-06-21 12:50:03 -07:00
Sam Lantinga
ac04796154 Fixed compiler warning with new OpenGL ES header files 2014-06-21 12:45:54 -07:00
Sam Lantinga
3508a68e08 Fixed bug 2563 - Remove obsolete code for supporting iOS < 5
Alex Szpakowski

Now that SDL for iOS requires at least iOS 5.1 at runtime, there are several old codepaths in the UIKit backend which can be removed. I've attached a patch which does so.
2014-06-21 12:43:57 -07:00
Sam Lantinga
6a296ae9f2 Fixed bug 2595 - Padded, non-contiguous YUV does not display correctly using OpenGL ES 2.0 renderer
Alvin

The new OpenGL ES 2.0 YUV Texture support does not correctly display padded, non-contiguous YUV data.

I am using SDL2 60edb019f0fe (as provided by 'hg id --id') from Mercurial.

The YUV data I am using is provided by the FFMPEG family of libraries. According to FFMPEG's documentation, "The linesize [pitch] may be larger than the size of usable data -- there may be extra padding present for performance reasons."

The dimensions of the video file that I am using are 480x360. What I get from FFMPEG is a Ypitch of 512, and Upitch and Vpitch are both 256.

When I pack new Y, U and V buffers with only the "usable" data (Ypitch is 480 and Upitch and Vpitch are both 240), and use those new buffers, the image is display correctly.

It appears that the Ypitch, Upitch and Vpitch parameters are not being used by SDL_UpdateYUVTexture().

I use SDL_PIXELFORMAT_YV12 for my YUV texture, however, the same results are seen when I use SDL_PIXELFORMAT_IYUV.

Not sure if this is related or not, but when I render the YUV texture (padded and unpadded) to a RGB24 texture, the resulting image is greyscale (or could by just the Y channel).

The URL field for this bug entry is set to my email (SDL mailing list archive) which includes an example image of what I see when rendering padded, non-contiguous YUV data.
2014-06-21 12:38:46 -07:00
Alex Baines
09ebe4a201 Add IBus IME Support, move DBus code to its own file. (v3.3 squashed) 2014-06-18 20:11:39 +01:00
Sam Lantinga
6ace4262ba Fixed bug 2596 - SDL_SetError fails on on NULL on systems with vsnprintf
sfalexrog

On systems with vsnprintf call SDL_SetError fails when passed a NULL as an argument. SDL's implementation checks for NULL (as seen in the commit: https://hg.libsdl.org/SDL/rev/5ba49d7a39a0), but system implementation may crash.
2014-06-21 11:52:53 -07:00
Sam Lantinga
a509c3dce2 Added NaCl to the supported platforms list 2014-06-21 11:50:18 -07:00
Sam Lantinga
07424140e9 Added NaCl to SDL_GetPlatform() 2014-06-21 11:48:12 -07:00
Sam Lantinga
c03ba02837 Added OpenGL ES headers to public headers 2014-06-21 11:42:46 -07:00
Sam Lantinga
67d9cbf806 Fixed compiler warning 2014-06-21 11:36:00 -07:00
Sam Lantinga
9e25cdad8c commit 9e211e646f9d51dc1372c9f3c8f47a78caf4f2a5
Author: Sam Clegg <sbc@chromium.org>
Date:   Fri Jun 20 12:52:11 2014

    Fix win32 build which was failing due to missing PRIs64.

    This change adds definitions for the C99 PRIs16 and PRIu64
    which are missing from <stdint.h> on at last win32 and
    possibly other platforms.

    These already existed in testgesture.c so I removed them
    from there also.
2014-06-21 11:24:06 -07:00
Sam Lantinga
c3369ca83e Removed references to Raspberry Pi 2014-06-21 11:16:26 -07:00
Ryan C. Gordon
8ebcced17a Added script for buildbot to use on NaCl target. 2014-06-20 22:38:36 -04:00
Gabriel Jacobo
664169ab4b Fix another NaCl warning 2014-06-20 11:50:31 -03:00
Sam Clegg
1925fe9cf9 Fix compiler warnings in Native Client and Linux builds. 2014-06-20 11:10:16 -03:00
Gabriel Jacobo
b9b706f832 Ooops, code that resists erasure, I've seen that in a movie. 2014-06-20 11:01:05 -03:00
Gabriel Jacobo
e278ae7eb0 Initialize nacl_io, removes SDL_NaClMount/Umount
It's just easier to use nacl_io's mount/umount directly.
2014-06-20 10:59:51 -03:00
Sam Clegg
b4ab60690e Make autoconf-based build quiet by default.
Add V=1 to the make command line will show the full commands but by default
we just show the tool-type and the output file.  This is generally much easier
on the eye and makes warnings and errors more clearly visible.
2014-06-19 00:40:09 -04:00
Gabriel Jacobo
aa762e77a3 Fix file name typo, thanks Sam Clegg!
--HG--
rename : src/filesystem/nacl/SDL_sysfilesytem.c => src/filesystem/nacl/SDL_sysfilesystem.c
2014-06-18 10:04:21 -03:00
Wander Lairson Costa
c38d784fc2 Add suport for "make uninstall" to cmake.
--HG--
extra : rebase_source : 2769e11d0295638a1c4aea6118b984ece01ed4ba
2014-06-16 10:58:09 -03:00
Gabriel Jacobo
8631a1b212 Assorted fixes for NaCl. Hat tip to Sylvain Becker 2014-06-16 09:54:33 -03:00
Gabriel Jacobo
98a3713f34 Fixes #2583, clean up EGL initialization 2014-06-16 09:47:23 -03:00
Sam Lantinga
424dd9d921 Fixed bug 2558 - Missing FINGERUP in Android
Sylvain

If you play with the TouchScreen with +3 fingers randomly / pressing simultaneously all fingers.

You triggers FINGER DOWN events, but not always all the associated FINGER UP events.

So, after a while SDL_GetNumFingers() can report a wrong number of fingers pressed !


The explanation is hidden there : http://developer.android.com/reference/android/view/MotionEvent.html

Each pointer has a unique id that is assigned when it first goes down (indicated by ACTION_DOWN or ACTION_POINTER_DOWN).
A pointer id remains valid until the pointer eventually goes up (indicated by ACTION_UP or ACTION_POINTER_UP) or when the gesture is canceled (indicated by ACTION_CANCEL).

in ACTION_CANCEL :

The current gesture has been aborted. You will not receive any more points in it. You should treat this as an up event, but not perform any action that you normally would.
Constant Value: 3 (0x00000003)
2014-06-15 19:32:39 -07:00
Sam Lantinga
5a4283d3d5 Fixed bug 2567 - x11: Local dropped files are not URI-decoded
Melker Narikka

Local files that are dropped onto a window under X11
are not going through a URI decoding step, resulting in the following
in my test application:

Dropped file /home/meklu/Pictures/Screenshot%20from%202013-10-30%2014:04:50.png
Couldn't load /home/meklu/Pictures/Screenshot%20from%202013-10-30%2014:04:50.png

Expected result:

Dropped file /home/meklu/Pictures/Screenshot from 2013-10-30 14:04:50.png
Loaded /home/meklu/Pictures/Screenshot from 2013-10-30 14:04:50.png successfully

I've attached a patch that fixes the issue by doing URI decoding in-place on
the file string buffer.
2014-06-15 18:31:30 -07:00
Sam Lantinga
ce9a72f4af Fixed bug 2575 - Current GL context tracking fails
Ronie Salgado

The GL Renderer current context tracking fails when one window is used with an SDL renderer but another separate window is used with a user handled OpenGL context.

Attached is a small program that reproduces this bug, at least in some Linux machines where an OpenGL renderer is provided by default.

Expected Output:
-"First window" should be blue.
-"Second window" should be green.

Gotten Output:
- "First window" black.
- "Second window" blue.

What happened:
The renderer created for the "first window" ends rendering into the "second window" OpenGL context.

Bug location:

SDL_render_gl.c - line 286 on hg:
static SDL_GLContext SDL_CurrentContext = NULL;

When making SDL_GL_MakeCurrent from the user perspective, that variable or the GL renderer is not notified about the OpenGL context change.

Solution proposal:
- Move the current GL context cache into another place global.
2014-06-15 18:09:39 -07:00
Sam Lantinga
b9dc5d97af Fixed bug 2568 - NO_SDL_GLEXT should prevent OS glext.h as well
Jørgen Tjernø

If you #define NO_SDL_GLEXT before including SDL_opengl.h, it still includes the platform-provided glext.h. The comments indicate that this define is intended to be used when you provide your own glext.h (quote from SDL_opengl.h: "Define this if you have your own version of glext.h and want to disable the version included in SDL_opengl.h.")

This is a problem because glext.h depends on the contents of gl.h, and it's practical to let SDL_opengl.h pick the right #include for gl.h for our platform.
2014-06-15 17:37:35 -07:00
Sam Lantinga
2882fa948d Fixed bug 2580 - sndio backend improvements
Brad Smith

Attached is patch from the OpenBSD ports tree to add 24-bit support to the sndio backend and to make use of the sio_open() option SIO_DEVANY.
2014-06-15 17:26:30 -07:00
Sam Lantinga
373128e640 Fixed 2584 - Memory leak in Cocoa_GetDisplayName
Diego

The Xcode Instruments Leak tool reports a leak from IODisplayCreateInfoDictionary in Cocoa_GetDisplayName.
This happened after upgrading to Xcode 5.
2014-06-15 17:18:05 -07:00
Sam Lantinga
92412f34b9 Add controller mapping for Bluetooth DualShock 4 controllers on Linux
Frank Praznik

Add a gamepad mapping entry for Bluetooth DualShock 4 controllers on Linux.
The button mapping is the same as the USB controller, but the GUID is
different.
2014-06-15 13:05:30 -07:00
Sam Lantinga
a82d156de7 Fixed Android error on static lib build, if relative NDK_MODULE_PATH used
Stefan Pöschel

if the variable NDK_MODULE_PATH is set to a relative path (like "../"),
compiling of a static SDL lib fails with an error similar to this:
make: *** No rule to make target
`..//android_libs/SDL/..//android_libs/SDL/src/main/android/SDL_android_main.c',
needed by
`obj/local/armeabi/objs/SDL2_static/__//android_libs/SDL/src/main/android/SDL_android_main.o'.
 Stop.

Regarding the shared lib, this is already prevented by a "subst" command
in the /Android.mk, which removes all occurences of "$(LOCAL_PATH)/".
The attached patch does the same with the additional
"SDL_android_main.c", which is included for build the static SDL lib.
2014-06-15 13:01:10 -07:00
Sam Lantinga
73ddbd3f85 Fixed Visual Studio 2008 projects
Added missing files to SDL2 project
Added missing Visual Studio 2008 tests to the solution
Added output paths which match the 2010+ projects
Added SDL project references instead of old style project dependencies
Removed post-build copy step and added data files to projects
2014-06-15 10:42:28 -07:00
Ryan C. Gordon
653b4e19ff Mac: Fixed crash when returning from a fullscreen Space on shutdown. 2014-06-15 11:59:16 -04:00
Ryan C. Gordon
24513e0d6b Add coreaudio to the configure script's summary output. 2014-06-15 01:19:01 -04:00
Ryan C. Gordon
fbdde501ba Removed SDL_SYS_JoystickNeedsPolling().
It was simpler to just have the polling (actually: hotplug detection)
 functions return immediately if it's not an appropriate time to poll.

Note that previously, if any joystick/controller was opened, we would poll
 every time anyhow, skipping this function.
2014-06-14 23:31:23 -04:00
Ryan C. Gordon
50265e160b Mac: Run the CFRunLoop in joystick mode during SDL_SYS_JoystickNeedsPolling().
This fixes hotplugging failing to detect devices.
2014-06-13 14:52:26 -04:00
Alfred Reynolds
b270f6a5c3 - fixed crash if you removed a device twice, the deviceRef is invalid if removed from the removed device callback (added in http://hg.libsdl.org/SDL/rev/153077041e4b ). 2014-06-13 10:50:24 -07:00
Ryan C. Gordon
ef0bc3f8cf Regenerated SDL_audiotypecvt.c with updated perl script. 2014-06-10 19:39:33 -04:00
Ryan C. Gordon
731e3d9cc5 Fix audio resampling in some cases.
Fixes Bugzilla #2389.
2014-06-10 19:37:59 -04:00
Philipp Wiesemann
c176721421 Fixed nesting of HTML elements in documentation.
The code element may only contain inline but the pre element is block.
2014-06-09 17:37:59 +02:00
Philipp Wiesemann
989349fccf Fixed typos in documentation. 2014-06-09 17:28:08 +02:00
Philipp Wiesemann
a871c0c206 Fixed format string faults in audio tests.
They were found by the recent code annotations.
2014-06-09 17:25:03 +02:00
Gabriel Jacobo
b03e4dc610 Forgot a piece of README-nacl.txt 2014-06-08 18:50:40 -03:00
Gabriel Jacobo
37f6d3cb88 Fixes audio for Native Client, and other fixes...
- SDL_NaClMount, SDL_NaClUmount
- Default mounting of https at / in SDL's main function
- More documentation in README-nacl.txt
2014-06-08 18:18:13 -03:00
Sam Lantinga
7b215e8685 The NaCL mount/unmount functions need to be in SDL_system.h and specific to NaCL 2014-06-08 12:05:17 -07:00