Commit graph

10111 commits

Author SHA1 Message Date
Ryan C. Gordon
156d7fc580 haiku: non-x86 spins use a normal libstdc++ filename. Handle the differences.
Fixes Bugzilla #3730.

--HG--
extra : rebase_source : e89755d5a83bb4c0a8c1456e3c58390d358742f9
2017-08-09 18:41:59 -04:00
Ryan C. Gordon
693c9d586f haiku: Fixed compiler warning.
--HG--
extra : rebase_source : a6cc1677a4ce007410572abe1be2e5e99de29621
2017-08-09 18:30:48 -04:00
Sam Lantinga
3c8dc5ab15 Added a private hint for Steam to bypass the controller filtering for the Steam virtual gamepad 2017-08-09 12:38:20 -07:00
Sam Lantinga
a0941b37eb Fixed Linux build 2017-08-09 12:11:59 -07:00
Sam Lantinga
b044a3bba8 Added SDL hints to filter the set of game controllers reported by SDL 2017-08-09 11:59:29 -07:00
Sam Lantinga
5c88b8141c Added an API SDL_LoadFile_RW() to load all the data from an SDL data stream, and a convenience macro SDL_LoadFile() to load all the data from a file. 2017-08-09 11:58:38 -07:00
Ryan C. Gordon
dbc08babc8 haiku: Patched SDL_bopengl.cc to compile on x86-64 Haiku.
Fixes Bugzilla #3729.
2017-08-09 01:01:41 -04:00
Ryan C. Gordon
3fee4ae999 Fixed up some compile warnings and errors on x86-64 Haiku. 2017-08-09 00:56:05 -04:00
Ryan C. Gordon
9a1eaedb59 Added a FIXME for 2.1 about an API change. 2017-08-09 00:55:27 -04:00
Sam Lantinga
673e94c9c0 Re-added missing entry for the Steam Virtual Gamepad (was Valve Streaming Gamepad) 2017-08-08 20:38:23 -07:00
Sam Lantinga
41065dbd28 Fixed building on various versions of GCC - YUV MMX code is disabled for now 2017-08-07 10:28:59 -07:00
Ryan C. Gordon
56c21e656b README-linux.md: added libsndio-dev to the package list. 2017-08-07 00:36:45 -04:00
Ryan C. Gordon
187fea6b1b sndio: Fix for some platforms (Linux, for example) that don't define INFTIM.
Fixes Bugzilla #3712.

--HG--
extra : histedit_source : af73344d6ccf91bdbe8413d017899fdd91c8e84f
2017-08-07 00:25:18 -04:00
Philipp Wiesemann
429808fe36 emscripten: Fixed compiler warnings about integer to pointer conversions.
Found by buildbot.
2017-08-05 22:10:55 +02:00
Philipp Wiesemann
0d165785e8 emscripten: Fixed compiling without OpenGL support. 2017-08-05 22:10:48 +02:00
Philipp Wiesemann
43c717afea kmsdrm: Fixed crashes if allocating memory failed. 2017-08-05 22:10:36 +02:00
Philipp Wiesemann
b444e5785d nacl: Fixed freeing static memory on video quit. 2017-08-05 22:10:25 +02:00
Philipp Wiesemann
3066aea0db mir: Removed unnecessary function declaration. 2017-08-05 22:10:15 +02:00
Philipp Wiesemann
c10c85a21d Updated generated configure script. 2017-08-04 23:01:01 +02:00
Philipp Wiesemann
fa1b1b92a0 kmsdrm: Fixed compiling without OpenGL support. 2017-08-04 23:00:47 +02:00
Philipp Wiesemann
ac6afcf3ca Fixed compiler warnings about type conversions.
Found by buildbot.
2017-08-04 23:00:30 +02:00
Ryan C. Gordon
350d9a1b0a psp: Force audio channels to stereo if > 2 channels requested (thanks, Solra!).
Fixes Bugzilla #3726.
2017-08-04 16:18:34 -04:00
Sam Lantinga
7fa2e3e6cb Temporary hack to fix bug 3725 - Call made to glGetString before context creation
This breaks bugs 2570, 3145
2017-08-04 13:06:56 -07:00
Sam Lantinga
ce95a81949 Added a hint SDL_HINT_TOUCH_MOUSE_EVENTS to control whether touch events generate synthetic mouse events. 2017-08-03 09:48:44 -07:00
Brandon Schaefer
116acfc15a kmsdrm: Fix tearing in neverputt/ball
https://gfycat.com/FatalFarawayHeron
2017-08-02 17:45:15 -07:00
Patrice Mandin
550cd3b5b4 Add support for Saitek P990 Dual Analog Pad 2017-08-02 23:42:08 +02:00
Brandon Schaefer
13f724bb38 kmsdrm: Fix leaking SDL_VideoDevice* 2017-08-02 13:51:14 -07:00
Sam Lantinga
071ebfc1d7 Fixed bug 3311 - Broken touch positions with SDL_RenderSetLogicalSize & HIGHDPI on iOS
Eric wing

