Commit graph

9461 commits

Author SHA1 Message Date
Sam Lantinga
58670bda06 Fixed whitespace and added code to support older game controller GUIDs 2016-11-11 04:35:06 -08:00
Sam Lantinga
0bf15da8c6 Fixed whitespace 2016-11-11 04:30:09 -08:00
Sam Lantinga
ad8edb9544 Updated Windows game controller support 2016-11-11 03:35:37 -08:00
Sam Lantinga
7512f891b5 Fixed signed/unsigned comparison warnings in Visual Studio 2016-11-11 03:18:16 -08:00
Sam Lantinga
7b1761ed6f Updated Mac OS X game controller support 2016-11-11 04:06:00 -07:00
Sam Lantinga
3055d5af65 Added USB VID/PID information to the SDL test programs 2016-11-10 18:53:50 -08:00
Sam Lantinga
651314f513 Added Linux entries for the Logitech Dual Action game controller 2016-11-10 18:53:29 -08:00
Sam Lantinga
6fcf21b827 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
8ee24a5254 wayland: fixed compiler warning about pipe2(). 2016-11-10 12:07:34 -05:00
Ryan C. Gordon
44aa173e4a nacl: pepper_49 SDK apparently has problems, move buildbot back to pepper_47.
(this is still a big leap forward from the previous buildbot target of
pepper_35!)
2016-11-10 11:26:44 -05:00
Ryan C. Gordon
81d6b69a0a Upgraded buildbot to NaCL SDK pepper_49 (the current stable release). 2016-11-08 01:12:54 -05:00
Philipp Wiesemann
5665ff1e98 Fixed audio conversion for unsigned 16 bit data. 2016-11-07 21:10:01 +01:00
Sam Lantinga
ed843d5a42 Fixed bug 3481 - Configure fails to detect dynamic library support on powerpc64le
Sam

I've discovered that when building on powerpc64le (and probably powerpc64) SDL's configure script fails to detect dynamic library support, causing it to build a static library. This causes link failures due to undefined symbols later when packages link with -lSDL.

This seems to be because the included autotools package is too old to detect powerpc64le. This change corrects the problem for me but newer versions of autotools should handle it without a patch
2016-11-06 20:26:48 -08:00
Sam Lantinga
3d33cfb22d Better fix for last point in D3D11 renderer, thanks to Nader Golbaz 2016-11-06 15:15:32 -08:00
Sam Lantinga
27e26897ed Shifting a value by more than its bits isn't defined and has varying behavior depending on compiler and platform 2016-11-06 14:13:28 -08:00
Sam Lantinga
de702a534a 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
d7e4a16d93 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
12f39836d2 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
6bbfff1f43 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
014ce2d535 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
f72be74cea ALSA: Fixed compile warning about unused function.
Found by buildbot.
2016-11-05 21:23:17 +01:00
Philipp Wiesemann
a0870dd2ad WinRT: Corrected header file guard comment. 2016-11-05 21:22:58 +01:00
Philipp Wiesemann
3b7ae890ef Removed empty statement. 2016-11-05 21:22:39 +01:00
Sam Lantinga
a966c3035b Fixed Windows build 2016-11-05 01:52:28 -07:00
Sam Lantinga
c43d248bd0 Fixed bug 3480 - minor update to NACL common.js
Sylvain

All latest official NACL examples have a slightly different 'common.js' file. It seems it has been updated in the meantime to fix a bug.
2016-11-05 01:48:14 -07:00
Ryan C. Gordon
6441c50b51 Also patched to compile on C89 compilers. 2016-11-05 03:56:55 -04:00
Ryan C. Gordon
a053163b55 Patched to compile on C89 compilers. 2016-11-05 03:53:59 -04:00
Ryan C. Gordon
9d3696362e 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).

--HG--
extra : amend_source : ce9deadd24e237eb83d2ef900c493f25c7cf3a80
2016-11-05 02:34:38 -04:00
Ryan C. Gordon
4fcf9fa0fc Removed premake build system. 2016-11-03 11:10:52 -04:00
Ryan C. Gordon
7f4bb06484 Added some debug logging to print out every event added to the SDL queue. 2016-11-03 01:29:56 -04:00
Sam Lantinga
4a371fb567 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
cf87529ba9 Added mapping for the PS3 controller in Bluetooth mode 2016-11-02 02:50:27 -07:00
Alex Baines
2468785f0a Skip duplicate key events sent by IMEs like uim. 2016-11-01 17:38:05 +00:00
Sam Lantinga
afe3434b32 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
e349d4c203 Patch from Tapani Pälli to fix a memory leak in X11_GL_CreateContext 2016-11-01 10:46:47 -07:00
Sam Lantinga
c7735b4175 Fixed bug with udev support reporting
Joshua Bodine

I'm going to reopen this because configure should still accurately report whether libudev will be used. Right now it just tests whether it's enabled as an argument, not whether configure was successful in finding it.
2016-11-01 10:42:35 -07:00
Sam Lantinga
6a2ba00e24 Fixed bug 3473 - can't build on linux with an old kernel 2016-11-01 10:33:44 -07:00
Sam Lantinga
f77ff66089 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
Philipp Wiesemann
861dc7c97f Added call to SDL_HasAVX2() in platform test program. 2016-10-30 21:01:46 +01:00
Philipp Wiesemann
0cd2e57338 Fixed outdated info in README. 2016-10-30 21:01:33 +01:00
Alex Baines
b7e3016410 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
7c6535d2fc Fixed compiling on older versions of ALSA 2016-10-28 17:00:37 -07:00
Sam Lantinga
f79824f330 Fixed audio data swizzling when the device channel map already matches what SDL expects 2016-10-28 16:47:06 -07:00
Sam Lantinga
f742129f37 Fixed NULL pointer dereference, thanks Ozkan Sezer 2016-10-22 17:53:03 -07:00
Sam Lantinga
b02397d714 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
ec3b66b2b9 Added tag release-2.0.5 for changeset 007dfe83abf8 2016-10-19 21:22:42 -07:00
Sam Lantinga
5d7cfcca34 Fixed bug 3460 - docs/README-macosx.md: g++fat.sh should be g++-fat.sh in universal build command
Elisée Maurer

I scratched my head for a while until I realized there's a typo in the command listed in the instructions for universal Mac builds: https://hg.libsdl.org/SDL/file/c1bb718f6c3f/docs/README-macosx.md#l24

It should say `g++-fat.sh` but instead it says `g++fat.sh`, which makes `./configure` fail with a C++ preprocessor error.
2016-10-19 20:50:33 -07:00
Sam Lantinga
100c615754 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
91af9fa761 Fixed crash on Mac OS X 10.10 and earlier 2016-10-19 20:39:12 -07:00
Sam Lantinga
8bc6a7ef95 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