Commit graph

10645 commits

Author SHA1 Message Date
sezero
51dfb3895d fix building SDL_audiotypecvt.c with gcc < 4.0 2018-02-12 10:47:00 +03:00
sezero
d9c8979193 revert the recent typecast assignment changes (see bug #4079)
also change the void* typedefs for the two vulkan function
pointers added in vulkan_internal.h  into generic function
pointer typedefs.
2018-02-12 17:00:00 +03:00
Sam Lantinga
f5cc40c14d Fixed bug 4027 - CheckLibSampleRate macro in sdlchecks.cmake never defines HAVE_LIBSAMPLERATE{,_SHARED}, so they're always reported as disabled by MESSAGE_TESTED_OPTION macro in macros.cmake 2018-02-13 13:25:59 -08:00
Sam Lantinga
b9964632c1 Fixed bug 3920 - IBus not work with SDL 2.0.7
cjacker

After updating from 2.0.5 to 2.0.7, Ibus not work anymore(fcitx still works).

Compare with 2.0.5, there are two issues in SDL_ibus.c.

1, SetupConnection always return SDL_FALSE in 2.0.7.

2, 'SetCapabilities' method should be called on 'ibus_conn'.

Patch attached.
2018-02-13 08:15:39 -08:00
Sam Lantinga
12d8a48c9e Fixed bug 3947 - replace strlcpy with memcpy in SDL_strdup() 2018-02-13 08:13:29 -08:00
Sam Lantinga
3460188642 Fixed bug 3950 - Don't always call dbus_shutdown in SDL_DBus
Alexander Larsson

dbus_shutdown() is a debug feature which closes all global resources in the dbus library. Calling this should be done by the app, not a library, because if there are multiple users of dbus in the process then SDL could shut it down even though another part is using it.

For example, i had an issue with this in mGBA, which uses both Qt and SDL, both using libdbus. I had a session bus, but no system bus (this was in a flatpak sandbox), and when SDL_DBus_Init() failed to init the system bus it called dbus_shudown() and continued on. This caused issues for Qt when running due to its session bus connections having disappeared beneath it.
2018-02-13 08:07:52 -08:00
Sam Lantinga
79bd45a81e Fixed bug 4081 - sdlchecks.cmake: typo introduced by rev11848 breaks building with wayland support 2018-02-13 07:59:45 -08:00
sezero
d899c0d822 kill C99'ism in SDL_waylandvulkan.c 2018-02-12 10:00:00 +03:00
Sam Lantinga
470afa6b34 On Android show the system UI when an SDL window is windowed, hide the system UI when it's fullscreen, like we do on iOS.
We're increasing the Android SDK minimum version to API 19, this doesn't increase the minimum target API, which is API 14.
2018-02-11 18:23:37 -08:00
Sam Lantinga
af61cbf39c Fixed bug 4075 - configury adds Metal.framework to linkage even if it is not available
Ozkan Sezer

Configury adds Metal.framework to linkage even if it is not available.
My solution is setting enable_render_metal to no when Metal.framework
is not found
2018-02-11 17:25:51 -08:00
Sam Lantinga
a8772588a2 ISO C correct fix for casting void* to function pointer 2018-02-11 15:29:36 -08:00
Ryan C. Gordon
87121511c9 vulkan: Fix assignment of vkGetInstanceProcAddr on Windows.
"*(void**)pfn = LoadAddress()" would cast the NULL pointer in pfn to a
void**, and then dereference it, which wasn't what we wanted. Replaced with
a clearer cast operation.

--HG--
extra : rebase_source : 6dd9a59b02023162ab0faa8c7c300d881fdcfcf9
2018-02-11 18:16:01 -05:00
Sam Lantinga
ecb6062875 Fixed bug 4073 - Unquoted Unicode argument parsing broken on Windows due to incorrect usage of SDL_isspace() 2018-02-10 12:43:11 -08:00
Sam Lantinga
6534481645 Fixed compile warning 2018-02-09 16:31:57 -08:00
Sam Lantinga
06c2bf816a Fixed compiler warning on Android 2018-02-09 16:01:11 -08:00
Sam Lantinga
cef043b163 Windows Phone 8.0 is no longer supported 2018-02-09 08:03:03 -08:00
Sam Lantinga
76f32ce55f Fixed min/max window size handling for borderless resizable windows 2018-02-08 18:07:14 -08:00
sezero
5f0540416f add SDL_log10 and SDL_log10f to include and dynapi 2018-02-08 17:07:47 +03:00
Sam Lantinga
2ad41155fb Fixed bug 4021 - Android, hard-coded Keycode value
Sylvain

There is an hard-coded keycode value in SDLActivity.java
2018-02-07 15:10:50 -08:00
Cole Campbell
3fdcaa213e Allow Android Java shim to be built as an AAR 2018-01-09 19:11:34 -05:00
Sam Lantinga
d98cc75574 Fixed bug 4054 - Raspberry Pi refresh rate detection
Viacheslav Slavinsky

SDL_rpivideo driver has 60 frames per second hardcoded in it, this is a problem for games that need to keep pace using VSYNC. I believe that I have found a solution to this. It is based on code in tvservice.c in rpi userland:

a1b89e91f3/host_applications/linux/apps/tvservice/tvservice.c (L433)
2018-02-07 15:05:30 -08:00
Ethan Lee
8551a596fa SDL_log10 2018-01-17 11:53:09 -05:00
"Guillermo A. Amaral"
429d2ed1df Set rpath instead of changing environment for RPi
Credit goes to Adrian Perez de Castro for the improvement.

Signed-off-by: Guillermo A. Amaral <g@maral.me>
2018-02-07 14:12:26 -08:00
Sam Lantinga
74b33107bf Fixed bug 4060 - Alternative DualShock 4 v2 controller GUID
ayer.3d

I have a DualShock 4 v2 controller with a GUID that's not in the database. There is an existing GUID that is almost identical, with the only difference that I can tell being the reported version string (mine being 8001, database is 8100).

Existing GUID: 050000004c050000cc09000000810000
     New GUID: 050000004c050000cc09000001800000

When connected via USB, the GUID matches an existing entry: 030000004c050000cc09000011810000
2018-02-07 14:07:54 -08:00
Sam Lantinga
734feea49c Description: fix installation of shared library for Android
Author: Boris Pek <tehnick-8@yandex.ru>
Last-Update: 2018-01-10
2018-02-07 14:03:24 -08:00
Ryan C. Gordon
c4d0b17522 wayland: Add support for xdg-shell protocol (unstable v6).
This is meant to be the desktop-enhanced version of wl_shell. Right now we
just match what the existing wl_shell code does, but there are other areas of
functionality available to us now, that we can fill in later.

This uses the "unstable" API, since this is what ships in Ubuntu 17.10 (as
part of Wayland 1.10), but Wayland 1.12 promotes this to stable with extremely
minor changes. We will add support for the stable version when it makes sense
to do so.

--HG--
extra : rebase_source : dbc84f58501611364f8ecabe5a004e26b4debbf1
2018-02-07 13:13:55 -05:00
Ryan C. Gordon
a16793542d cmake: Minor cleanup (reuse a string we already calculated).
--HG--
extra : rebase_source : 06264d613a3b7a95be897e4acd91af38afba21e9
2018-02-07 13:07:59 -05:00
Sam Lantinga
09117855f3 Send Apple TV remote input as key events unless it's opened as a joystick, to match Android behavior. 2018-02-06 16:43:31 -08:00
Sam Lantinga
125a9c8592 Replaced SDL_HINT_APPLE_TV_REMOTE_SWIPES_AS_ARROW_KEYS with SDL_HINT_TV_REMOTE_AS_JOYSTICK which controls whether remotes on iOS and Android are interpreted as joysticks (the default) or as return/escape/arrow keys. 2018-02-06 15:03:38 -08:00
Sam Lantinga
35b16e2fb7 Added SDL_IsAndroidTV() 2018-02-06 15:03:35 -08:00
Sam Lantinga
9b3c57793f SDL Changes to support clean reads
CR: saml
2018-02-05 11:40:39 -08:00
Sam Lantinga
59dc005099 Fixed building on tvOS 2018-02-01 15:46:51 -08:00
Sam Lantinga
04190f071f Added SDL_HINT_IOS_HIDE_HOME_INDICATOR to determine how the home indicator on the iPhone X is handled.
This variable can be set to the following values:
   "0"       - The indicator bar is not hidden (default for windowed applications)
   "1"       - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
   "2"       - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications)
