Ozkan Sezer
d5305bcd65
fix permissions
2018-09-29 09:20:50 +03:00
Sam Lantinga
adeec3f1ca
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
bfe46b22f8
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
9fc360ae14
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
8bb9fc0467
Ensure we wait on the surface resize before returning from setting fullscreen mode.
2018-09-28 20:39:57 -07:00
Ozkan Sezer
be55d5101a
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
6e7826b49c
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
7134a34e6f
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
f54b8648e5
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
04357dc42b
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
e2590c813a
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
7cf78d7476
configury, cmake: make wasapi option independent of directx.
2018-09-28 11:30:50 +03:00
Sam Lantinga
d023dff8a5
Fixed building with Xcode 10.0
2018-09-28 01:18:54 -07:00
Ozkan Sezer
cfedb77376
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
890ade0074
Fixed mingw-w64 build
2018-09-28 01:00:47 -07:00
Sam Lantinga
6b08f121d8
Fixed mingw-w64 build
2018-09-28 00:40:35 -07:00
Sam Lantinga
b5ac7cdfce
Added patch notes for SDL 2.0.9
2018-09-27 23:54:40 -07:00
Sam Lantinga
f1173c73cb
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
dcf1597db1
SDL_atomic.c, SDL_spinlock.c: use lock prefix with xchg in Watcom asm.
2018-09-27 11:55:02 +03:00
Ozkan Sezer
5d3b29940e
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
e263c7d84a
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
8d8ae9b0c0
SDL_string.c (SDL_PrintString): avoid MSVC signed/unsigned mismatch warning
2018-09-27 01:10:50 +03:00
Ozkan Sezer
ec0e4edc8d
SDL_string.c (SDL_IntPrecisionAdjust): avoid MSVC generating a memset()
2018-09-27 01:00:50 +03:00
Ozkan Sezer
38b504d966
SDL_vsnprintf: implement precision for the integral value printers.
2018-09-27 00:32:15 +03:00
Sam Lantinga
c89345260c
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
c7f80df3ba
SDL_string.c: added comments to three SDL_FormatInfo members.
2018-09-26 20:47:34 +03:00
Sam Lantinga
8f20146d89
Updated version to 2.0.9
2018-09-26 10:08:14 -07:00
Ozkan Sezer
e15e153eef
SDL_vsnprintf: when '.' is specified, take precision as 0 if it is < 0.
2018-09-26 17:11:40 +03:00
Ozkan Sezer
d5e5c6c90d
SDL_vsnprintf: string printer now honors the precision. (bug #4263.)
2018-09-26 10:40:02 +03:00
Ozkan Sezer
5ca98d3506
SDL_vsnprintf: %.* and %* now parse precision and width. (bug #4263.)
2018-09-26 10:38:40 +03:00
Sam Lantinga
00aad31722
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
Sam Lantinga
d2c63256f8
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
de4f287d7f
Removed redundant SDL_GetColorKey() call. (thanks Sylvain!)
2018-09-25 19:53:16 -07:00
Ethan Lee
d62e66030e
WinRT: Wait until audio device activation is complete and PrepDevice during OpenAudio
2018-09-25 01:45:12 -04:00
Sam Lantinga
84dcf914ec
Added 8bitdo SF 30 PRO controller support for Linux / DInput mode (thanks Frank Hartung)
2018-09-25 19:41:33 -07:00
Sam Lantinga
8fbb4a7c28
Fixed building with newer Android NDK
2018-09-25 08:23:57 -07:00
Ozkan Sezer
6812a42fbb
safer this way, just in case..
2018-09-25 09:20:56 +03:00
Sam Lantinga
018357cfcc
Fixed rare null pointer dereference
2018-09-24 20:31:24 -07:00
Sam Lantinga
2a05f4681b
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
6d35b7a054
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
175f9bc0e2
Support relative mouse for Samsung DeX on Samsung Experience 9.5 or later (Android 8.1 or later)
2018-09-24 11:53:04 -07:00
Sam Lantinga
85b2a541a6
Fixed whitespace
2018-09-24 11:49:25 -07:00
Drew Pirrone-Brusse
11a6e91c74
Correct the name of the SDL shared library in CMake for Mac OS
2018-08-18 17:23:40 -04:00
Sam Lantinga
fe4b2aa419
Fixed bug 3166 - It would be nice, if SDL would support including SDL project as a subdirectory into another CMake project
...
Wayde Reitsma
After attempting to use SDL2 in the way described in this bug, I found the main issue was the includes not being added to the compiler command.
I found the issue was that the target_include_directories commands for the SDL2, SDL2-static and SDL2main targets only sets the public includes for installations using the INSTALL_INTERFACE generator expression.
I have written a patch to CMakeLists.txt that fixes this issue by adding another item to the target_include_directories commands, utilizing the BUILD_INTERFACE generator expression to correctly add the include directory during builds.
2018-09-24 08:41:59 -07:00
Sam Lantinga
162e9755c0
Removed button logging message
2018-09-21 09:41:21 -07:00
Sam Lantinga
5c51894da0
Added missing call to WindowsDeleteString()
2018-09-20 15:55:52 -07:00
Sam Lantinga
9cc586608e
Added experimental support for Windows.Gaming.Input
2018-09-19 10:03:40 -07:00
Ryan C. Gordon
26215bb307
cmake: correctly report Vulkan support at configure time (thanks, Tiago!).
...
Fixes Bugzilla #4262 .
2018-09-18 11:49:42 -04:00
Sam Lantinga
70b54e55ba
Fixed NullPointerException if there's no singleton
2018-09-17 12:08:05 -07:00
Sam Lantinga
c37adc91b5
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