Hi, I think I found a bug when using SDL_WINDOW_ALLOW_HIGHDPI with SDL_RenderSetLogicalSize on iOS. I use SDL_RenderSetLogicalSize for all my stuff. I just tried turning on SDL_WINDOW_ALLOW_HIGHDPI on iOS and suddenly all my touch/mouse positions are really broken/far-off-the-mark.

I actually don't have a real retina device (still) so I'm seeing this using the iOS simulator with a 6plus template.

Attached is a simple test program that can reproduce the problem. It uses RenderSetLogicalSize and draws some moving happy faces (to show the boundaries/space of the LogicalSize and that it is working correctly for that part).

When you click/touch, it will draw one more happy face where your button point is.

If you comment out SDL_WINDOW_ALLOW_HIGHDPI, everything works as expected. But if you compile with it in, the mouse coordinates seem really far off the mark. (Face appears far up and to the left.)


Alex Szpakowski on the mailing list suggests the problem is
"I believe this is a bug in SDL_Render’s platform-agnostic mouse coordinate scaling code. It assumes the units of the mouse coordinates are always in pixels, which isn’t the case where high-DPI is involved (regardless of whether iOS is used) – they’re actually in “DPI independent” coordinates (which matches the window size, but not the renderer output size)."

Additionally, if this is correct, the Mac under Retina is also probably affected too and "as well as any other platform SDL adds high-dpi support for in the future".
2017-08-02 13:38:46 -07:00
Sam Lantinga
6459ca6cc0 Fixed bug 3722 - Fall back to xinerama/xvidmode if xrandr modes initialization fails
Levi Bard

In some environments, xrandr modes initialization can fail even though xrandr support is present and of a sufficient version.
(The one I encountered was an AWS instance running a virtual display)

The attached patch allows SDL to keep trying other methods if xrandr modes initialization fails (still subject to SDL_VIDEO_X11_REQUIRE_XRANDR).
2017-08-02 10:28:13 -07:00
Sam Lantinga
583a4f42cf Fixed potential free of uninitialized memory (thanks Simon!) 2017-08-02 10:24:47 -07:00
Sam Lantinga
9afeb8f34f Fixed bug 3690 - SDL2 KMS/DRM render context support
Manuel

The attached patch adds support for KMS/DRM context graphics.

It builds with no problem on X86_64 GNU/Linux systems, provided the needed libraries are present, and on ARM GNU/Linux systems that have KMS/DRM support and a GLES2 implementation.
Tested on Raspberry Pi: KMS/DRM is what the Raspberry Pi will use as default in the near future, once the propietary DispmanX API by Broadcom is overtaken by open graphics stack, it's possible to boot current Raspbian system in KMS mode by adding "dtoverlay=vc4-kms-v3d" to config.txt on Raspbian's boot partition.
X86 systems use KMS right away in every current GNU/Linux system.

Simple build instructions:

$./autogen.sh
$./configure --enable-video-kmsdrm
$make
2017-08-02 10:22:48 -07:00
Ryan C. Gordon
6ea5de0896 x11: Make a separate unmapped window to own clipboard selections.
Now the clipboard isn't lost if you destroy a specific SDL_Window, as it
works on other platforms. You will still lose the clipboard data on
SDL_Quit() or process termination, but that's X11 for you; run a
Clipboard Manager daemon.

