Commit Graph

722 Commits

Author SHA1 Message Date
Sam Lantinga
84c0780e25 Fixed bug 3305 - Fixed TextInput status when the keyboard was dismissed with the dismiss key on the iPad
Diego

I was previously unaware that rotating the device to a different orientation when the keyboard is shown causes a keyboardWillHide followed by a keyboardWillShow notification. The previous patch would then mistakenly StopTextInput when rotating. This patch fixes that by checking if the device is rotating before stopping text input.
2016-12-02 02:21:35 -08:00
Sam Lantinga
a738a6fb49 Added Linux controller mapping for the Nostromo n45 Dual Analog Gamepad 2016-12-01 07:31:08 -08:00
Sam Lantinga
1b689c335c Fixed bug 3503 - osx builds don't run on 10.6 as of rev. 10651
Ozkan Sezer

With rev. 10651, i.e. http://hg.libsdl.org/SDL/rev/747a6a795b21 ,
SDL2 - OS X builds fail to run on 10.6 (my setup: i686 / 10.6.8)
because the symbol _IOPMAssertionCreateWithDescription is missing.
The SDK listing it for 10.7+ does seem correct.  Reverting r10651
and rebuilding makes it to function again.
2016-12-01 11:52:47 -08:00
Sam Lantinga
4905cd9c09 Fixed bug 3340 - SDL_BlitScaled causes access violation in some cases.
Simon Hug

The SDL_BlitScaled function runs into an access violation for specific blit coordinates and surface sizes. The attached testcase blits a 800x600 surface to a 1280x720 surface at the coordinates -640,-345 scaled to 1280x720. The blit function that moves the data then runs over and reads after the pixel data from the src surface causing an access violation.

I can't say where exactly it goes wrong, but I think it could have something to do with the rounding in SDL_UpperBlitScaled. final_src.y is 288 and final_src.h is 313. Together that's 601, which I believe is one too much, but I just don't know the code enough to make sure that's the problem.

Sylvain

