Commit graph

10767 commits

Author SHA1 Message Date
Jools Wills
b5e5778aab mali-fbdev support / debian package changes
* mali-fbdev support from https://github.com/mihailescu2m/libsdl2-2.0.2-dfsg1 with changes for newer SDL
2019-02-07 20:16:12 +00:00
Jools Wills
3de856fc76 Revert "Linux joystick: Look at entire axis namespace for controls (thanks, "spaz16"!)."
This reverts commit 4cb7923f25.

see https://github.com/RetroPie/RetroPie-Setup/issues/1297
2019-02-07 20:16:12 +00:00
Jools Wills
8b464c159c silence log output for unknown input 2019-02-07 20:16:12 +00:00
Ozkan Sezer
8a812a2427 rename os2 makefile so that 'make dist' catches it; update it a bit.
--HG--
rename : OWMakefile.os2 => Makefile.os2
2018-10-30 20:11:02 +03:00
Sam Lantinga
8561b13616 Fixed bug 4188 - Software renderer SDL_RenderCopyEx blits corrupt image under certain cases
Sylvain

Re-opening this issue.

It fixes the test-case, but it introduces a regression with another bug (bug #4313).

So here's a new patch that activate cropping of the source surface to solve the issue.
It also reverts the wrong changeset.
It prevents unneeded colorkey error message.
2018-10-30 07:00:03 -07:00
Sam Lantinga
b4b9d8f2ec Backed out changeset 9bb50edccc46, SDL_JOYSTICK_HIDAPI is only used on iOS for Steam Controller support, which is not publicly available. 2018-10-29 19:58:59 -07:00
Ryan C. Gordon
455993b5f7 winmain: Patched to compile on C89 compilers. 2018-10-29 20:18:50 -04:00
Ryan C. Gordon
0aa93ce8fd winmain: Don't use SDL_malloc (or SDL_stack_alloc, which might be malloc).
Otherwise, we are using the allocator before the app can set up its own hooks.

Now we use VirtualAlloc, and WideCharToMultiByte (because SDL_iconv uses
SDL_malloc, too!) to get ready to call into SDL_main.

This also makes console_wmain() call into the same routines as everything
else, so we don't have to deal with those allocations, too. Hopefully we
end up with the same results from GetCommandLine() as we do in wargv.

Fixes Bugzilla #4340.
2018-10-29 20:00:03 -04:00
Ryan C. Gordon
d548956257 README-ios: added a note about enabling hidapi. 2018-10-29 15:51:38 -04:00
Michał Janiszewski
fee5c91f4a Add and update include guards
Include guards in most changed files were missing, I added them keeping
the same style as other SDL files. In some cases I moved the include
guards around to be the first thing the header has to take advantage of
any possible improvements compiler may have for inclusion guards.
2018-10-28 21:36:48 +01:00
Sam Lantinga
1ce6f5502a Fixed bug 4335 - Android NDK build error
dmuratshin

LOCAL_SRC_FILES shouldn't use $(LOCAL_PATH)
2018-10-28 14:17:21 -07:00
Sam Lantinga
925eba4300 Updated Android project files and documentation 2018-10-28 10:31:06 -07:00
Sam Lantinga
99a161adc7 This change looks okay in the general case.
If we run into problems where these events aren't dispatched (initialized on a different thread than the main thread?) we may need to create a separate thread to handle device notifications like we do with the windows joystick subsystem.
2018-10-26 20:20:28 -07:00
Ryan C. Gordon
c81e3972ba hidapi: Don't run a separate event loop for device notifications.
Fixes Bugzilla #4286.
2018-10-26 14:43:39 -04:00
Sam Lantinga
ada6e9687a Added patch note for SDL_GameControllerGetPlayerIndex() and friends 2018-10-26 09:49:27 -07:00
Sam Lantinga
c52506c862 Don't build SDL_JOYSTICK_HIDAPI by default on iOS
If you enable this, you'll need to link with CoreBluetooth.framework and add something like this to your Info.plist:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>MyApp would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you're not using the app.</string>
2018-10-26 09:27:31 -07:00
Sam Lantinga
678ba78382 Generalized the XInput user index into a player index 2018-10-25 16:53:14 -07:00
Sam Lantinga
222a3ed235 Fixed initializing XInput user index 2018-10-25 13:22:34 -07:00
Sam Lantinga
0485c938d7 Added SDL_JoystickGetXInputUserIndex() 2018-10-25 12:54:42 -07:00
Sam Lantinga
2dc55a9175 Added vi style for the Emscripten joystick code 2018-10-25 12:54:39 -07:00
Ozkan Sezer
ea9baa6056 CMakeLists.txt: set dylib version numbers properly. (bug #2915.) 2018-10-25 11:11:02 +03:00
Sam Lantinga
1880564264 Fixed reinitializing the SDL joystick subsystem on Android 2018-10-23 12:40:25 -07:00
Ozkan Sezer
0f6d45f840 fix permissions 2018-10-23 09:10:02 +03:00
Sam Lantinga
9198904285 Change our fullscreen wait logic to only wait if we need to. (thanks Rachel!) 2018-10-22 14:55:47 -07:00
Sam Lantinga
cb0aa75cfe Handle failure to load hidapi gracefully 2018-10-22 14:55:45 -07:00
Sam Lantinga
c47d44bc42 Add exception handling to Android hidapi. 2018-10-22 14:55:42 -07:00
Ryan C. Gordon
698ad82c1f wasapi/win32: Sort initial device lists by device GUID.
This makes an unchanged set of hardware always report devices in the same
order on each run.
2018-10-21 22:40:17 -04:00
Ryan C. Gordon
0330891d77 x11: Fixed incorrect function signature for XkbSetDetectableAutoRepeat.
It needs to use Bool (which is an int) and not BOOL (which is CARD8), which
causes problems on platforms with different byte order and alignment, etc.

Fixes Bugzilla #4326.
2018-10-20 21:35:48 -04:00
Ryan C. Gordon
e5132f9f98 cocoa: Put a mutex around GL_SwapBuffers.
Prevents deadlock when swapping two different GL contexts on two different
threads at the same time on macOS 10.14 ("Mojave").

Fixes Bugzilla #4278.
2018-10-18 23:38:27 -04:00
Thomas Perl
485e0cf698 Fix "unresponsible application" issues in Wayland
Polling without wl_display_flush() never responds to ping requests.
In that case ping-pong works only on other events, such as user input
or on frame swapped.

From https://git.merproject.org/mer-core/libsdl/merge_requests/3
Original author: Alexander Akulich <a.akulich@omprussia.ru>
2018-08-23 14:47:38 +02:00
Sam Lantinga
07d64253a1 Fixed bug 4324 - Xcode 10 - more cleanup for macOS and iOS projects
Dominik Reichardt

Xcode warns about
"Traditional headermap style is no longer supported; please migrate to using separate headermaps and set 'ALWAYS_SEARCH_USER_PATHS' to NO."
Just doing the latter is enough to silence the warning without ill effects on compiling. This affects the macOS Xcode projects as well as the iOS projects. Definitely not a bug but an annoying warning that could go away.
2018-10-18 15:41:50 -07:00
Sam Lantinga
0a07b5b836 Fixed bug 4324 - Xcode 10 - more cleanup for macOS and iOS projects
Dominik Reichardt

Similar to bug/patch #4228, the iOS Demo Xcode project needs to add the CoreBluetooth framework.
2018-10-18 15:40:39 -07:00
Ryan C. Gordon
ad1b9e7cfc cocoa: Fix OpenGL rendering on macOS 10.14 ("Mojave").
Fixes Bugzilla #4272.

--HG--
extra : rebase_source : 897af85e5a1a52c9cba466abf980370c995b7a11
extra : amend_source : 3363fd3637833aad5621aebb7089bbabf6e7c754
2018-10-18 12:05:05 -04:00
Ryan C. Gordon
c247695f19 cocoa: GL_GetDrawableSize only uses -[NSView convertRectToBacking] for highDPI.
On Mojave, this will report large numbers for retina displays in fullscreen
mode, which isn't how it works on previous versions.

--HG--
extra : rebase_source : 175a37f93b8e582bcd3ed80b93e6d40597ce7039
2018-10-18 11:59:48 -04:00
Ozkan Sezer
4e3ee3ee71 use less ancient versions of autofoo scripts 2018-10-18 11:58:00 +03:00
Sam Lantinga
afeced9c72 Fixed bug 4318 - Android move Haptic code to API26 class
Sylvain

- Create SDLHapticHandler_API26
- No need of reflection since SDL2 compile with Android 26 as a min requirement.
- remove spaces
2018-10-16 15:00:43 -07:00
Sam Lantinga
fd48717bca Fixed updating the rumble parameters on Linux 2018-10-16 14:58:07 -07:00
Sam Lantinga
b940c2ed0d Support vibration magnitude on Android 8.0 (thanks Rachel!) 2018-10-16 08:29:27 -07:00
Ozkan Sezer
6967f6fcb9 SDL_power.c: Adjust SDL_POWER_DISABLED ifdefs to avoid zero-size array
Otherwise if SDL_POWER_DISABLED is disabled (eg with --disable-power):

... with clang -pedantic:
src/power/SDL_power.c:48:50: warning: use of GNU empty initializer extension [-Wgnu-empty-initializer]
static SDL_GetPowerInfo_Impl implementations[] = {
                                                 ^
src/power/SDL_power.c:48:50: warning: zero size arrays are an extension [-Wzero-length-array]
2 warnings generated.

... with gcc -pedantic:
src/power/SDL_power.c:48:50: warning: ISO C forbids empty initializer braces [-Wpedantic]
src/power/SDL_power.c:48:50: warning: ISO C forbids empty initializer braces [-Wpedantic]
 static SDL_GetPowerInfo_Impl implementations[] = {
                                                  ^
src/power/SDL_power.c:48:30: error: zero or negative size array ‘implementations’
 static SDL_GetPowerInfo_Impl implementations[] = {
                              ^~~~~~~~~~~~~~~

... with Watcom:
./src/power/SDL_power.c(85): Error! E1112: Initializer list cannot be empty
2018-10-15 11:01:00 +03:00
Ryan C. Gordon
6f747d79e4 x11: Don't hardcode limit on lines of text in message boxes.
Plus other text parsing fixes.

Fixes Bugzilla #4306.
2018-10-15 00:46:43 -04:00
Ozkan Sezer
87c7eb2365 add a minimal config and makefile to test watcom/os2 builds. 2018-10-14 23:56:56 +03:00
Ozkan Sezer
f0a2bead1e SDL_GetPowerInfo_Hardwired is static in SDL_power.c
.. therefore, comment out its extern declaration in SDL_syspower.h.
2018-10-14 23:55:02 +03:00
Ozkan Sezer
460ecb4500 add missing include. 2018-10-14 23:50:50 +03:00
Alex Szpakowski
88fcd97fbb iOS: Don't ignore the requested alpha bit size when determining whether to use an RGBA8 backbuffer. 2018-10-14 17:26:10 -03:00
Charlie Birks
7784f5e8b7 Emscripten: Load eglQueryString and eglGetError
This prevents an assertion on context creation failure (calling a null
function pointer).
2018-10-13 17:18:59 +01:00
Alex Szpakowski
e311ac3bdf metal: Fix SDL_RenderReadPixels to wait for the GPU to finish rendering to the active texture before reading its pixels. 2018-10-13 03:36:42 -03:00
Alex Szpakowski
7144595a99 macOS: Fixed MoltenVK dynamic library loading code. 2018-10-12 23:23:52 -03:00
Alex Szpakowski
8b260f68d2 metal: Fix high dpi and resizing on macOS, and clean up iOS code. Fixes bug #4250. 2018-10-12 17:55:42 -03:00
Sam Lantinga
100e8e727f Allow Android haptics to work when SDL is reinitialized (thanks Rachel!) 2018-10-11 15:14:48 -07:00
Ozkan Sezer
5733b6d7b9 SDL_thread.h: undefine SDL_CreateThreadWithStackSize before redefining. 2018-10-12 01:03:40 +03:00