Fixes Bugzilla #3222.
Fixes Bugzilla #3718.
2017-07-31 13:49:22 -04:00
Sam Lantinga
cd0346c192 Fixed bug 3697 - Main thread gets stuck on left mouse down
Eric Wasylishen

I think I found a better fix.

The problem with https://hg.libsdl.org/SDL/rev/81e6d0f852fc is setting the styleMask to 0 clears the NSWindowStyleMaskFullScreen bit, which then confuses Cocoa later when you try to leave fullscreen. Instead I'm just clearing the NSWindowStyleMaskResizable bit, although SetWindowStyle(window, NSWindowStyleMaskFullScreen); seems to also work.
2017-08-01 20:16:10 -07:00
Sam Lantinga
988ff2fc2f Backed out changeset 81e6d0f852fc for bug 3697
Eric Wasylishen

Unfortunately this commit seems to have broken exiting desktop-fullscreen.
- Launch testgl2.
- Press alt+enter to go fullscreen-desktop
- Press alt+enter again. The spinning cube will freeze, and the window stays fullscreen desktop.
2017-08-01 20:09:23 -07:00
Sam Lantinga
8d2f4c623e Fixed bug 3720 - SDL_GL_GetAttribute doesn't check for initialized video driver
Simon Hug

SDL_GL_GetAttribute doesn't check if a video driver has been initialized and will access the SDL_VideoDevice pointer, which is NULL at that point.

I think all of the attributes require an initialized driver, so a simple NULL check should fix it. Patch is attached.
2017-07-31 12:57:15 -07:00
Ryan C. Gordon
59c39daef9 Disable static builds for static analysis.
There's really no sense in analyzing everything twice, and this makes the
job finish significantly faster.
2017-07-30 14:36:01 -04:00
Ryan C. Gordon
3fc1531a34 windows-buildbot-zipper.bat: Check the correct path. 2017-07-30 14:09:18 -04:00
Ryan C. Gordon
9f32a9b1b1 Buildbot should zip up Visual Studio Win64 binaries, too.
--HG--
extra : rebase_source : ae16b5a86fb9903dd6a72b90c1a34164f4342105
2017-07-30 10:09:34 -04:00
Philipp Wiesemann
3c44f8114f Fixed typos in shape header. 2017-07-29 23:00:54 +02:00
Philipp Wiesemann
78636e9f5e qnx: Fixed error message. 2017-07-29 23:00:45 +02:00
Philipp Wiesemann
06d0fac495 aix: Removed unused local variable.
Found by Cppcheck.
2017-07-29 23:00:34 +02:00
Philipp Wiesemann
b06a75d176 haiku: Changed header paths to be more compatible. 2017-07-29 23:00:14 +02:00
Brandon Schaefer
3d389a8ab4 evdev: Fix 'Syscall param ioctl(TIOCLINUX) points to uninitialised byte'
https://pastebin.com/raw/tQjG0kG0
2017-07-28 12:00:10 -07:00
Sam Lantinga
3ed584e7f4 Fixed crash if the WASAPI audio device couldn't be recovered 2017-07-27 22:55:18 -07:00
Sam Lantinga
c26f57e9ef Fixed infinite recursion if the WASAPI audio device couldn't be recovered 2017-07-27 22:52:19 -07:00
Sam Lantinga
fb87969169 Fixed typo in WASAPI shutdown code 2017-07-27 02:41:58 -07:00
Brandon Schaefer
a9e6070cda [mir] Same no need to wrap this, which is already being done 2017-07-27 08:03:11 -07:00
Brandon Schaefer
320d0d095e [mir] Point to SDL_EGL_UnloadLibrary vs doing it our selfs 2017-07-26 18:10:45 -07:00
Ryan C. Gordon
b6f0f4994e Whoops, forgot to commit the actual fix. :) 2017-07-26 13:54:11 -04:00
Ryan C. Gordon
8a882c26bb Disable MMX inline assembly on Clang for now.
We should probably rewrite this with SSE compiler intrinsics or something
anyhow.
2017-07-26 13:43:25 -04:00