I think this patch fix the issue, but maybe it's worth re-writing "SDL_UpperBlitScaled" using SDL_FRect.
2016-11-30 22:06:05 -08:00
Sam Lantinga
cb8748b719 Fixed the controller mappings for the OUYA controller 2016-11-30 12:58:03 -08:00
Sam Lantinga
5fcf2577fb Added PS4 controller entries for the new Sony HID driver
https://git.kernel.org/cgit/linux/kernel/git/jikos/hid.git/log/?h=for-4.10/sony
2016-11-30 12:34:50 -08:00
Sam Lantinga
663afa911f Added support for the DS4 USB Wireless Adaptor 2016-11-30 12:25:19 -08:00
Philipp Wiesemann
a7655d77d1 Fixed warning about storing an unused value.
Found by buildbot.
2016-11-30 23:31:23 +01:00
Sam Lantinga
d834c08ac7 Add the controller mappings to the linked list in order 2016-11-29 22:02:37 -08:00
Sam Lantinga
dd5d85a4e7 Added an API to iterate over game controller mappings 2016-11-29 06:36:57 -08:00
Sam Lantinga
1e8f074c43 Avoid conflicts with multiple versions of udev by first trying the library that is linked with the executable, if any, and then picking the one that is in the build environment.
This fixes joystick detection for applications using the Steam Linux Runtime
2016-11-29 05:34:20 -08:00
Sam Lantinga
5220759f03 Made it safe to update joysticks from multiple threads, fixes crash in Steam 2016-11-29 05:04:42 -08:00
Sam Lantinga
7f764bd8d3 once more - iterating on this is annoying 2016-11-26 10:26:36 -08:00
Sam Lantinga
51ccc9ed8c if the tap is explicitly disabled by code or by another program, let it remain disabled! this is different than the automatic "event tap was too slow therefore we stopped processing it" timeout which we want to re-enable after. 2016-11-26 10:26:32 -08:00
Sam Lantinga
25f54f0f4f tap should default to disabled, not enabled 2016-11-26 10:26:26 -08:00
Sam Lantinga
354a8f276e SDL for Mac - only enable global event tap when actually necessary (app has focus and has requested relative mouse mode or has asked for a mouse grab). in other situations the event tap impacts system performance and battery life with no benefit. 2016-11-26 10:26:22 -08:00
Ryan C. Gordon
d1c35febce macOS: removed deprecated UpdateSystemActivity() call.
The non-deprecated approach (IOPMAssertion) already exists in SDL, and is
available in Mac OS X 10.6 and later (although it was incorrectly listed as
10.7 and later in SDL). Since SDL now requires 10.6 or later, this is no
longer conditionally used.
2016-11-25 00:13:13 -05:00
Ryan C. Gordon
fb5fd67ccb Fixed all known static analysis bugs, with checker-279 on macOS. 2016-11-24 21:41:09 -05:00
Sam Lantinga
2f6ba615ee Guess the USB VID/PID of XInput devices 2016-11-24 12:24:22 -08:00
Sam Lantinga
e9983c7b0f We are comparing 16-bit values 2016-11-24 11:53:23 -08:00
Ryan C. Gordon
e93e91f0b5 Pacify some GCC strict-aliasing compiler warnings. 2016-11-23 21:52:48 -05:00
Sam Lantinga
5232b8e952 Fixed XBox One S controller mapping for firmware revision 3.1.1221.0, including back and guide buttons 2016-11-23 06:54:19 -08:00
Ryan C. Gordon
232ae68864 Still more compiler warning fixes for various platforms. 2016-11-23 17:20:28 -05:00
Ryan C. Gordon
40c2a6fb55 Fixed more compiler warnings. 2016-11-23 11:49:26 -05:00
Ryan C. Gordon
52827361ae directsound: fixed compiler warnings. 2016-11-23 10:51:44 -05:00
Sam Lantinga
aa03b9d7af The XBox One S controller sends keys outside the standard joystick button range 2016-11-22 22:14:28 -08:00
Sam Lantinga
6558ecdbf6 Added mapping for XBox One S controller firmware version 3.1.1221.0 2016-11-22 04:42:07 -08:00
Ryan C. Gordon
a949882a98 cpuinfo: fix SDL_HasNEON() on older iOS devices, fixed C++ comment. 2016-11-21 20:35:59 -05:00
Sam Lantinga
3615633571 Renaming of guard header names to quiet -Wreserved-id-macro
Patch contributed by Sylvain
2016-11-20 21:34:54 -08:00
Sam Lantinga
abe9271065 Fixed warning building under mingw, patch contributed by Sylvain 2016-11-20 21:29:27 -08:00
Sam Lantinga
eaca3958ad Fixed bug 3494 - SDL_test_fuzzer.c fails compile since r10604
Ozkan Sezer

