Commit Graph

3953 Commits (bd0def06ee47bee34a296da70cc0e4edd2dbd862)

Author SHA1 Message Date
Guillermo A. Amaral bd0def06ee 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 965c11f38a 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 c329381f4c 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 cd53220749 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.
2018-02-07 13:13:55 -05:00
Ryan C. Gordon 32d421d490 cmake: Minor cleanup (reuse a string we already calculated). 2018-02-07 13:07:59 -05:00
Sam Lantinga 73c26c204c 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 f59b9c8b13 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 6ed184ec69 Added SDL_IsAndroidTV() 2018-02-06 15:03:35 -08:00
Sam Lantinga 2b441ec6c4 SDL Changes to support clean reads
CR: saml
2018-02-05 11:40:39 -08:00
Sam Lantinga 35322ed847 Fixed building on tvOS 2018-02-01 15:46:51 -08:00
Sam Lantinga 85c34e9a39 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 330b19c968 Fixed building on platforms without __sighandler_t 2018-01-30 18:12:25 -08:00
Sam Lantinga 90e72bf4e2 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 e1d85985b2 Fixed misleading indentation 2018-01-30 16:53:24 -08:00
Sam Lantinga fab2e2463f 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 2ceeb99336 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 2d7420f238 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 af498591df testoverlay2: use SDL_atoi, not atoi. 2018-01-22 09:46:48 -05:00
Ryan C. Gordon e99daaf8b5 android: Fixed compiler warning about nested '/*' comments. 2018-01-22 09:45:16 -05:00
Ryan C. Gordon 488824017a wasapi: Fixed some compiler warnings. 2018-01-22 09:36:40 -05:00
Sam Lantinga 9338a619f8 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 61261e59bc 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 35554caf16 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 509db8afbd Fixed formatting, added actual count to SDL error message 2018-01-17 13:12:39 -08:00
John Bartholomew f9bdce61e1 Vulkan: Allow SDL_Vulkan_GetInstanceExtensions to be called with a larger array than necessary. 2018-01-14 13:34:50 +00:00
Marius Gripsgard 7cd39b7d15 Mir: Handle close window events 2018-01-13 01:58:11 +01:00
Sam Lantinga 0cba684794 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 a0c4eb2aa3 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
Alex Szpakowski 3bfada2e02 Android: resolve symlinks in SDL_AndroidGetInternalStoragePath (thanks Henrique Gemignani and cigumo!)
Fixes issues on modern Android versions when the path is used in code that explicitly doesn't follow symlinks (such as PHYSFS_mkdir).
2018-01-10 19:56:51 -04:00
Sam Lantinga 72d4507918 Added availability check to fix compiler warning for symbol only available on tvOS 11.0 and newer 2018-01-10 10:42:40 -08:00
Alex Szpakowski 7d5437bb31 metal: set max texture size based on device capability. 2018-01-07 22:00:37 -04:00
Alex Szpakowski a8c0532c08 metal: Fix pipeline states to use the pixel format of the current render target, instead of a hard-coded format. 2018-01-07 16:57:32 -04:00
Alex Szpakowski 740a90af37 metal: Add support for YUV/NV12 texture formats. 2018-01-06 18:54:12 -04:00
Alex Szpakowski 9a8683b275 metal: use a private instead of managed buffer for the renderer's non-changing constant data.
Recommended by Xcode's Metal frame capture analysis.
2018-01-04 22:16:42 -04:00
Alex Szpakowski 990ebba55a metal: Implement fast hardware clearing when possible, by deferring the start of a render pass until a clear or draw operation happens. 2018-01-04 19:29:33 -04:00
Sam Lantinga 66baf7363e Fixed spacing in copyright headers 2018-01-03 11:31:42 -08:00
Sam Lantinga 7c60bec493 Fixed bug 4018 - Implement SDL_GetWindowBordersSize() under Windows/Win32/WinAPI
Ismael Ferreras Morezuelas (Swyter)

As a new year gift I have implemented the Windows version of SDL_GetWindowBordersSize(). I needed it for auto-selecting a cozy window size for the game I'm currently working on and noticed that it only worked under X11, so I thought it could be a good excuse to contribute back more stuff. The Mercurial patch is attached as a .diff file. Let me know what you think.

