Commit graph

9484 commits

Author SHA1 Message Date
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
Sam Lantinga
4fad2b3b61 Generalized the audio resampling hint for other resampling methods in the future 2017-01-24 19:38:01 -08:00
Ryan C. Gordon
eeec5705e0 audio: libsamplerate can't resample in-place; make space for a copy if needed. 2017-01-24 20:30:48 -05:00
Ryan C. Gordon
088da5be10 configure: report libsamplerate support status. 2017-01-24 16:18:25 -05:00
Ryan C. Gordon
0dc13f56ec audio: Offer a hint for libsamplerate quality/speed tradeoff.
This defaults to the internal SDL resampler, since that's the likely default
without a system-wide install of libsamplerate, but those that need more can
tweak this.

--HG--
extra : amend_source : 804f3d3dc636b5f28f7194b48b492c6c3fe05bf5
2017-01-24 15:52:22 -05:00
Ryan C. Gordon
d756e1486e CMake: fixed logic error in setting -mfpmath=387.
Fixes Bugzilla #3565.

--HG--
extra : histedit_source : 4ca7ab8fd990fa870000c9489b92561703a127e2
2017-01-24 12:20:41 -05:00
Ryan C. Gordon
f521e5b213 configure.in: Check for sse3 too when setting -mfpmath=387. 2017-01-24 12:20:12 -05:00
Ryan C. Gordon
dc15193eb5 audio: Fix static analysis concerns about a dead assignment. 2017-01-24 10:09:29 -05:00
Ryan C. Gordon
e04f23c7ea Added a note about aligning SDL_AudioCVT data. 2017-01-24 00:55:41 -05:00
Ryan C. Gordon
ca2ab5780a audio: Make sure SDL_AudioStream's work buffer is 16-byte aligned, for SIMD.
Note the giantic FIXME, though!
2017-01-24 00:51:33 -05:00
Ryan C. Gordon
30238b8676 audio: Streams now resample in-place. Removed second allocated buffer. 2017-01-24 00:17:40 -05:00
Ryan C. Gordon
2471f581c6 audio: allow stereo Sint16 resampling fast path in SDL_AudioStream.
This currently favors libsamplerate over the fast path (quality over speed),
but I'm not sure that's the correct approach, as there may be surprising
changes in performance metrics depending on what packages are available on
a user's system. That being said, currently, the only thing with access to
SDL_AudioStream is an SDL audio device's thread, and it might be mostly idle
otherwise, so maybe this is generally good.
2017-01-24 00:08:24 -05:00
Ryan C. Gordon
6b1e0a7cd2 audio: Fixed off-by-one error in upsampling. 2017-01-24 00:03:36 -05:00
Ryan C. Gordon
8850103510 audio: Resampler now special-cases stereo and mono processing.
Turns out that iterating from 0 to channels-1 was a serious performance hit!

These cases now tend to match or beat the original audio resampler's speed!
2017-01-23 16:45:50 -05:00
Ryan C. Gordon
c869f0418a audio: Fixed incorrect pointer in SDL_ResampleCVT_si16_c2().
Forgot to update this when we changed this to process in-place. Whoops!
2017-01-23 16:42:47 -05:00
Ryan C. Gordon
102165d126 audio: Fixed copy/paste bug in float32->sint16/SSE2 scalar leftover code. 2017-01-23 12:14:28 -05:00
Ryan C. Gordon
9e20246b59 audio: Fix same bug as last commit, but for _mm_bslli_si128 vs _mm_slli_si128. 2017-01-23 12:06:10 -05:00
Ryan C. Gordon
0578cb7935 audio: use _mm_srli_si128 instead of _mm_bsrli_si128.
They're the same thing (one is generally a #define of the other), but some
toolchains don't offer the 'b' version.
2017-01-23 12:02:02 -05:00
Ryan C. Gordon
6e1edca849 audio: Wired up new SSE code to build system.
--HG--
extra : rebase_source : 3c94cdc92b94864eb43d7429032724227b798cf2
2017-01-23 01:05:44 -05:00
Ryan C. Gordon
c46db55d26 audio: Special case for resampling stereo AUDIO_S16SYS audio data.
This is a fairly common case, so we avoid the conversion to/from float here.

--HG--
extra : rebase_source : 46d6e38d06da451b8c2e836ae36cd1ddba02e510
2017-01-22 20:27:48 -05:00
Ryan C. Gordon
50bb6473ed audio: Make the simple resampler operate in-place.
This allows us to avoid an extra copy, allocate less memory and reduce cache
pressure. On the downside: we have to do a lot of tapdancing to resample the
buffer in reverse when the output is growing.

--HG--
extra : rebase_source : cab98b19216722eae3749cc1e1429d1c802e9782
2017-01-22 23:48:15 -05:00
Ryan C. Gordon
6ceacbdc4a audio: Added SSE3 implementation of SDL_ConvertStereoToMono().
--HG--
extra : rebase_source : 92882c4fdf5dc4a326057f577ccb4c29c32f938e
2017-01-23 00:57:19 -05:00
Ryan C. Gordon
8af7561815 audio: don't cast to double in SDL_ConvertStereoToMono().
It's expensive and (hopefully) unnecessary. If this becomes an overflow
problem, we could multiply both values by 0.5f before adding them, but let's
see if we can get by without the extra multiplication first.

--HG--
extra : rebase_source : b7b47e961eb974510e133882548ea36b40f6d7e3
2017-01-22 20:18:59 -05:00
Ryan C. Gordon
34fe29bc62 audio: removed conditional from simple resampler's inner loop.
We never seem to overflow the source buffer now; this might have been a
leftover from a bug that was covered by Vitaly's fixes?

Removing this conditional makes the resampler 10-20% faster. Left an
assert in there for debug builds, in case this still happens.

--HG--
extra : rebase_source : c05a536f5a80f065c0872b35d77d4f70a56b4e3e
2017-01-20 16:26:24 -05:00
Philipp Wiesemann
522a5c6f6f Haiku: Fixed memory leak if creating framebuffer failed. 2017-01-22 22:15:36 +01:00
Philipp Wiesemann
91783e4515 WinRT: Fixed typo in README. 2017-01-22 22:15:24 +01:00
Philipp Wiesemann
bd9158e9ed Haiku: Removed unused variable.
Found by Cppcheck.
2017-01-21 22:01:17 +01:00
Philipp Wiesemann
fecb6f7178 Fixed compiler warning about returning a value in a void function. 2017-01-21 22:00:56 +01:00