Commit graph

11215 commits

Author SHA1 Message Date
Ryan C. Gordon
7fbc806f83 Attempt to fix "cast from pointer to integer of different size" warnings. 2018-06-29 16:56:11 -04:00
Ryan C. Gordon
c2b083ec57 Corrected a comment. 2018-06-29 16:55:55 -04:00
Ryan C. Gordon
11298991b4 Patched to compile on Visual Studio (typo). 2018-06-25 23:00:38 -04:00
Ryan C. Gordon
d2fcd08e53 atomic: Fight with all the assemblers that don't like REP NOP. :/ 2018-06-25 16:34:16 -04:00
Ryan C. Gordon
db4f3793c0 atomic: Spin locks now try to use the x86 PAUSE instruction for short waits.
Fixes Bugzilla #4151.
2018-06-25 15:58:35 -04:00
Ryan C. Gordon
a9d21ce606 yuv: Patched to make static analysis happy (warned about unused variable). 2018-06-25 13:14:52 -04:00
Ryan C. Gordon
82f977c0b5 Deal with possible malloc(0) calls, as pointed out by static analysis. 2018-06-25 12:55:23 -04:00
Ryan C. Gordon
ecd3391777 wayland: Keep protocol XML files in-tree.
Now you don't need the latest Wayland installed to build with
newer protocols supported, as they'll build correctly; even if
your system can't use them, we can make intelligent decisions
at runtime about what's available on the current machine anyhow.

This also simplifies some logic and possible failure cases in
the configure and CMake scripts.

Fixes Bugzilla #4207.

--HG--
extra : amend_source : 1b786977f162f8a9e984f543a044e1a0da80f2bd
2018-06-25 09:37:25 -07:00
Ryan C. Gordon
c84533767a gles2: Whoops, overzealous copy/paste on my part. :) 2018-06-25 01:57:28 -04:00
Ryan C. Gordon
f881ef4e85 wayland: Implemented xdg-wm-base support.
This is just in parity with the existing zxdg-shell-unstable-v6 code. Making
the Wayland target robust (and uh, with title bars) is going to take a lot
of work on top of this.

--HG--
extra : amend_source : eb632de165fc406527a6627635382c22151223b5
2018-06-24 22:42:36 -07:00
Ryan C. Gordon
9ddbda088a android: Android.mk should only preserve debug symbols in debug builds.
Fixes Bugzilla #4111.
2018-06-24 15:21:01 -04:00
Ethan Lee
6066a1cf5f Fix Linux haptic scaling, add 2.1 FIXME 2018-05-04 21:58:39 -04:00
Ethan Lee
df8756b82e Filter both SIZE_CHANGED and RESIZED on any SIZE_CHANGED 2018-08-13 12:52:52 -04:00
Sam Lantinga
14b889610a Fixed bug 4220 - SDL_GL_CONTEXT_DEBUG_FLAG can fail silently on some Android devices 2018-10-01 09:40:58 -07:00
Sam Lantinga
41cc9b6a8f Corrected PS4 controller entry 2018-09-30 22:43:12 -07:00
Sam Lantinga
5d17c0979b Re-enable drag-and-drop events by default 2018-09-30 19:53:26 -07:00
Alex Szpakowski
a35f2b8c96 macOS: Fix a crash when the video subsystem quits, if SDL_MAC_NO_SANDBOX was defined when SDL was compiled. 2018-09-30 11:26:41 -03:00
Ryan C. Gordon
b21dca1f3c audio: disable NEON converters for now.
To be revisited after 2.0.9 ships!