2018-02-01 15:21:01 -08:00
Sam Lantinga
0ccd602d4a Fixed building on platforms without __sighandler_t 2018-01-30 18:12:25 -08:00
Sam Lantinga
e9a1c0c9d0 Fixed ISO C99 compatibility
SDL now builds with gcc 7.2 with the following command line options:
-Wall -pedantic-errors -Wno-deprecated-declarations -Wno-overlength-strings --std=c99
2018-01-30 18:08:34 -08:00
Sam Lantinga
e4556dc802 Fixed misleading indentation 2018-01-30 16:53:24 -08:00
Sam Lantinga
8e9881eaf2 Removed armeabi from the SDL build API list, since it's not supported by the latest Android SDK 2018-01-27 12:07:05 -08:00
Sam Lantinga
153b2b6991 Fixed bug 4065 - SDL_wave.c fail to compile in armeabi with ndk r16b
Sylvain

armeabi is almost deprecated for android-ndk higher that r13b.
either it doesn't compile (ICE), or it executes wrongly (using long long for instance).

android people advices to use armeabi-v7a (or use r13b).
2018-01-27 12:05:26 -08:00
Sam Lantinga
fe500040f8 Fixed bug 3985 - SDL_CreateWindow() has stopped changing screen mode when SDL_WINDOW_FULLSCREEN is used
Anthony

