Commit graph

9461 commits

Author SHA1 Message Date
Sam Lantinga
c1277f268e Updated config headers to override the base SDL_config.h if both are included 2017-02-20 10:55:33 -08:00
Philipp Wiesemann
d4b70bb32a Fixed warnings if compiling loopwave programs with C++. 2017-02-19 21:05:42 +01:00
Philipp Wiesemann
20be81a7ba Updated library name in header file. 2017-02-19 21:05:26 +01:00
Philipp Wiesemann
dfc88c07e4 Fixed comment. 2017-02-19 21:05:09 +01:00
Sam Lantinga
aa71a836f3 Added support for the Razer Wildcat on Linux 2017-02-17 17:46:58 -08:00
Charlie Birks
763361269e Emscripten: implement custom cursors 2017-02-17 10:13:17 +00:00
Charlie Birks
ae0a253e82 Emscripten: refactor cursor handling 2017-02-17 10:13:12 +00:00
Charlie Birks
4229ae8220 Remove link to emscripten tests
Not updated since early port. Also stopped working when Dropbox
stopped allowing HTML to be parsed.
2017-02-17 10:13:10 +00:00
Charlie Birks
579a3245b1 Emscripten: only update pixel ratio if HiDPI is enabled 2017-02-17 10:13:07 +00:00
Ryan C. Gordon
12a722b4ba audio: Added basic WAVE_FORMAT_EXTENSIBLE support to .wav loader.
This is just enough to get you through a file that just used the extended
header for float or int data. It doesn't handle all the other things that
you expect from this header, like 24-bit samples inside a 32-bit container
or speaker masks.
2017-02-17 02:25:37 -05:00
Ryan C. Gordon
acfd5f20dd More HTTPS doc tweaks.
(mostly I'm testing buildbot though.  :)   )
2017-02-16 16:59:07 -05:00
Ryan C. Gordon
ed6c776eb0 More HTTPS changes in the documentation. 2017-02-16 16:52:03 -05:00
Ryan C. Gordon
927b70a3ad readme: more HTTPS changes. 2017-02-16 13:55:12 -05:00
Ryan C. Gordon
d7c5510795 readme: correct webpage URL to use HTTPS. 2017-02-16 13:30:34 -05:00
Ryan C. Gordon
40bb6c3811 Patched to compile on Windows.
--HG--
extra : histedit_source : 07e673b994f192be60bdfae996b2e5817170c23b
2017-02-14 03:12:09 -05:00
Ryan C. Gordon
d862693a74 wasapi: Initial WASAPI support, for Windows Vista and later.
This should remain binary compatible with Windows XP, as we dynamically
load anything we need and fall back to DirectSound/WinMM/XAudio2 if not
available.
2017-02-14 03:03:27 -05:00
Ryan C. Gordon
e0bd890446 stdlib: Fixed crash on SDL_snprintf("%s", NULL).
Like other C runtimes, it should probably produce the string "(null)".

This bug probably only affected Windows, as most platforms use their standard
C runtime's snprintf().
2017-02-14 02:49:08 -05:00
Ryan C. Gordon
27741f8136 thread: Don't use SetThreadDescription on WinRT right now.
Can't LoadLibrary for it, but not sure if it's actually available there yet.

--HG--
extra : rebase_source : 23c8c9fd2e03c216eaa2347ac8b9932b4f08ebc7
2017-02-13 17:05:14 -05:00
Ryan C. Gordon
488c32369f windows: Try to unify all the GUID comparison code into a core helper function.
There are likely several more I missed.

--HG--
extra : rebase_source : 97027924da3469089e7be686a0762ae7c1290ce6
2017-02-13 17:00:46 -05:00
Ryan C. Gordon
5f815aef8e audio: Don't wrap bootstrap declarations in preprocessor macros.
They are harmless and ignored if we don't actually link against them. The
preprocessor checks elsewhere if they're actually used.

--HG--
extra : rebase_source : d4fe82446acbdd927b352c6f66e95d85be7ae46f
2017-02-13 16:59:02 -05:00
Ryan C. Gordon
df1251ae4c audio: SDL_AudioStream's *_sample_frame_size should be in bytes, not bits.
Fixes failures where SDL_AudioStreamGet() incorrectly thinks it got a partial
sample frame request.

--HG--
extra : rebase_source : e3c0970c4f954a1296220ebc4b04c8e95a32d5f3
2017-02-13 16:56:41 -05:00
Ryan C. Gordon
554e4ad86b audio: Added a ThreadDeinit() method to match ThreadInit.
Not used by any targets at the moment, but will be shortly!

--HG--
extra : rebase_source : 0c60a1caf9cefe05d50ea48aa67bf571e2590a60
2017-02-13 16:55:00 -05:00
Sam Lantinga
923867b8c8 Fixed bug 3584 - Small stack size for audio callback thread
Walter van Niftrik

We have found that since SDL 2.0.5 the audio callback thread is created with a very small stack size. In our application this is leading to stack overflows.

We believe there is a bug at http://hg.libsdl.org/SDL/file/5a77f977ad95/src/audio/SDL_audio.c#l1132, where the is_internal_thread flag appears to be inverted.
2017-02-11 16:38:16 -08:00
Sam Lantinga
a59fecb26f Fixed bug 3583 - X11 touch device can be permanently lost
Volumetric

In X11 the SDL error "Unknown touch device" can occur after which the application stops recognizing touch events. For a kiosk-type application this results in a hang as far as the user is concerned. This is reproducible on HP Z220/Z230/Z240 workstations by swapping USB cables for a while and it also occurs with no physical changes, probably due to USB device power management. A workaround is to make SDL re-enumerate the touch devices like it does at startup. A patch is attached.
2017-02-11 11:14:48 -08:00
Sam Lantinga
121cd476bc Make sure the memory barrier functions are always available, and now they are implemented on Android __ARM_ARCH_5TE__ 2017-02-10 11:21:15 -08:00
Sam Lantinga
bb16c71b71 Fixed warning in Android build 2017-02-10 09:41:16 -08:00
Sam Lantinga
1eb402365e Log the error returned by XAudio2Create() 2017-02-09 06:01:14 -08:00
Philipp Wiesemann
6fb11d8e35 Windows: Fixed warning about unused variable.
Found by buildbot.
2017-02-03 23:30:43 +01:00
Philipp Wiesemann
0ab0fb445c Fixed typo in log message. 2017-02-03 23:30:29 +01:00
Sam Lantinga
19671bbea6 Fixed build on Apple TV 2017-02-02 16:56:02 -08:00
Sam Lantinga
58ac3b20ee Remember XInput controllers that we've already seen, so when the raw device list changes we don't assign the old device to the new XInput userid.
This isn't perfect, but at least we won't report the same device twice.
2017-02-02 17:33:40 -08:00
Sam Lantinga
ec96964900 Fixed bug 3577 - Can't set minimal size (message box appears instead) if maximal size wasn't declared (i.e. unlimited) 2017-02-02 00:41:58 -08:00
Sam Lantinga
833a605067 Fixed whitespace 2017-01-31 13:30:35 -08:00
Sam Lantinga
9e5d3b52f5 Added support for the Saitek Pro Flight X-56 Rhino 2017-01-31 12:30:55 -08:00
Sam Lantinga
49e3e7f731 Added support for the HOTAS Warthog throttle 2017-01-31 12:23:29 -08:00
Sam Lantinga
eb839a6e92 Added the HOTAS Warthog as a flight stick 2017-01-31 10:20:09 -08:00
Sam Lantinga
d648486636 Switch stderr output to SDL_Log() so it shows up on Windows and mobile devices 2017-01-31 10:19:56 -08:00
Philipp Wiesemann
e11f2ffc26 Fixed compiler warning about comma at end of enum. 2017-01-30 22:20:20 +01:00
Sam Lantinga
99ebb7ea43 Fixed Windows build 2017-01-28 14:35:35 -08:00
Sam Lantinga
1a1e91abf3 Fixed bug 3550 - No mouse move messages send while over the titlebar and windows edges
Matthew

Its possible to set SDL_CaptureMouse() so you continue receiving mouse input while the mouse is outside your window. This works however There is then a gap where no messages send, which is when the mouse is hovering the title bar and the window edges.
2017-01-28 11:17:10 -08:00
Rémi Verschelde
b814ea7642 Use a stronger X font definition for X11_MessageBox on UTF-8
X11 seemed to be confused by the broad definition, so WEIGHT_NAME,
SLANT and SETWIDTH_NAME were defined, thus fixing the font lookup
on some systems (tested on Mageia 6 with X11 1.19.1).

Fixes bug 3571.
2017-01-28 10:54:12 +01:00
Sam Lantinga
c271bbc006 Fixed bug 3569 - GL_UpdateViewport leaves PROJECTION matrix selected
Tom Seddon

GL_ActivateRenderer may call GL_UpdateViewport, which leaves the GL_PROJECTION matrix selected. But after GL_ResetState, the GL_MODELVIEW matrix is selected, suggesting that's the intended default state.

It seems at least like these should be consistent. Presumably GL_UpdateViewport should be doing a glMatrixMode(GL_MODELVIEW) before it finishes.
2017-01-27 21:23:27 -08:00
Sam Lantinga
e783b2befc Return an error if trying to set a window minimum size larger than the maximum size, or vice versa 2017-01-27 21:16:38 -08:00
Sam Lantinga
7d52a189f3 Sorted controller entries 2017-01-27 18:06:50 -08:00
Jessica Stokes
ed69076385 Add a mapping for Xbox Wireless Controllers running old firmware
Also updates the naming of these Xbox Wireless Controllers connected via USB (and thus the third-party Xbox Controller Driver) to match.

The Xbox Wireless Controller entries are now listed, in order, via USB, bia Bluetooh (with older firmware) and via Bluetooth (with firmware 3.1.1221.0).
2017-01-26 21:25:05 -08:00
Ryan C. Gordon
ce48705f00 windows: first shot at naming threads with SetThreadDescription().
This is a bleeding edge API, added to Windows 10 Anniversary Edition (build
1607, specifically).

https://msdn.microsoft.com/en-us/library/windows/desktop/mt774976(v=vs.85).aspx

Nothing supports this yet, including WinDbg, Visual Studio, minidumps, etc,
so we still need to also use the RaiseException hack. But presumably tools
will use this API as a more robust and universal way to get thread names
sooner or later, so we'll start broadcasting to it now.

--HG--
extra : rebase_source : 7619e43e39928369f87972366e4efd0796ec3f23
2017-01-27 20:50:30 -05:00
Sam Lantinga
1db29483c5 Added Thrustmaster Wheel FFB entry to the list of wheels 2017-01-27 06:05:50 -08:00
Sam Lantinga
83061d091e Added an API to get the type of a connected joystick 2017-01-27 05:59:58 -08:00
Misty De Meo
e4d57428cf Add gamecontrollerdb mapping for Xbox One S on Mac
This is valid for firmware version 3.1.1221.0; earlier versions of the
firmware need a different mapping (and have different GUIDs).
2017-01-25 22:24:54 -08:00
Misty De Meo
32b32b5180 Darwin: fix detection of Xbox One S controller
Firmware revision 3.1.1221.0 changes the mapping of the Xbox One S
controller in Bluetooth mode. Aside from changing the layout of
other buttons, this revision also changes the triggers to act as
Accelerator and Brake axes from the simulation controls page.

The Darwin sysjoystick code didn't previously map anything at these
axes, making it impossible to detect input on these two buttons.
2017-01-25 22:22:05 -08:00