Commit graph

9717 commits

Author SHA1 Message Date
Philipp Wiesemann
ca30563db8 Fixed handling only one event per frame in testshape program. 2017-06-24 23:45:19 +02:00
Ryan C. Gordon
a2d3bf71c1 xinput: use the full range of the haptic motors (thanks, Trent!).
XInput goes from 0 to 64k; we were feeding it values in the range of 0 to 32k.

Fixes Bugzilla #3002.
2017-06-21 01:22:00 -04:00
Philipp Wiesemann
3d08ff5573 haiku: Removed unused internal function.
Its functionality is already in SDL_GL_GetAttribute().
2017-06-18 23:00:42 +02:00
Philipp Wiesemann
bf7056fe89 pandora: Fixed compiler warning about redefining SDL_REVISION.
Makefile must not create the revision header anymore because it already exists.
2017-06-18 23:00:27 +02:00
Philipp Wiesemann
0072c1184d haiku: Added support for some values set with SDL_GL_SetAttribute(). 2017-06-17 22:30:28 +02:00
Philipp Wiesemann
ea5028f893 haiku: Fixed missing slash in path from SDL_GetPrefPath(). 2017-06-17 22:30:09 +02:00
Philipp Wiesemann
089f483673 pandora: Fixed compile error. 2017-06-16 23:30:38 +02:00
Philipp Wiesemann
33c14a6441 directfb: Fixed quitting keyboard twice.
SDL_VideoQuit() already calls SDL_KeyboardQuit().
2017-06-16 23:30:30 +02:00
Philipp Wiesemann
754286bf0b nacl: Fixed unnecessary large input text array. 2017-06-16 23:30:13 +02:00
Sam Lantinga
cccb905d15 Get the parent of non-SDL-created windows, for completeness 2017-06-16 11:14:08 -07:00
Sam Lantinga
4a3e42f60b Clean up parent window when destroying a window 2017-06-16 10:50:29 -07:00
Sam Lantinga
13a149b1ff Implemented SDL_WINDOW_SKIP_TASKBAR on Windows 2017-06-16 09:10:13 -07:00
Philipp Wiesemann
f97e60a421 linux: Fixed using wrong constant for input text size. 2017-06-15 23:30:50 +02:00
Philipp Wiesemann
8bc79254aa Fixed SDL_GetWindowWMInfo() returning success on three unsupported platforms. 2017-06-15 23:30:29 +02:00
Ryan C. Gordon
7f3b12d6e7 audio: Converter now checks a strict list of channels and formats we support. 2017-06-12 21:35:24 -04:00
Sam Lantinga
e19ba502b2 Fixed bug 3668 - Overflow of SDL_AudioCVT.filters with some downmixes
Simon Hug

There's a chance that an audio conversion from many channels to a few can use more than 9 audio filters. SDL_AudioCVT has 10 SDL_AudioFilter pointers of which one has to be the terminating NULL pointer. The SDL code has no checks for this limit. If it overflows there can be stack or heap corruption or a call to 0xa.

Attached patch adds a function that checks for this limit and throws an error if it is reached. Also adds some documentation.

Test parameters that trigger this issue:
AUDIO_U16MSB with 224 channels at 46359 Hz
                 V
AUDIO_S16MSB with 6 channels at 27463 Hz

The fuzzer program I uploaded in bug 3667 has more of them.
2017-06-12 16:39:15 -07:00
Sam Lantinga
96a9da8084 Fixed bug 3670 - CMake IOS haptic error 2017-06-12 16:35:34 -07:00
Philipp Wiesemann
4755c05d29 linux: Changed internal functions to be static. 2017-06-11 22:30:58 +02:00
Philipp Wiesemann
4f840470cb directfb: Fixed comment. 2017-06-11 22:30:49 +02:00
Philipp Wiesemann
852d858c79 Fixed missing error messages for SDL_GetWindowWMInfo(). 2017-06-11 22:30:39 +02:00
Philipp Wiesemann
646f24dcaa directfb: Fixed crash if creating renderer.
SDL_GetWindowWMInfo() currently expects SDL to be 2.0.6 but SDL is still 2.0.5.
2017-06-11 22:30:24 +02:00
Philipp Wiesemann
c49ef40ede directfb: Fixed configure script not finding shared objects for dynamic loading. 2017-06-11 22:30:06 +02:00
Ryan C. Gordon
b8867a8c4b cmake: iOS haptic section was referencing power source code (thanks, Martin!).
Fixes Bugzilla #3670.
2017-06-11 16:00:45 -04:00
Ryan C. Gordon
4239fb0f6d syswm: prevent buffer overflow if SDL and app have different config headers.
This only affects Wayland and DirectFB, as a Unix system generally has X11
support. Other platforms also have different sizes for the C union in
question, but are likely the only target for that platform, etc.

Apps that might run on Wayland or DirectFB will need to be compiled against
new headers from an official 2.0.6 release, or be prepared to force the x11
target, or not use SDL_GetWindowWMInfo().

Fixes Bugzilla #3428.

--HG--
extra : rebase_source : 281e37767b92a1a0b9ddbf3efb246d4932126412
2017-06-11 00:50:26 -04:00
Ryan C. Gordon
cde75a408d Make compile-time assert error messages more clear.
Now the compiler might say this:

