https://bugzilla.libsdl.org/show_bug.cgi?id=5308
The udev code labels devices that are found by this code with
ID_INPUT_KEY which in turn gets used by SDL to label the devices as
SDL_UDEV_DEVICE_KEYBOARD.
This was missing for the code path when udev is not running and as such
devices such as the power button of a phone was not detected as keyboard
input and no devices were emitted.
Patch from Matt Whitlock:
There are actually two distinct classes of problems at play here.
On the one hand, libsdl2's configure.ac has some POSIX conformance
issues - namely, the use of 'echo -n' and the passage of arguments
containing embedded backslashes to 'echo', neither of which is
defined by POSIX. The attached patch takes care of these issues.
Ozkan Sezer
Our config.guess and config.sub are rather outdated.
Attached new versions of them here.
However, build-scripts/config.sub.patch do not apply
to these new versions: I don't know if and where that
patch is still needed.
Cameron Cawley
stdlib: Added SDL_round, SDL_roundf, SDL_lround and SDL_lroundf
The default implementation is based on the one used in the Windows RT video driver.
Keep Semaphore Kernel Object impl for Windows 7 and older - choose at runtime
v2: - Fix mixed int/LONG types
- Reorder definitions
- Add missing include
v3: - Use `GetModuleHandle()` to load the API Set
SDL_SemPost() was called by the FIFO threads after the semaphore was
freed because the main thread actually synchronized on the
`writerRunning`/`readersRunning` count and not the semaphores itself.
v2: - Add SRW definitions as suggested by Ozkan Sezer
Allows building against older platform headers.
- Rename "hidden" function parameter `mutex_` to `_mutex`
v3: - Use GetModuleHandle instead of LoadLibrary
- Fix typo in comment
SDL_systhread.c and SDL_syslocale.c used to call LoadLibrary() without
calling FreeLibrary() later. GetModuleHandleW() should always succeed
because GetModuleHandleW() itself is imported from kernel32.dll and we
don't need to bother releasing it.
- acinclude/alsa.m4, esd.m4: Ran through autoupdate to replace several
AC_TRY_[COMPILE|LINK|RUN] with corresponding AC_???_IFELSE , so that
autoconf-2.70 doesn't warn.
- sdl2.m4: Ditto.
- test/acinclude.m4 (sdl2): Ditto.