Wed, 08 Apr 2020 08:41:55 -0700Add perforce support to showrev.sh
Sam Lantinga [Wed, 08 Apr 2020 08:41:55 -0700] rev 13711
Add perforce support to showrev.sh

In order to generate meaningful output from SDL_GetRevision()

Wed, 08 Apr 2020 08:34:27 -0700First pass at Windows sensor implementation
Sam Lantinga [Wed, 08 Apr 2020 08:34:27 -0700] rev 13710
First pass at Windows sensor implementation

Tue, 07 Apr 2020 23:34:41 -0400cocoa: Patched to compile.
Ryan C. Gordon [Tue, 07 Apr 2020 23:34:41 -0400] rev 13709
cocoa: Patched to compile.

Tue, 07 Apr 2020 23:17:27 -0400joystick: Remove force_centering flag; we handle this on disconnect now.
Ryan C. Gordon [Tue, 07 Apr 2020 23:17:27 -0400] rev 13708
joystick: Remove force_centering flag; we handle this on disconnect now.

Tue, 07 Apr 2020 14:51:08 -0400wasapi: Patched to compile on C89 systems, and use SDL_ceilf instead of ceilf.
Ryan C. Gordon [Tue, 07 Apr 2020 14:51:08 -0400] rev 13707
wasapi: Patched to compile on C89 systems, and use SDL_ceilf instead of ceilf.

Tue, 07 Apr 2020 14:37:24 -0400wasapi: Improve WASAPI audio backend latency (thanks, Anthony!).
Ryan C. Gordon [Tue, 07 Apr 2020 14:37:24 -0400] rev 13706
wasapi: Improve WASAPI audio backend latency (thanks, Anthony!).

Anthony Pesch's notes on his patch:

"Currently, the WASAPI backend creates a stream in shared mode and sets the
device's callback size to be half of the shared stream's total buffer size.

This works, but doesn't coordinate will with the actual hardware. The hardware
will raise an interrupt after every period which in turn will signal the
object being waited on inside of WaitDevice. From my empirical testing, the
callback size was often larger than the period size and not a multiple of it,
which resulted in poor latency when trying to time an application based on the
audio callback. The reason for this looked something like:

* The device's callback would be called and and the audio buffer was filled.
* WaitDevice would be called.
* The hardware would raise an interrupt after one period.
* WaitDevice would resume, see that a a full callback had not been played and
then wait again.
* The hardware would raise an interrupt after another period.
* WaitDevice would resume, see that a full callback + some extra amount had
been played and then it would again call our callback and this process would
repeat.

The effect of this is that the pacing between subsequent callbacks is poor -
sometimes it's called very quickly, sometimes it's called very late.

By matching the callback's size to the stream's period size, the pacing of
calls to the user callback is improved substantially. I didn't write an actual
test for this, but my use case for this was my Dreamcast emulator
(https://redream.io) which uses the audio callback to help drive the emulation
speed. Without this change and with the default shared stream buffer (which
has a period of ~10ms) I would get frame times that were between ~3-30
milliseconds; after this change I get frame times of ~11-22 milliseconds.

Note, this patch also has a change that removes passing a duration to the
Initialize call. It seems that the default duration used (when 0 is passed)
does typically match up with the duration returned by GetDevicePeriod, however
the Initialize docs say:

> To set the buffer to the minimum size required by the engine thread, the
> client should call Initialize with the hnsBufferDuration parameter set to 0.
> Following the Initialize call, the client can get the size of the resulting
> buffer by calling IAudioClient::GetBufferSize.

This change isn't strictly required, but I made it to hopefully rule out
another source of unexpected latency."

Fixes Bugzilla #4592.

Wed, 25 Mar 2020 16:40:43 -0700cocoa: allow calling CreateWindowFrom on an NSView
Michael Maltese [Wed, 25 Mar 2020 16:40:43 -0700] rev 13705
cocoa: allow calling CreateWindowFrom on an NSView

This lets applications embed SDL with other widgets surrounding it.
Already possible on Windows and X11.

Fixes Bugzilla #5060.

Tue, 07 Apr 2020 14:03:13 -0400emscripten: support KaiOS's Left Soft Key and Right Soft Key (thanks, pelya!).
Ryan C. Gordon [Tue, 07 Apr 2020 14:03:13 -0400] rev 13704
emscripten: support KaiOS's Left Soft Key and Right Soft Key (thanks, pelya!).

Fixes Bugzilla #5027.

Tue, 07 Apr 2020 14:01:25 -0400cocoa: OpenGL setView and update must be used on main thread (thanks, Tim!).
Ryan C. Gordon [Tue, 07 Apr 2020 14:01:25 -0400] rev 13703
cocoa: OpenGL setView and update must be used on main thread (thanks, Tim!).

If called from background threads, use Grand Central Dispatch to use the
main thread instead. On the main thread, just call them directly.

Fixes Bugzilla #4932.

Tue, 07 Apr 2020 13:49:19 -0400configure.ac: Fix stupid autotools errors
Paul Cercueil [Tue, 07 Apr 2020 13:49:19 -0400] rev 13702
configure.ac: Fix stupid autotools errors

Apparently, recent versions of autotools will issue an error if an empty
description is supplied to AC_DEFINE(). Avoid these errors by just
adding a space in the square brackets.

Partially fixes Bugzilla #4908.