This worked in 2.0.5 as normal, but stopped working in 2.0.7. The monitor's resolution doesn't change, a window is created in full screen mode at the virtual desktop resolution instead.
2018-01-25 11:12:20 -08:00
Ryan C. Gordon
2aca04fbdd testoverlay2: use SDL_atoi, not atoi. 2018-01-22 09:46:48 -05:00
Ryan C. Gordon
93a15a8efd android: Fixed compiler warning about nested '/*' comments. 2018-01-22 09:45:16 -05:00
Ryan C. Gordon
95a8da715f wasapi: Fixed some compiler warnings. 2018-01-22 09:36:40 -05:00
Sam Lantinga
910b7fcdb7 Added a hint SDL_HINT_APPLE_TV_REMOTE_SWIPES_AS_ARROW_KEYS to prevent turning Apple TV remote swipes into arrow key events 2018-01-17 17:24:15 -08:00
Dawid Gan
1c2968ce3a EGL: Request sRGB framebuffer in correct place.
The EGL_GL_COLORSPACE_KHR is an attribute for eglCreate*Surface.

As written in EGL_KHR_gl_colorspace documentation:

    Accepted as an attribute name by eglCreateWindowSurface,
    eglCreatePbufferSurface and eglCreatePixmapSurface

        EGL_GL_COLORSPACE_KHR                   0x309D
    (...)
2018-01-16 21:29:32 +01:00
"Guillermo A. Amaral"
58f96f303d Make rpi video cross-compiler friendly.
* Stops using fixed path to find GLES/EGL libs.
* Tries pkg-config to locate bcm_host.

Signed-off-by: Guillermo A. Amaral <g@maral.me>
2018-01-17 13:17:10 -08:00
Sam Lantinga
50497c9630 Fixed formatting, added actual count to SDL error message 2018-01-17 13:12:39 -08:00
John Bartholomew
674e3ef674 Vulkan: Allow SDL_Vulkan_GetInstanceExtensions to be called with a larger array than necessary. 2018-01-14 13:34:50 +00:00
Marius Gripsgard
a78ff61e07 Mir: Handle close window events 2018-01-13 01:58:11 +01:00
Sam Lantinga
1ca4a31ec0 Fixed bug 4043 - SDL_windowswindow.c incorrect icon height
Needed to allocate space for the mask in the ICONIMAGE structure
2018-01-15 10:29:53 -08:00
Sam Lantinga
ea8417a072 Restored borderless window behavior where DOTA created a borderless window the size of the desktop and expected it to behave like a fullscreen desktop window.
A future SDL release will change the borderless window to act more like a normal window that happens to have no chrome, to support windows that draw their own chrome. In the meantime, those applications should set the "SDL_BORDERLESS_WINDOWED_STYLE" hint.
2018-01-10 18:00:51 -08:00