Commit Graph

3784 Commits (bf3e363d4b9d7c65c08c5a901fa0ebb81c4dd1de)

Author SHA1 Message Date
Patrice Mandin 46ec130528 Fix for 3829. Revert adding GameSir G4s, uses same GUID as PS3 controller. 2017-09-14 21:45:14 +02:00
Patrice Mandin 73c85e986c Readd support for GameSir G4s, lost with changeset 11431 2017-09-14 19:33:32 +02:00
Sam Lantinga e8187a3f78 Updated iOS keyboard test to cover text input rect and orientation changes 2017-09-14 09:56:16 -07:00
Sam Lantinga cfe72c76e2 Fixed iOS keyboard positioning, based on the final position rather than the initial one 2017-09-14 09:55:27 -07:00
Ryan C. Gordon 76176486ce surface: Make sure SDL_ConvertSurface() deals with palettes (thanks, Sylvain!).
Fixes Bugzilla #3826.
Fixes Bugzilla #2979.
2017-09-14 08:37:27 -04:00
Sam Lantinga ac782d7122 Added support for the PDP Battlefield One Xbox One controller on Linux 2017-09-12 05:53:47 -07:00
David Ludwig 78b83d3a6d WinRT: build fix when using recent versions of the Windows 10 SDK 2017-09-11 18:20:56 -04:00
Sam Lantinga e98fc8972d Fixed bug 3812 - Fallthrough warnings gcc-7 2017-09-10 12:54:40 -07:00
Sam Lantinga 5f48ce0b64 Fixed bug 3815 - implicit-fallthrough warning - DUFFS_LOOP4 and friends 2017-09-10 12:49:41 -07:00
Sam Lantinga 19114b0378 Fixed bug 3813 - gcc7 fallthrough warnings in SDL_iconv.c and SDL_pixels.c 2017-09-10 12:42:38 -07:00
Sam Lantinga 849c4c1472 Fixed tabs to spaces 2017-09-10 12:40:45 -07:00
Sam Lantinga 8ed16ea465 Fixed compile warning 2017-09-10 10:43:04 -07:00
Sam Lantinga 16b8c4ea43 Fixed bug 3811 - change HAVE_COPYSIGN to HAVE__COPYSIGN in SDL_config_windows.h
Ozkan Sezer