(doesn't fix Bugzilla #4186, but stops the regression for the time being.)

--HG--
extra : rebase_source : f9f0740cfb6327c526e01a198a3ed049df1e9019
2018-09-29 16:48:15 -04:00
Sam Lantinga
88aa4120ba Fixed tablet detection on Android 2018-09-29 02:14:46 -07:00
Ozkan Sezer
c46431aacd fix permissions 2018-09-29 09:20:50 +03:00
Sam Lantinga
59f9488aa2 Mark a subsystem as dummy, not disabled, if it was intended to be compiled in.
From Tom Black:

I'm having problems initializing the sensor module. I'm compiling with a standard ./configure && make && sudo make install, and the module says it's enabled, but SDL_Init(SDL_INIT_EVERYTHING) is failing with SDL_GetError() returning "SDL not built with sensor support".
2018-09-28 21:19:27 -07:00
Sam Lantinga
567aeed888 commit 8f4dedc039190f5e734c47dcc4fc021b5793b659
Author: Michał Janiszewski <janisozaur+signed@gmail.com>
Date:   Fri Sep 28 20:38:04 2018 +0200

    CMake: fix building tests on Linux

    In case where libunwind.h has been found, it will be used by compiler,
    but linker wasn't updated to reflect use of this new library.
2018-09-28 21:03:39 -07:00
Sam Lantinga
744638c48c Fixed bug 4283 - SDL's version of memset is different from libc's
janisozaur

memset's documentation reads:

* The memset() function shall copy c (converted to an unsigned char) into each of the first n bytes of the object pointed to by s. (http://pubs.opengroup.org/onlinepubs/9699919799/functions/memset.html)
* Sets the first count characters of dest to the character c. (https://msdn.microsoft.com/en-us/library/1fdeehz6.aspx)
* write a byte to a byte string (https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/memset.3.html)

The highlight here is they all mean a single _byte_, even though memset receives a parameter of type int, which can hold more data than a single byte. SDL's implementation of memset, however, does not clear any of the higher bits, causing an erroneous behaviour when passed an argument bigger than 0xff.
2018-09-28 20:48:18 -07:00
Sam Lantinga
6911c8ca79 Ensure we wait on the surface resize before returning from setting fullscreen mode. 2018-09-28 20:39:57 -07:00
Ozkan Sezer
c9fd1e0c97 SDL_vsnprintf: implemented '+' flag for signed integers printing.
it is, of course, ignored for %u, %x, %o and %p.
2018-09-29 01:24:10 +03:00
Ozkan Sezer
fba16676b4 SDL_vsnprintf: fix numerics if both zero-padding and a field are given.
it used to place zeroes between the sign and the number. (space-padding
from within SDL_PrintString() seems OK:  spaces are added before sign.)

also fixed the maxlen handling if the number has a sign.
2018-09-29 00:51:24 +03:00
Ozkan Sezer
44a1eaf327 replace bool stuff in controller_type.h with SDL_bool.
remove bool<->SDL_bool dance in SDL_joystick.c:SDL_IsJoystickSteamController()
after the controller_type.h change.
2018-09-28 17:01:24 +03:00
Ozkan Sezer
775a941c1b SDL_hidapi_ps4.c: add HAVE_ENDPOINTVOLUME_H check to win32 volume code.
this makes it build with my old toolchain with mingw-w64 1.0.10 headers
2018-09-28 14:01:40 +03:00
Ozkan Sezer
51c040ed93 hidapi/windows/hid.c: comment out ntdef.h include after windows.h.
not necessary and can cause redefinition errors in some toolchains.
2018-09-28 13:44:10 +03:00
Ozkan Sezer
c85ef4d8f9 configury, cmake: add check for endpointvolume.h :
add HAVE_ENDPOINTVOLUME_H, HAVE_MMDEVICEAPI_H and HAVE_AUDIOCLIENT_H
in SDL_config.h.in, SDL_config.h.cmake, SDL_config_windows.h, and in
SDL_config_winrt.h.
2018-09-28 13:41:04 +03:00
Ozkan Sezer
91ed631b04 configury, cmake: make wasapi option independent of directx. 2018-09-28 11:30:50 +03:00
Sam Lantinga
695a3d1b65 Fixed building with Xcode 10.0 2018-09-28 01:18:54 -07:00
Ozkan Sezer
2ea7eb1b60 hidapi/windows/hid.c: fix misplaced #if 0
VendorID && ProductID are only used by the test main(),
otherwise they are unwanted globals.
2018-09-28 11:04:55 +03:00
Sam Lantinga
bbbc993a43 Fixed mingw-w64 build 2018-09-28 01:00:47 -07:00
Sam Lantinga
b77667a892 Fixed mingw-w64 build 2018-09-28 00:40:35 -07:00
Sam Lantinga
5df3c8ad49 Added patch notes for SDL 2.0.9 2018-09-27 23:54:40 -07:00
Sam Lantinga
31dde82573 Fixed bug 4277 - warnings patch
Sylvain

Patch a few warnings when using:
-Wmissing-prototypes -Wdocumentation -Wdocumentation-unknown-command

They are automatically enabled with -Wall
2018-09-27 14:56:29 -07:00
Ozkan Sezer
0bec5913e1 SDL_atomic.c, SDL_spinlock.c: use lock prefix with xchg in Watcom asm. 2018-09-27 11:55:02 +03:00
Ozkan Sezer
cef7f91ad7 SDL_vsnprintf() updates for zero-padding:
- remove force-enabling of pad_zeroes for %u for compatibility
 (was added in https://hg.libsdl.org/SDL/rev/701f4a25df89)
- ignore pad_zeroes for %s and %S
- ignore pad_zeroes for %d, %i and %u if a precision is given
2018-09-27 09:37:36 +03:00
Ryan C. Gordon
91ec11ca1c cocoa: Force an OpenGL context update when the window becomes key.
Fixes missing rendering on macOS 10.14 ("Mojave").

Fixes Bugzilla #4272.
2018-09-26 20:10:32 -04:00
Ozkan Sezer
b790f7c7f0 SDL_string.c (SDL_PrintString): avoid MSVC signed/unsigned mismatch warning 2018-09-27 01:10:50 +03:00
Ozkan Sezer
f3ab23f1b4 SDL_string.c (SDL_IntPrecisionAdjust): avoid MSVC generating a memset() 2018-09-27 01:00:50 +03:00
Ozkan Sezer
e37d95f937 SDL_vsnprintf: implement precision for the integral value printers. 2018-09-27 00:32:15 +03:00
Sam Lantinga
ff07432006 Fixed bug 4265 - SDL window falls to the bottom of the screen when dragged down and stuck there
Alexei

On WM_WINDOWPOSCHANGED event, WIN_UpdateClipCursor() is called. SDL_WINDOW_INPUT_FOCUS is set even when the mouse pointer is not inside the SDL window and therefore ClipCursor(&rect) is called. When dragging the window and rect.bottom=800 (i.e. the bottom edge of the screen) the SDL window is clipped to the bottom of the screen and it is not possible to move it back to the center of the screen.
2018-09-26 11:17:43 -07:00
Ozkan Sezer
d7099fbf16 SDL_string.c: added comments to three SDL_FormatInfo members. 2018-09-26 20:47:34 +03:00
Sam Lantinga
f355625f9c Updated version to 2.0.9 2018-09-26 10:08:14 -07:00
Ozkan Sezer
fcc9b1cd3c SDL_vsnprintf: when '.' is specified, take precision as 0 if it is < 0. 2018-09-26 17:11:40 +03:00
Ozkan Sezer
a52fce6463 SDL_vsnprintf: string printer now honors the precision. (bug #4263.) 2018-09-26 10:40:02 +03:00
Ozkan Sezer
f86cde1073 SDL_vsnprintf: %.* and %* now parse precision and width. (bug #4263.) 2018-09-26 10:38:40 +03:00
Sam Lantinga
675c561fef Fixed bug 4270 - Android HIDDeviceManager function needs to be public
Sylvain

Can't run an android app without declaring the JNI interface function as public.
2018-09-25 20:11:52 -07:00