Ryan C. Gordon
5f123e31a3
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
5a8ecf4e79
yuv: Patched to make static analysis happy (warned about unused variable).
2018-06-25 13:14:52 -04:00
Ryan C. Gordon
4773690d0f
Deal with possible malloc(0) calls, as pointed out by static analysis.
2018-06-25 12:55:23 -04:00
Ryan C. Gordon
915a7e0341
gles2: Whoops, overzealous copy/paste on my part. :)
2018-06-25 01:57:28 -04:00
Ryan C. Gordon
c8ac909674
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.
2018-06-24 22:42:36 -07:00
Ethan Lee
0a7faa4ae5
Fix Linux haptic scaling, add 2.1 FIXME
2018-05-04 21:58:39 -04:00
Ethan Lee
de9f5415b3
Filter both SIZE_CHANGED and RESIZED on any SIZE_CHANGED
2018-08-13 12:52:52 -04:00
Sam Lantinga
95579f5f19
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
48f7e7f34d
Corrected PS4 controller entry
2018-09-30 22:43:12 -07:00
Sam Lantinga
f8b4cd410b
Re-enable drag-and-drop events by default
2018-09-30 19:53:26 -07:00
Alex Szpakowski
fb485986eb
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
56ec349d2a
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.)
2018-09-29 16:48:15 -04:00
Sam Lantinga
9e8e0fb7b1
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
74638ea3c5
Ensure we wait on the surface resize before returning from setting fullscreen mode.
2018-09-28 20:39:57 -07:00
Ozkan Sezer
31596f23ce
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
49803c8660
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
5454765a22
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
fde82e5972
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
cf7d64f266
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
Sam Lantinga
9aa8a75d26
Fixed building with Xcode 10.0
2018-09-28 01:18:54 -07:00
Ozkan Sezer
283680f2c1
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
f964ce03b4
Fixed mingw-w64 build
2018-09-28 01:00:47 -07:00
Sam Lantinga
20dfda4489
Fixed mingw-w64 build
2018-09-28 00:40:35 -07:00
Sam Lantinga
7df0f4fdac
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
d9fb77a3c1
SDL_atomic.c, SDL_spinlock.c: use lock prefix with xchg in Watcom asm.
2018-09-27 11:55:02 +03:00
Ozkan Sezer
bb5516ac8e
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
7689162ca0
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
6eeb8593ba
SDL_string.c (SDL_PrintString): avoid MSVC signed/unsigned mismatch warning
2018-09-27 01:10:50 +03:00
Ozkan Sezer
5342ae2bba
SDL_string.c (SDL_IntPrecisionAdjust): avoid MSVC generating a memset()
2018-09-27 01:00:50 +03:00
Ozkan Sezer
d2131ac165
SDL_vsnprintf: implement precision for the integral value printers.
2018-09-27 00:32:15 +03:00
Sam Lantinga
55b24b93b4
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
ffc19ee255
SDL_string.c: added comments to three SDL_FormatInfo members.
2018-09-26 20:47:34 +03:00
Sam Lantinga
bc6c199790
Updated version to 2.0.9
2018-09-26 10:08:14 -07:00
Ozkan Sezer
8743e9759e
SDL_vsnprintf: when '.' is specified, take precision as 0 if it is < 0.
2018-09-26 17:11:40 +03:00
Ozkan Sezer
69ab8541a9
SDL_vsnprintf: string printer now honors the precision. (bug #4263.)
2018-09-26 10:40:02 +03:00
Ozkan Sezer
d0e9a36460
SDL_vsnprintf: %.* and %* now parse precision and width. (bug #4263.)
2018-09-26 10:38:40 +03:00
Sam Lantinga
e236e8435a
Fixed bug 4268 - Android_JNI_OpenAudioDevice function has error
...
alittle
where iscapture == 1
1.param set error
(*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureOpen, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames)
param:audioBuffer16Bit need change to captureBuffer16Bit
2.logic error
if (is16Bit) {
// ALITTLE Modify the source code
if (iscapture) {
audioBufferFrames = (*env)->GetArrayLength(env, (jshortArray)captureBuffer);
} else {
audioBufferPinned = (*env)->GetShortArrayElements(env, (jshortArray)audioBuffer, &isCopy);
audioBufferFrames = (*env)->GetArrayLength(env, (jshortArray)audioBuffer);
}
// if (!iscapture) {
// audioBufferPinned = (*env)->GetShortArrayElements(env, (jshortArray)audioBuffer, &isCopy);
// }
// audioBufferFrames = (*env)->GetArrayLength(env, (jshortArray)audioBuffer);
} else {
// ALITTLE Modify the source code
if (iscapture) {
audioBufferFrames = (*env)->GetArrayLength(env, (jbyteArray)captureBuffer);
} else {
audioBufferPinned = (*env)->GetByteArrayElements(env, (jbyteArray)audioBuffer, &isCopy);
audioBufferFrames = (*env)->GetArrayLength(env, (jbyteArray)audioBuffer);
}
// if (!iscapture) {
// audioBufferPinned = (*env)->GetByteArrayElements(env, (jbyteArray)audioBuffer, &isCopy);
// }
// audioBufferFrames = (*env)->GetArrayLength(env, (jbyteArray)audioBuffer);
}
2018-09-25 20:08:51 -07:00
Sam Lantinga
60afec79bf
Removed redundant SDL_GetColorKey() call. (thanks Sylvain!)
2018-09-25 19:53:16 -07:00
Ethan Lee
7f9854b9b2
WinRT: Wait until audio device activation is complete and PrepDevice during OpenAudio
2018-09-25 01:45:12 -04:00
Sam Lantinga
aa9683bb6f
Added 8bitdo SF 30 PRO controller support for Linux / DInput mode (thanks Frank Hartung)
2018-09-25 19:41:33 -07:00
Sam Lantinga
fb0e68ae0f
Fixed building with newer Android NDK
2018-09-25 08:23:57 -07:00
Ozkan Sezer
870c44bfed
safer this way, just in case..
2018-09-25 09:20:56 +03:00
Sam Lantinga
ef34704875
Fixed bug 4264 - SDL_CreateTextureFromSurface generates error message but returns ok
...
Anthony @ POW Games
SDL_CreateTextureFromSurface makes an internal call to SDL_GetColorKey which can return an error and spams the error log with "Surface doesn't have a colorkey" even though the original function didn't return an error.
2018-09-24 16:41:55 -07:00
Sam Lantinga
cd90e2ca58
Fixed bug 4267 - linkage failure with --enable-hidapi because of missing libudev symbols
...
Ozkan Sezer
hidapi dynamic udev initial patch
2018-09-24 16:33:14 -07:00
Sam Lantinga
5febdfcece
Fixed whitespace
2018-09-24 11:49:25 -07:00
Sam Lantinga
d07fe7ad95
Removed button logging message
2018-09-21 09:41:21 -07:00
Sam Lantinga
e8b0859f17
Added missing call to WindowsDeleteString()
2018-09-20 15:55:52 -07:00
Sam Lantinga
600126c90e
Added experimental support for Windows.Gaming.Input
2018-09-19 10:03:40 -07:00
Sam Lantinga
f6a537cbfa
Store the API device refcount on the device itself, so if the device is disconnected and we have multiple application references to it, we only free it once.
2018-09-17 11:35:24 -07:00
Sam Lantinga
59a2d12cc3
Fixed creating an Android game controller mapping for HIDAPI devices on initialization
2018-09-17 11:35:22 -07:00