The patch below changes HAVE_COPYSIGN macro in SDL_config_windows.h to
HAVE__COPYSIGN, so that _copysign() can be used in SDL_stdlib.h which
is available in many more windows-targeting toolchains such as MinGW,
MSVC >= 6, etc, and not just  MSVC >= 2013. SDL_stdlib.c already has a
specific check for HAVE__COPYSIGN, so I believe this is reasonable.
2017-09-10 10:30:25 -07:00
Sam Lantinga 2cdb967435 Fixed the include path for khronos with Visual Studio 2017-09-10 10:25:36 -07:00
Sam Lantinga be1caece4a Correction: copysign has been supported by windows several toolchains
for a very long time, including MSVC6, MinGW, LCC-Win32, (no released
watcom versions though, but that's of no concern.)

Patch from Ozkan Sezer
2017-09-10 09:19:10 -07:00
Ryan C. Gordon 93583d461c alsa: removed snd_pcm_wait() call before writing to playback device.
This would cause playback problems in certain situations, such as on the
Raspberry Pi. The device that the wait was added for seems to not benefit from
it in modern times, and standard desktop Linux seems to do the right thing
when a USB device is unplugged now, without this patch.

Fixes Bugzilla #3599.
2017-09-09 21:17:46 -04:00
Sam Lantinga 569c222ca8 Updated documentation so it's clear you should use SDL_SetWindowDisplayMode() to change the size of fullscreen windows. 2017-09-09 11:04:35 -07:00
Sam Lantinga b2ba8963b3 Fixed bug 3809 - Restore after maximize leads to wrong size
Andreas Falkenhahn

My app opens a 640x480 window. When I click on the window's maximize button, the window correctly fills the entire screen and loses its borders. But clicking on the restore button now doesn't restore the window to its original 640x480 size. Instead, the window size is identical to the screen size now. The only difference to the previous state is that the window now has borders again but it isn't restored to 640x480.
2017-09-09 11:00:25 -07:00
Sam Lantinga 676c3a9263 Fixed bug 3719 - Cocoa - Incorrect window size when leaving fullscreen
bastien.bouclet

The window is now resized to its specified size, but it moves to the top left corner of the screen. That is unexpected because neither the user nor the program moved it there. Test program attached (the same one as before).
2017-09-09 10:31:44 -07:00
Sam Lantinga fcd9c19022 Fixed window size when leaving fullscreen mode (thanks Eric!) 2017-09-09 09:31:12 -07:00
Sam Lantinga f465f24d73 Fixed bug 3760 - RWops doesn't check for integer overflow when stdio_fseek only supports 32 bits
Simon Hug

When RWops seeks with fseek or fseeko it uses the types long or off_t which can be 32 bits on some platforms. stdio_seek does not check if the 64-bit integer for the offset fits into a 32-bit integer. Offsets equal or larger than 2 GiB will have implementation-defined behavior and failure states would be very confusing to debug.

The attached patch adds range checking by using the macros from limits.h for long type and some bit shifting for off_t because POSIX couldn't be bothered to specify min and max macros.

It also defines HAVE_FSEEKI64 in SDL_config_windows.h so that the Windows function gets picked up automatically with the default config.

And there's an additional error message for when ftell fails.
2017-09-09 08:36:37 -07:00
Sam Lantinga 125d8f59fc Make sure the libtool archives are installed 2017-09-09 08:34:46 -07:00
Sam Lantinga 9a73909bbd Fixed bug 3808 - fix a typo in SDL_stretch.c
Ozkan Sezer

The following patch fixes a minor _MSC_VER typo in SDL_stretch.c,
and also does a tiny tidy-up for assembly opcodes cpp checks.
2017-09-09 08:20:56 -07:00
Sam Lantinga 24a7495691 Updated config.guess and config.sub, added config.sub.patch for NaCl and Emscripten build support 2017-09-09 08:03:23 -07:00
Sam Lantinga 5c8bde4f7b Updated documentation to note that libvulkan-dev is no longer needed 2017-09-09 07:45:31 -07:00
Sam Lantinga f33377802a Fixed bug 3807 - Remove restriction from DECLSPEC macro for OS/2
Ozkan Sezer

The following patch removes the unnecessary / wrong
Watcom restriction from the DECLSPEC macro for OS/2.
2017-09-09 07:42:29 -07:00
Sam Lantinga 8004be6449 We don't need libvulkan-dev to build Vulkan support 2017-09-09 07:35:55 -07:00
Sam Lantinga 47cb8815a3 Updated Debian changelog for 2.0.6 release 2017-09-09 07:30:25 -07:00
Sam Lantinga 222d25ad4b Fixed bug 3805 - Why is there no --enable-video-rpi option in configure?
Andreas Falkenhahn

When compiling SDL for the Raspberry Pi, I have to use the --host parameter to enable compilation of the native Raspberry Pi video driver, like so:

    --host=arm-raspberry-linux-gnueabihf

It took me a while to figure out that this was necessary in order to have the native Raspberry Pi video driver compiled in. I think it would be better if there was an option like --enable-video-rpi that could be passed to configure and that would also show up when saying configure --help. Currently, it?s rather difficult to figure out that you have to use the --host parameter with arm-raspberry-linux-gnueabihf in order to get Raspberry Pi video support. It?s also somewhat inconsistent because most other video drivers can in fact be enabled/disabled through specific configure parameters but there is no such parameter for the native Raspberry Pi video driver.
2017-09-08 22:21:01 -07:00
Sam Lantinga e8059221bd Fixed bug 3806 - Fixes for MSVC compiler warnings
Simon Hug

These are the remaining compiler warnings I see in the current tip cb049cae7c3c.

- SDL_test_log.c defines _CRT_SECURE_NO_WARNINGS without checking if it was already set.

- SDL_windowskeyboard.c converts integers to pointers without going over the (U)INT_PTR types. That bothers MSVC.
2017-09-08 18:26:25 -07:00
Sam Lantinga 0ddac338b0 keep joystick thread from waking unnecessarily, and from possibly blocking for 300ms at shutdown if a joystick was just plugged in
CR: SamL
2017-09-08 07:15:47 -07:00
Sam Lantinga cedbb3118c Fixed building with the first version of Visual Studio 2017, which doesn't have __has_include() (Thanks Simon!) 2017-09-08 15:08:50 -07:00
Sam Lantinga 1b2492ed8a Fixed 64-bit build warning 2017-09-08 15:08:03 -07:00
Sam Lantinga 4657d9f33c We don't need to pass the renderer into SDLTest_CleanupTextDrawing() 2017-09-08 04:53:31 -07:00
Sam Lantinga 65c55fdd84 Fixed build 2017-09-08 04:38:46 -07:00
Sam Lantinga b0b3da7702 Added a function to clean up test text drawing 2017-09-08 04:14:05 -07:00
Ryan C. Gordon ca15c7d67f wave: SDL_LoadWAV now supports 24-bit audio. 2017-09-07 10:56:08 -04:00
Ryan C. Gordon fb28393200 vulkan: use "unsigned int" instead of "unsigned" 2017-09-06 19:35:36 -04:00
Ryan C. Gordon 0c892abcd0 raspberrypi: The latest Raspbian moved its EGL and GLES2 libs elsewhere.
Now we try the new (hardware-specific) pathnames first, and if those fail to
load, we'll try the more generic names that earlier versions of Raspbian used.

Fixes Bugzilla #3800.
2017-09-06 19:34:23 -04:00
Sam Lantinga fa0eeff7f5 sdl:
Cleans up AdjustWindowEx calls
2017-09-06 07:29:34 -07:00
Sam Lantinga 20c5bc9135 You can have a borderless resizable window 2017-09-06 05:23:26 -07:00
Sam Lantinga 4ca5d8622a Fixed bug 3780 - GCC 7 implicit fallthrough warnings
Martin Gerhardy 2017-08-28 06:58:01 UTC

SDL_blit.h, SDL_fillrect.c and SDL_stdinc.h produces a lot of the (new) gcc-7 implicit fallthrough warnings.
2017-09-06 04:32:30 -07:00
Sam Lantinga 28bf56c12c Fixed bug 3801 - HAVE_LIBSAMPLERATE_H depending on HAVE_LIBC in current SDL_config.h.in
Ozkan Sezer

HAVE_LIBSAMPLERATE_H is depending on HAVE_LIBC in current config.h.in:
it shouldn't be.  HAVE_LIBUDEV_H, HAVE_DBUS_DBUS_H, HAVE_IBUS_IBUS_H,
HAVE_FCITX_FRONTEND_H, and HAVE_ALTIVEC_H have the same situation too.
I suggest something like the following, which moves them out of the
HAVE_LIBC confinement and also moves the windows dx header stuff along
side them. (Not ideal, but a bit cleaner I think.)
2017-09-06 10:31:05 -07:00
Sam Lantinga d51dc7378b Fixed bug 3797 - configure check for float.h
Ozkan Sezer

Cmake checks for float.h, but configure does not:  the attached patch
adds float.h to checked headers in configury, and it adds the missing
HAVE_FLOAT_H macro to SDL_config.h.cmake and SDL_config.h.in.

In SDL_config_macosx.h and SDL_config_windows.h, defined HAVE_FLOAT_H
as 1, where I know that it's true.
2017-09-06 01:14:23 -07:00
Sam Lantinga c8e3e0c414 Fixed bug 3799 - SDL_CreateWindow fails with SDL_WINDOW_VULKAN (libvulkan.so.1 not found)
Manuel Sabogal

Android NDK defines Vulkan as libvulkan.so, not libvulkan.so.1. This is causing the program to not being able to create a window using SDL_WINDOW_VULKAN.

To fix this issue just change the line http://hg.libsdl.org/SDL/file/bbaec41e93b5/src/video/android/SDL_androidvulkan.c#l53 from "libvulkan.so.1" to "libvulkan.so"
2017-09-06 01:10:10 -07:00
Ryan C. Gordon c9e73c3e00 x11: make sure SDL_GetGlobalMouseState notices mouse warping through SDL APIs. 2017-09-05 16:15:54 -04:00
Sam Lantinga 0782f9be51 Fixed bug 3273 - Fix for slow video subsystem initialization when using XRandR.
Mart?n Golini

I'm having a very slow initialization of the video subsystem that locks the window creation for about 500 ms ( tested in at least 4 different systems ). What i found is that X11_InitModes_XRandR is using XRRGetScreenResources, that explicitly ask to poll the hardware for changes. This is not really necessary since if the data is already available you can use XRRGetScreenResourcesCurrent.
I attached a tentative patch that fix this issue. With the patch there's no lock when the subsystem is initialized and the window creation is instant in my applications. The patch only uses XRRGetScreenResourcesCurrent in X11_InitModes_XRandR but it could be potentially used in X11_GetDisplayModes and X11_SetDisplayMode.
2017-09-05 08:24:38 -07:00
Sam Lantinga 3261ca754f Fixed typos in 2.0.6 patch notes 2017-09-04 23:10:12 -07:00
Sam Lantinga d2eda2671d Added SDL_vulkan.h to the Mac OS X framework headers 2017-09-04 22:51:28 -07:00
Sam Lantinga c1fd0fbb32 Fixed compiler warning with mingw-w64 2017-09-04 22:14:57 -07:00