As of hg rev. 10604 (http://hg.libsdl.org/SDL/rev/4fe01fd25855),
SDL_test_fuzzer.c fails to build again
2016-11-20 21:24:09 -08:00
Sam Lantinga
4a089ca1c8 Fixed bug 3486 - Can't get HINSTANCE of my window
realitix

SDL2 allows to create widow and to get information through SDL_SysWMinfo.
But it misses something, with Vulkan, you need the HWND and HINSTANCE of the window for Win32 system.
Sadly, SDL2 provides only HWND but not HINSTANCE.

In some context, it can be difficult to get the HINSTANCE, indeed, I'm using pySDL2 (Python) and I can only access properties that SDL2 gives me.
I have to use a dirty trick like that to get the HINSTANCE:  (https://raw.githubusercontent.com/bglgwyng/pyVulkan/master/examples/win32misc.py)
2016-11-20 21:18:55 -08:00
Philipp Wiesemann
eb9cc03068 Fixed two memory leaks if added game controller mapping has lower priority.
Found by buildbot.
2016-11-19 23:27:37 +01:00
Philipp Wiesemann
a49ac09c02 Windows: Fixed crash if using current SDL_GetWindowWMInfo() from older programs. 2016-11-18 00:06:09 +01:00
Philipp Wiesemann
d05a39d0a6 Wayland: Fixed file descriptor leaks if device was not initialized. 2016-11-18 00:05:54 +01:00
Philipp Wiesemann
c345126266 Emscripten: Fixed handling of deactivated mouse events.
SDL_GetEventState() was called with a button state instead of an event type.
2016-11-18 00:05:28 +01:00
Ryan C. Gordon
32cb34945e cpuinfo: patched to compile for getauxval() path. 2016-11-17 17:03:43 -05:00
Ryan C. Gordon
0b33a1188b cpuinfo: more patching for Android. Legacy platform targets are a pain. 2016-11-17 16:10:32 -05:00
Ryan C. Gordon
a298e56349 cpuinfo: Patched to compile on Android, Linux. 2016-11-17 16:04:00 -05:00
Ryan C. Gordon
e8f4b7c4f5 cpuinfo: patched to compile.
Nothing quite like experimentation via Buildbot!  :/
2016-11-17 16:01:59 -05:00
Ryan C. Gordon
74eb78dcbf cpuinfo: more work on SDL_HasNEON(). 2016-11-17 15:57:58 -05:00
Ryan C. Gordon
db97c3d3e8 cpuinfo: silence compiler warnings on non-Intel CPU architectures. 2016-11-17 01:41:56 -05:00
Ryan C. Gordon
66a36d5660 cpuinfo: disable NEON detection on Android for now.
Will fix this properly soon.
2016-11-17 01:34:18 -05:00
Ryan C. Gordon
5c6b2ebf2d cpuinfo: more robust ARM preprocessor checks. 2016-11-17 01:26:56 -05:00
Ryan C. Gordon
35430a73f2 cpuinfo: first attempt at SDL_HasNEON() implementation. 2016-11-17 01:15:16 -05:00
Ryan C. Gordon
7592b40b39 cpuinfo: Removed code duplication, cached CPUID details. 2016-11-16 22:49:04 -05:00
Philipp Wiesemann
6fe15d6347 Wayland: Fixed memory leak if output retrieval failed.
Found by Cppcheck.
2016-11-16 22:09:40 +01:00
Philipp Wiesemann
97aa577589 Fixed empty parameter list in signatures of internal functions. 2016-11-16 22:08:51 +01:00
Sam Lantinga
818d1d3e80 Fixed bug 1646 - Warnings from clang with -Weverything 2016-11-15 01:30:08 -08:00
Sam Lantinga
0d24495b15 Removed unused constants
Except for SDL_bmp.c where they are historically interesting and I've left them in.
2016-11-15 01:24:58 -08:00
Thomas Perl
acce865911 [qtwayland] Set orientation and window flags via SDL hints 2016-11-13 10:39:04 +01:00
Sam Lantinga
009a3f5aa6 Fixed bug 3490 - Build failure with --enable-video-directfb
felix

Building SDL 2.0.5, or even the Mercurial snapshot (r10608) with GCC 6.2.1 and --enable-video-directfb generates a number of compiler diagnostics and fails.
2016-11-15 01:14:30 -08:00
Sam Lantinga
ab8bd3d96b Fixed bug 3359 - Software renderer does incorrect blending with SDL_RenderCopyEx
Simon Hug

The software renderer produces incorrect results when blending textures at an angle with certain blend modes. It seems that there were some edge cases that weren't considered when the SW_RenderCopyEx function was last changed. Or another bug possibly covered up the problem. (More on that in another bug report.)

Most of the issues come from the fact that the rotating function sets a black colorkey. This is problematic because black is most likely appearing in the surface and the final blit will ignore these pixels. Unless a colorkey is already set (the software renderer currently never sets one), it's very hard to find a free color. Of course it could scan over the whole image until one is found, but that seems inefficient.

The following blend modes have issues when drawn at an angle.

NONE: The black pixels get ignored, making them essentially transparent. This breaks the 'dstRGBA = srcRGBA' definition of the NONE blend mode.

MOD: Again, the black pixels get ignored. This also breaks the 'dstRGB = dstRGB * srcRGB' definition of the MOD blend mode, where black pixels would make the destination black as well. A white colorkey will work though, with some preparations.

BLEND: There are some issues when blending a texture with a translucent RGBA target texture. I - uh - forgot what the problem here exactly is.

This patch fixes the issues mentioned above. It mainly changes the code so it tries to do things without the colorkey and removes the automatic format conversion part from the SDLgfx_rotateSurface function. Getting the format right is something the caller has to do now and the required code has been added to the SW_RenderCopyEx function.

There's a small change to the SW_CreateTexture function. RLE encoding a surface with an alpha mask can be a lossy process. Depending on how the user uses the RGBA channels, this may be undesired. The change that surfaces with an alpha mask don't get encoded makes the software renderer consistent with the other renderers.

The SW_RenderCopyEx function now does these steps: Lock the source surface if necessary. Create a clone of the source by using the pixel buffer directly. Check the format and set a flag if a conversion is necessary. Check if scaling or cropping is necessary and set the flag for that as well. Check if color and alpha modulation has to be done before the rotate. Check if the source is an opaque surface. If not, it creates a mask surface that is necessary for the NONE blend mode. If any of the flags were set, a new surface is created and the source will be converted, scaled, cropped, and modulated. The rest of the function stays somewhat the same. The mask also needs to be rotated of course and then there is the NONE blend mode...

It's surprisingly hard to get the pixel from a rotated surface to the destination buffer without affecting the pixel outside the rotated area. I found a way to do this with three blits which is pretty hard on the performance. Perhaps someone has an idea how to do this faster?

As mentioned above, the SDLgfx_rotateSurface now only takes 8-bit paletted or 32-bit with alpha mask surfaces. It additionally sets the new surfaces up for the MOD blend mode.

I shortly tested the 8-bit path of SDLgfx_rotateSurface and it seemed to work so far. This path is not used by the software renderer anyway.
2016-11-15 01:12:27 -08:00
Sam Lantinga
c1e292fcf8 Fixed build error with missing function prototype in the SDL_test_harness.h header 2016-11-13 23:09:42 -08:00
Sam Lantinga
c2837ef634 Fixed unresolved symbol on Visual Studio 2016-11-13 23:04:47 -08:00
Sam Lantinga
57d01d7d67 Patch from Sylvain to fix clang warnings 2016-11-13 22:57:41 -08:00
Sam Lantinga
c13a077d15 Fixed bug 3488 - Random crashes (because Memory overlap in audio converters detected by Valgrind)
Vitaly Novichkov

Okay, when I researched code and algorithm, I tried to replace condition "while(dst >= target)" with "while(dst > target)" and crashes are gone.
Seems on some moments it tries to write into the place before memory block begin, therefore phantom crashes appearing after some moments.
2016-11-13 00:09:02 -08:00
Sam Lantinga
37696150e2 Fixed build on various platforms 2016-11-11 13:47:40 -08:00
Sam Lantinga
77000ff8cb Fixed bug 1822 - Inconsistent renderer behaviour on rotation
Sylvain 2016-11-07 08:49:34 UTC

when rotated +90 or -90, some transparent lines appears, though there is no Alpha or ColorKey.

if you set a dummy colorkey, it will remove the line ...
if you set a some alpha mod, the +90/-90 get transparent but not the 0/180  ...
2016-11-11 13:38:39 -08:00
Sam Lantinga
23c01c1890 Fixed bug 3079 - Allow non destructive SDL_GameControllerAddMappingsFromFile
x414e54

It is a bit of a pain to update the library or rely on whatever version the user has on their computer for default mappings.

So providing an easily updatable text file via SDL_GameControllerAddMappingsFromFile is still currently the most viable way. However using this replaces all mappings provided by the SDL_HINT_GAMECONTROLLERCONFIG environment variable which may have come from the user's custom Steam mapping.

There should be an easy way for games to supply extra game controller mappings to fill in the differences between SDL versions without it clobbering the SDL_HINT_GAMECONTROLLERCONFIG environment variable.

Internally the mappings could use a priority system and if the priority is lower then it will not overwrite the mappings.

For now it just assumes SDL_HINT_GAMECONTROLLERCONFIG is the highest priority, the default hardcoded are the lowest and anything set via the API is medium.
2016-11-11 13:29:23 -08:00
Sam Lantinga
74e1dd4c6f Define _GNU_SOURCE when building SDL 2016-11-11 13:14:00 -08:00
Sam Lantinga
302a6e62aa Fixed bug 3484 - DSP driver does not detect /dev/dsp0
Tobias Kortkamp

using SDL 2.0.5 (and a repository checkout) on FreeBSD 11.0 I get this output
from testaudioinfo with SDL_AUDIODRIVER=dsp:

INFO: Found 8 output devices:
INFO:   0: /dev/dsp
INFO:   1: /dev/dsp1
INFO:   2: /dev/dsp2
INFO:   3: /dev/dsp3
INFO:   4: /dev/dsp4
INFO:   5: /dev/dsp5
INFO:   6: /dev/dsp6
INFO:   7: /dev/dsp7
INFO:
INFO: Found 3 capture devices:
INFO:   0: /dev/dsp
INFO:   1: /dev/dsp4
INFO:   2: /dev/dsp5
INFO:

This is /dev/sndstat:

Installed devices:
pcm0: <NVIDIA (0x0040) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0040) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0040) (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA (0x0040) (HDMI/DP 8ch)> (play)
pcm4: <Realtek ALC887 (Rear Analog 7.1/2.0)> (play/rec)
pcm5: <Realtek ALC887 (Front Analog)> (play/rec) default
pcm6: <Realtek ALC887 (Rear Digital)> (play)
pcm7: <Realtek ALC887 (Onboard Digital)> (play)
No devices installed from userspace.

I'd expect to find /dev/dsp0 in the output device list.  It's not detected
because of a a small logic error in SDL_audiodev.c (see attached patch).

With the patch applied I get this which is what I'd expect:

INFO: Found 9 output devices:
INFO:   0: /dev/dsp
INFO:   1: /dev/dsp0
INFO:   2: /dev/dsp1
INFO:   3: /dev/dsp2
INFO:   4: /dev/dsp3
INFO:   5: /dev/dsp4
INFO:   6: /dev/dsp5
INFO:   7: /dev/dsp6
INFO:   8: /dev/dsp7
2016-11-11 12:41:06 -08:00
Sam Lantinga
160e719449 Fixed whitespace and added code to support older game controller GUIDs 2016-11-11 04:35:06 -08:00
Sam Lantinga
b6542ab237 Fixed whitespace 2016-11-11 04:30:09 -08:00
Sam Lantinga
47418f2d5a Updated Windows game controller support 2016-11-11 03:35:37 -08:00
Sam Lantinga
79f6ba5a84 Fixed signed/unsigned comparison warnings in Visual Studio 2016-11-11 03:18:16 -08:00
Sam Lantinga
801a9eaf64 Updated Mac OS X game controller support 2016-11-11 04:06:00 -07:00
Sam Lantinga
0cc6207c68 Added Linux entries for the Logitech Dual Action game controller 2016-11-10 18:53:29 -08:00
Sam Lantinga
ac74e16cde Standardized the format of the SDL joystick GUID and added functions to retrieve the USB VID/PID from a joystick and game controller. 2016-11-10 17:19:34 -08:00
Ryan C. Gordon
2898ada338 wayland: fixed compiler warning about pipe2(). 2016-11-10 12:07:34 -05:00
Philipp Wiesemann
6380d5c24e Fixed audio conversion for unsigned 16 bit data. 2016-11-07 21:10:01 +01:00
Sam Lantinga
057bca8a68 Better fix for last point in D3D11 renderer, thanks to Nader Golbaz 2016-11-06 15:15:32 -08:00
Sam Lantinga
40b571c91e Fixed bug 3468 - _allshr in SDL_stdlib.c is not working properly
Mark Pizzolato

On Windows with Visual Studio, when building SDL as a static library using the x86 (32bit) mode, several intrinsic operations are implemented in code in SDL_stdlib.c.

One of these, _allshr() is not properly implemented and fails for some input.  As a result, some operations on 64bit data elements (long long) don't always work.

I classified this bug as a blocker since things absolutely don't work when the affected code is invoked.  The affected code is only invoked when SDL is compiled in x86 mode on Visual Studio when building a SDL as a static library.  This build environment isn't common, and hence the bug hasn't been noticed previously.

I reopened #2537 and mentioned this problem and provided a fix.  That fix is provided again here along with test code which could be added to some of the SDL test code.  This test code verifies that the x86 intrinsic routines produce the same results as the native x64 instructions which these routines emulate under the Microsoft compiler.  The point of the tests is to make sure that Visual Studio x86 code produces the same results as Visual Studio x64 code.  Some of the arguments (or boundary conditions) may produce different results on other compiler environments, so the tests really shouldn't be run on all compilers.  The test driver only actually exercised code when the compiler defines _MSC_VER, so the driver can generically be invoked without issue.
2016-11-06 10:01:08 -08:00
Sam Lantinga
d780031277 Fixed bug 3476 - round() needs _GNU_SOURCE on some old systems
Ozkan Sezer

On systems with old glibc, such mine with glibc-2.8, the following warning
is issued and is fixed easily by defining _GNU_SOURCE:

/home/me/SDL2-2.0.5/src/video/x11/SDL_x11modes.c: In function 'CalculateXRandRRefreshRate':
/home/me/SDL2-2.0.5/src/video/x11/SDL_x11modes.c:263: warning: implicit declaration of function 'round'
/home/me/SDL2-2.0.5/src/video/x11/SDL_x11modes.c:263: warning: incompatible implicit declaration of built-in function 'round'
2016-11-06 09:30:06 -08:00
Sam Lantinga
330e2952d8 Fixed bug 2421 for D3D11 - SDL_RenderCopyEx off by one when rotating by 90 and -90.
Nader Golbaz

Updated patch for direct3d renderers
2016-11-06 08:47:40 -08:00
Sam Lantinga
4ed4997cc4 Fixed bug 2421 for D3D9 - SDL_RenderCopyEx off by one when rotating by 90 and -90
Nader Golbaz

Updated patch for direct3d renderers
2016-11-06 08:42:46 -08:00
Sam Lantinga
d767a450dc Fixed 2942 - Wayland: Drag and Drop / Clipboard
x414e54

I have implemented Drag and Drop and Clipboard support for Wayland.

Drag and dropping files from nautilus to the testdropfile application seems to work and also copy and paste.
2016-11-06 08:34:27 -08:00
Philipp Wiesemann
7ad3a46d76 ALSA: Fixed compile warning about unused function.
Found by buildbot.
2016-11-05 21:23:17 +01:00
Philipp Wiesemann
5819923212 WinRT: Corrected header file guard comment. 2016-11-05 21:22:58 +01:00
Philipp Wiesemann
062ca2b261 Removed empty statement. 2016-11-05 21:22:39 +01:00
Sam Lantinga
6ed8213049 Fixed Windows build 2016-11-05 01:52:28 -07:00
Ryan C. Gordon
a17abf10b7 Also patched to compile on C89 compilers. 2016-11-05 03:56:55 -04:00
Ryan C. Gordon
067f0c8482 Patched to compile on C89 compilers. 2016-11-05 03:53:59 -04:00
Ryan C. Gordon
f3456e9a93 Reworked audio converter code.
This no longer uses a script to generate code for every possible type
conversion or resampler. This caused a bloat in binary size and and compile
times. Now we use a handful of more generic functions and assume staying in
the CPU cache is the most important thing anyhow.

This shrinks the size of the final build (in this case: macOS X amd64, -Os to
optimize for size) by 15%. When compiling on a single core, build times drop
by about 15% too (although the previous cost was largely hidden by multicore
builds).
2016-11-05 02:34:38 -04:00
Ryan C. Gordon
0f83ae0fd9 Added some debug logging to print out every event added to the SDL queue. 2016-11-03 01:29:56 -04:00
Sam Lantinga
baadd54686 Fixed text input events with UIM
Alex Baines

I realized overnight that my patch probably broke text input events with UIM, and I confirmed that it does. Can't believe I overlooked that... I've been making stupid mistakes in these patches recently, sorry.

Anyway, *this* one seems to fix it properly. Knowing my luck it probably breaks something else.
2016-11-02 02:56:54 -07:00
Sam Lantinga
acae3ebf74 Added mapping for the PS3 controller in Bluetooth mode 2016-11-02 02:50:27 -07:00
Alex Baines
8eb762769e Skip duplicate key events sent by IMEs like uim. 2016-11-01 17:38:05 +00:00
Sam Lantinga
d0c8bf7f0b Patch from Tapani P?lli to fix a memory leak in X11_InitKeyboard
Patch uses XkbFreeKeyboard to free the memory returned by XkbGetMap.
Earlier implementation called XkbFreeClientMap which frees all the maps
but not data->xkb structure itself, XkbFreeKeyboard will free maps and
the structure.
2016-11-01 10:48:59 -07:00
Sam Lantinga
a1f427651d Patch from Tapani P?lli to fix a memory leak in X11_GL_CreateContext 2016-11-01 10:46:47 -07:00
Sam Lantinga
539afc5d0b Fixed bug 3473 - can't build on linux with an old kernel 2016-11-01 10:33:44 -07:00
Sam Lantinga
9a8642bd6a Fixed bug 3478 - Patch Haiku to use dlopen instead of load_add_on
Kai Sterker

SDL2 on Haiku so far uses Haiku-specific APIs for loading dynamic objects as add-ons, instead of using dlopen to load them as libraries. This, for example, leads to SDL_mixer not being able to load its audio backends, when compiled with standard settings.

As discussed at https://www.freelists.org/post/haikuports/SDL2-mixer-ogg-music-not-playing-and-other-stuff,2 , the best way to deal with this would be using dlopen instead of load_add_on. The following patch implements this change by dropping the Haiku-specific bits and using dlopen instead.
2016-11-01 10:30:46 -07:00
Alex Baines
5fe984978c Fix double events / no repeat flag on key events when built withoutibus/fcitx
Uses XkbSetDetectableKeyRepeat, and falls back to forcing @im=none if it's not
supported.
2016-10-28 01:28:58 +01:00
Sam Lantinga
88f2d16e45 Fixed compiling on older versions of ALSA 2016-10-28 17:00:37 -07:00
Sam Lantinga
fdcac1c24f Fixed audio data swizzling when the device channel map already matches what SDL expects 2016-10-28 16:47:06 -07:00
Sam Lantinga
39ba2ab835 Fixed NULL pointer dereference, thanks Ozkan Sezer 2016-10-22 17:53:03 -07:00
Sam Lantinga
5b14a943a8 Fixed bug 3466 - Can't build 2.0.5 on ppc64
/home/fedora/SDL2-2.0.5/src/video/SDL_blit_N.c: In function 'calc_swizzle32':
/home/fedora/SDL2-2.0.5/src/video/SDL_blit_N.c:127:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
     const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
     ^
2016-10-22 11:01:55 -07:00
Sam Lantinga
8a73f7e893 Fixed bug 3461 - Implement TEXTINPUT events for Haiku
Kai Sterker

Apparently, SDL2 on Haiku does not generate SDL_TEXTINPUT events.
Attached is a patch that adds this functionality.

Tested with SDLs own checkkeys program and different keymaps as well as my own SDL application and German keyboard layout to verify it generates the expected input.
2016-10-19 20:42:22 -07:00
Sam Lantinga
6d67c98e70 Fixed crash on Mac OS X 10.10 and earlier 2016-10-19 20:39:12 -07:00
Sam Lantinga
012217f069 Fixed bug 3369 - RaspberryPI ability to specify a Dispmanx layer
Albert Casals

On a RaspberryPI, it might become convenient to specify the Dispmanx layer SDL uses.
Currently, it is hardcoded to be 10000 to sit above most applications.

This can be specially useful when integrating other graphical apps and frameworks like OMXplayer, QT5 etc.. in order to have more flexibility on their Z-order.
2016-10-18 23:24:49 -07:00