'SDL_compile_time_assert_mytest' declared as an array with a negative size

instead of

'SDL_dummy_mytest' declared as an array with a negative size

--HG--
extra : rebase_source : 3f7355099cc59118ed4aa39c4a9935f2bf17698f
2017-06-10 15:38:14 -04:00
Alex Szpakowski
9f10f11edd Expose display refresh rate on iOS/tvOS 10.3+. 2017-06-10 21:29:37 -03:00
Ryan C. Gordon
45c301c43d jack: removed accidental copy/paste. 2017-06-09 17:37:43 -04:00
Ryan C. Gordon
b39e699691 jack: added capture support.
--HG--
extra : rebase_source : f9f50992e51197bf743d507b65b2b54b13d14350
2017-06-09 00:47:47 -04:00
Ryan C. Gordon
1c75bb4b03 jack: Move jack_client_t into the audio device instead a global variable.
--HG--
extra : rebase_source : 4111e8ffc431d84cc7548c38cfa1acc3bf5cd582
2017-06-09 00:14:50 -04:00
Ryan C. Gordon
2cf7b08cc8 jack: Remove BROKEN_MULTI_DEVICE code.
--HG--
extra : rebase_source : 908401e327221e7d2b8a177974d0cc1edc2c4420
2017-06-08 22:20:49 -04:00
Ryan C. Gordon
0240079805 jack: Initial shot at a JACK audio target.
http://jackaudio.org/

Fixes Bugzilla #2163.
(with several more commits following to improve this code.)

--HG--
extra : rebase_source : 5d0d44fcca077c41c56381575a45184bdc050003
2017-06-08 13:27:58 -04:00
Philipp Wiesemann
6219e4a880 Fixed ignoring first event in testshape program.
Found by Cppcheck.
2017-06-08 22:40:35 +02:00
Philipp Wiesemann
9e58330085 Fixed environment variable of SDL_HINT_RENDER_LOGICAL_SIZE_MODE. 2017-06-08 22:40:21 +02:00
Philipp Wiesemann
d4729ed3b8 Removed unused hint includes. 2017-06-08 22:40:09 +02:00
Ryan C. Gordon
260c6a36e6 Merged Eric Wing's overscan patch.
Fixes Bugzilla #2799.
2017-06-06 14:06:40 -04:00
Olli Kallioinen
bd55411ea9 Android cmake build fixed to work with the official android gradle plugin 2017-06-04 21:25:57 +03:00
Ryan C. Gordon
e7bb1cbcf1 cmake: don't use /NODEFAULTLIB if we are using the C runtime (thanks, Rob!).
Fixes Bugzilla #3640.
2017-06-06 13:39:29 -04:00
Ryan C. Gordon
38eb80fb44 windows: Change the default on SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING.
It's easier for Visual Studio users that want this information to turn it on
or live without it, than it is to explain why every debugger that isn't Visual
Studio crashes out here. Eventually SetThreadDescription() will be the thing
everyone uses anyhow.

Fixes Bugzilla #3645.
(and several others).
2017-06-06 13:12:43 -04:00
Ryan C. Gordon
009b6f1b01 windows: Fix compiling of XInput code on newer MinGW installs.
Fixes Bugzilla #3609.
2017-06-06 12:35:35 -04:00
Ryan C. Gordon
fda7c8723a emscripten: listen for pointerlockchange events on the #document specifically.
--HG--
extra : rebase_source : 97702b056f7ddde4e0cc62a2e5a5ff9cdb807d09
2017-06-05 21:30:25 -04:00
Philipp Wiesemann
3c56d45c02 Removed duplicate includes. 2017-06-04 23:15:47 +02:00
Philipp Wiesemann
3e556aa92e Fixed comments in headers for doxygen output. 2017-06-04 23:15:39 +02:00
Philipp Wiesemann
2172c1bd41 android: Fixed missing error message for SDL_GetBasePath(). 2017-06-04 23:15:27 +02:00
Philipp Wiesemann
ac99b6519a Fixed SDL_GL_SetSwapInterval() returning success on two unsupported platforms. 2017-06-04 23:15:13 +02:00
Philipp Wiesemann
f50bb2f3eb haiku: Fixed missing title bar for windows with decorations.
B_BORDERED_WINDOW_LOOK has a border but no title bar.
2017-06-03 23:00:50 +02:00
Philipp Wiesemann
ff2cdde541 android: Moved internal function to new position.
It was grouped with functions for the public system header.
2017-06-03 23:00:40 +02:00
Philipp Wiesemann
afe4058438 Corrected names of header file guards. 2017-06-03 23:00:15 +02:00
Philipp Wiesemann
168480496d haiku: Changed internal variable to be static. 2017-06-02 22:15:37 +02:00
Philipp Wiesemann
74a845ca37 Fixed crash if creating textures failed in testshape program. 2017-06-02 22:15:23 +02:00
Philipp Wiesemann
6fbdd373dc Fixed crash if calling SDL_CreateShapedWindow() on unsupported platforms. 2017-06-02 22:15:12 +02:00