Happy 2018 to all the SDL2 devs and users!

--

PS: Keep in mind that Windows 10 includes the 8px invisible grip borders as part of the frame. There's a way of detecting if Aero/DWM is being used and ask only for the visible rect, but I believe that GetWindowRect() is doing that for a reason and working as intended, so I haven't changed it. (See [2])


References:
[1]: http://www.firststeps.ru/mfc/winapi/r.php?72
[2]: https://stackoverflow.com/a/34143777/674685
[3]: https://stackoverflow.com/a/431548/674685
[4]: https://wiki.libsdl.org/SDL_GetWindowBordersSize
2018-01-03 10:58:58 -08:00
Sam Lantinga 8111a632be Fixed bug 4013 - Wayland: fix videoquit on multimonitor system
Vladimir

On multimonitor system Wayland_VideoQuit invalid deiniting.

Tested in Centos7 + Weston
2018-01-03 10:49:26 -08:00
Sam Lantinga 1fa4bcca6a Fixed bug 4012 - Wayland: invalid direction on mouse wheel
Vladimir

Invalid direction on mouse wheel

Patch tested in Centos 7 + Weston
2018-01-03 10:43:01 -08:00
Sam Lantinga 6bc3873729 Fixed bug 4011 - Wayland: fix free cursor
Vladimir

Sometimes SDL application crashes on cursor free.

Patch tested under Centos 7 + weston
2018-01-03 10:07:27 -08:00
Sam Lantinga e3cc5b2c6b Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Alex Szpakowski 888198ee31 metal: Misc. improvements.
- Use a single buffer for various non-changing constants accessed by the GPU, instead of multiple buffers.
- Do the half-pixel offset for points and lines using a transform matrix so we don't need a malloc when rendering.
- Don't add a half-pixel offset for other primitives and textures. This matches D3D and GL render behaviour.
- Remove the half-texel texture coordinate offset since it's not needed now that there's no more half-pixel position offset when rendering a texture.
- Don't try to set texture usage on iOS 8 since it doesn't exist there.
2018-01-03 00:43:01 -04:00
Alex Szpakowski f9cd765020 metal and moltenvk: fix highdpi. 2018-01-02 21:44:28 -04:00
Alex Szpakowski ef1014ac68 configure script: Implement testing for build-time Metal SDK support. 2018-01-02 19:06:14 -04:00
Sam Lantinga b3b5c47366 Fixed direction of y adjustment for new orthographic projection in the metal renderer 2018-01-02 14:32:15 -08:00
Sam Lantinga fa86807ceb Fixed metal renderer pixel centers when drawing 2018-01-02 14:11:10 -08:00
Alex Szpakowski 07f08b47ff metal: Fix a typo preventing iOS compilation... 2018-01-01 23:06:08 -04:00
Alex Szpakowski 1cc6603378 metal: Clean up manual reference counting. Fixes some memory leaks. 2018-01-01 23:03:50 -04:00
Ryan C. Gordon 7c667a6f7a windows: Remove references to GetVersionExA (thanks, Andrew Pilley!).
"GetVersionExA is deprecated in windows 8.1 and above's SDK, causing a warning
when building against the win10 SDK. Attached patch cleans up the usage for a
warning-free build.

GetVersionExA was being used to test to see if SDL was running on win9x or
winnt. A quick chat with Ryan on twitter suggested that SDL doesn't
officially support win9x anymore, so the call to this can be outright removed.

As an aside, replacing the call to GetVersionExA with VerifyVersionInfoA (the
recommended path) would have been pointless, as VerifyVersionInfoA only
supports VER_PLATFORM_WIN32_NT and doesn't officially support any other value
for dwPlatformId currently. (And it's probable that win9x SDKs didn't have
VerifyVersionInfo* in them anyway.)"

Fixes Bugzilla #4019.
2018-01-01 19:16:51 -05:00
Alex Szpakowski a452a08458 iOS: fix build 2018-01-01 19:40:29 -04:00