Ozkan Sezer
07f83cd5a6
hidapi/libusb/hid.c: fix race condition on device close (bug #5484 )
...
From hidapi mainstream git: https://github.com/libusb/hidapi/issues/142
https://github.com/libusb/hidapi/commit/d2c3a9862eefe2d3f4db0f00c0238277bfb4e44b
Read callback may fire itself on its own even after its been requested
to stop and exactly before the calling code waits for its completion in
indefinite loop. Explicitly preventing re-fireing the submission loop
fixes the issue.
2021-01-24 00:51:24 -05:00
Ozkan Sezer
6393d14de5
SDL_virtualjoystick.c: remove wrong #endif comment.
2021-01-24 00:51:24 -05:00
Ozkan Sezer
327ea97436
hidapi/libusb/hid.c: whitespace tidy-up.
2021-01-24 00:51:24 -05:00
Ozkan Sezer
282558379e
fix AC_CHECK_HEADER for libusb.h
2021-01-24 00:51:24 -05:00
Ozkan Sezer
f3835702d3
fix build with --disable-directx
2021-01-24 00:51:24 -05:00
Ozkan Sezer
bdb3e6b84f
SDL_hidapi_switch.c: fix build with older compilers
2021-01-15 12:40:00 +03:00
Ozkan Sezer
8636bc06de
acinclude/libtool.m4: Apply macos11 patch from libtool bug #44605
...
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44605
https://github.com/macports/macports-ports/blob/master/devel/libtool/files/dynamic_lookup-11.patch
( Also see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44684 )
This also implicitly covers the macos10.10+ support patch from libtool
mainstream which has been in since libtool-v2.4.3, i.e.:
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commit;h=e145288b059e14ab7e58fc6a304e82d9dad282a6
2021-01-09 00:11:20 +03:00
Ozkan Sezer
29888bd69a
fixed permissions of xcode project file
2021-01-08 21:56:00 +03:00
Ozkan Sezer
8d3963421d
regenerated configure
2021-01-08 21:50:02 +03:00
Ozkan Sezer
e23666f63e
update config.guess and config.sub from mainstream.
2021-01-07 17:40:00 +03:00
Ozkan Sezer
dfb0afe36a
fix build after commit 5730b2005da1
2021-01-07 00:41:32 +03:00
Ozkan Sezer
dc0e5de974
Update config.guess and config.sub from mainstream.
...
Recognizes riscv32be and riscv64be.
2021-01-05 17:10:02 +03:00
Ozkan Sezer
76295cecf3
video/windows: ANSI/UNICODE updates (cf. bug 5435):
...
- explicitly use UNICODE versions of DrawText, EnumDisplaySettings,
EnumDisplayDevices, and CreateDC: the underlying structures have
WCHAR strings.
- change WIN_UpdateDisplayMode and WIN_GetDisplayMode() to accept
LPCWSTR instead of LPCTSTR for the same reason.
- change WIN_StringToUTF8 and WIN_UTF8ToString to the explicit 'W'
versions where appropriate.
2021-01-05 15:50:10 +03:00
Ozkan Sezer
265a1cc97a
use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed ( #2 )
...
cf. bug #5435 .
- SDL_wasapi_win32.c (GetWasapiDeviceName): pwszVal is WCHAR*
- windows/SDL_sysfilesystem.c (SDL_GetBasePath, SDL_GetPrefPath)
- windows/SDL_sysurl.c (SDL_SYS_OpenURL): wurl is WCHAR*
- SDL_windowssensor.c (ConnectSensor): bstr_name is WCHAR*
- windows/SDL_systhread.c (SDL_SYS_SetupThread): strw is WCHAR*
2021-01-05 15:50:02 +03:00
Ozkan Sezer
516042b4d6
ran gendynapi.pl after SDL_UpdateNVTexture addition
2021-01-05 15:15:50 +03:00
Ozkan Sezer
31751bdcce
wmmsg.h: constified wmtab
2021-01-05 15:15:37 +03:00
Ozkan Sezer
8cb421b26d
SDL_windows_main.c: use new WIN_StringToUTF8W macro
2021-01-04 10:20:10 +03:00
Ozkan Sezer
a594b85031
use WIN_StringToUTF8W macro instead of WIN_StringToUTF8, where needed:
...
i.e. where the string is known guaranteed to be WCHAR*, in:
- SDL_dinputjoystick.c (WIN_IsXInputDevice): VARIANT->var is BSTR (WCHAR*)
- SDL_rawinputjoystick.c (RAWINPUT_AddDevice): string is WCHAR*
- SDL_windows_gaming_input.c (IEventHandler_CRawGameControllerVtbl_InvokeAdded):
string is WCHAR*
There should be more of these..
2021-01-04 10:00:30 +03:00
Ozkan Sezer
5b14bbff5f
make ANSI/UNICODE versions of WIN??UTF8 macros individually available.
2021-01-04 10:00:10 +03:00
Ozkan Sezer
f2bd861cd7
move SDL_tcsstr definition to core/windows/SDL_windows.h
2021-01-04 08:50:00 +03:00
Ozkan Sezer
f414a43632
simplify Watcom implementation of SDL_MostSignificantBitIndex32()
2021-01-04 03:00:10 +03:00
Ozkan Sezer
ae18109a92
SDL_windowsjoystick.c (SDL_CreateDeviceNotification): use L, not TEXT()
...
cf. bug #5435 .
2021-01-04 01:23:50 +03:00
Ozkan Sezer
390fd14f54
SDL_windowswindow.c (SDL_HelperWindowCreate): adjust for ANSI/UNICODE:
...
change SDL_HelperWindowClassName and SDL_HelperWindowName from WCHAR *
to be const TCHAR*
cf. bug #5435 .
2021-01-04 01:23:50 +03:00
Ozkan Sezer
398d2764c7
RAWINPUT_InitWindowsGamingInput: change pNamespace from LPTSTR to PCWSTR
...
because WindowsCreateStringReference specifically accepts const WCHAR *
- WGI_JoystickInit(): ditto.
cf. bug #5435 .
2021-01-04 01:23:50 +03:00
Ozkan Sezer
f09e0af7aa
SDL_dinputjoystick.c (IsXInputDevice): adjust to be ANSI/UNICODE-agnostic
...
cf. bug #5435 .
2021-01-04 01:23:50 +03:00
Ozkan Sezer
ed39f2f3f9
SDL_wasapi_win32.c (WASAPI_PlatformThreadInit): use L instead of TEXT()
...
because AvSetMmThreadCharacteristicsW specifically accepts WCHAR* input
cf. bug #5435 .
2021-01-04 01:23:50 +03:00
Ozkan Sezer
01a2f27679
consistently use TEXT() macro with LoadLibrary() and GetModuleHandle()
...
cf. bug #5435 .
2021-01-04 01:23:50 +03:00
Ozkan Sezer
b5f0483cb3
fix permissions
2021-01-01 22:30:28 +03:00
Ozkan Sezer
8476df3e31
SDL_mixer.c: remove calls to non-existing m68k asm code.
2020-12-30 23:55:10 +03:00
Ozkan Sezer
5b2e011e6d
SDL_endian.h: minor fixes from SDL-1.2 branch
...
( forward-port of changesets 3909:6832b00d3594 and 5657:529d23724144 )
2020-12-30 23:55:02 +03:00
Ozkan Sezer
a88071deb5
configure.ac: directfb dynamic loading support updates:
...
put back sed on find_lib result, remove debug messages,
fix directfb_lib report to user.
2020-12-30 15:55:00 +03:00
Ozkan Sezer
f24cc903a2
remove CFLAGS save/restores from dbus.h and ibus.h header checks.
...
CPPFLAGS is what AC_CHECK_HEADER needs.
2020-12-30 15:53:56 +03:00
Ozkan Sezer
88eaf356a7
minor update to test/acinclude.m4 (pkg.m4)
2020-12-30 15:53:20 +03:00
Ozkan Sezer
92edee2324
SDL_config_android.h: update SIZEOF_VOIDP define to respect __LP64__
2020-12-30 01:28:02 +03:00
Ozkan Sezer
7c105f12d5
updates to SDL_config_os2.h
2020-12-30 01:21:10 +03:00
Ozkan Sezer
1cdc1d4890
SDL_config.h.cmake, SDL_config.h.in: update for SIZEOF_VOIDP define
2020-12-30 01:00:24 +03:00
Ozkan Sezer
9fc139dfb5
SDL_config_windows.h: add missing HAVE_STRTOULL along side HAVE_STRTOLL
2020-12-30 01:00:24 +03:00
Ozkan Sezer
b76b81b0e4
SDL_config.h.cmake, SDL_config.h.in: add os/2 driver defines
...
in case autofoo or cmake is used for it some day..
2020-12-30 01:00:24 +03:00
Ozkan Sezer
8a32ee24db
removed MSVC strtok_s use from SDL_strtokr().
...
no other ??_s are used elsewhere in SDL_stdinc. besides, C11 has a
strtok_s with a different signature.
2020-12-30 01:00:24 +03:00
Ozkan Sezer
6116ccf035
fix configure warnings when checking dbus/dbus.h and ibus-1.0/ibus.h
...
.. by adding DBUS_CFLAGS and IBUS_CFLAGS to CPPFLAGS:
configure: WARNING: dbus/dbus.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: dbus/dbus.h: proceeding with the compiler's result
configure: WARNING: ibus-1.0/ibus.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: ibus-1.0/ibus.h: proceeding with the compiler's result
2020-12-29 21:20:28 +03:00
Ozkan Sezer
f175824172
config.sub, config.guess: go back to backtick .. substitutions.
...
see e.g. https://lists.gnu.org/archive/html/config-patches/2020-12/msg00000.html
2020-12-29 20:51:10 +03:00
Ozkan Sezer
8eae956c98
regenerated configure
2020-12-29 00:00:56 +03:00
Ozkan Sezer
9e22f62e0d
arm64 implementations of SDL_Swap16/32 (bug #5419.)
...
patch from David Carlier.
2020-12-28 11:50:02 +03:00
Ozkan Sezer
2355dea448
revert 'arm64 implementations of SDL_Swap16/32' for now (bug #5419 )
2020-12-28 08:00:50 +03:00
Ozkan Sezer
2f99bc07e7
arm64 implementations of SDL_Swap16/32 (bug #5419.)
...
patch from David Carlier.
2020-12-28 07:20:20 +03:00
Ozkan Sezer
a6beb2d264
SDL_PrivateLowerBlitScaled: remove unused local var 'a'
2020-12-28 01:10:02 +03:00
Ozkan Sezer
471d3c363e
fix bug #5415 -- fatal error: 'Cocoa/Cocoa.h' file not found in iOS build
2020-12-27 14:00:30 +03:00
Ozkan Sezer
a6c6e5f582
configure.ac: fix POSIX conformance issues (bug #4261.)
...
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.
2020-12-27 14:00:02 +03:00
Ozkan Sezer
9f6fddb40f
CMake: don't check for --no-undefined linker flag for OpenBSD (bug #5174 )
...
it now matches autotools.
2020-12-27 05:20:10 +03:00
Ozkan Sezer
2b760c3697
attempt to fix emscripten-buildbot: s/wasm/wasm32/
2020-12-24 01:55:00 +03:00
Ozkan Sezer
b9eb43a5c6
build-scripts: update install-sh and mkinstalldirs from automake-1.16.3
2020-12-24 01:32:10 +03:00
Ozkan Sezer
3c4103b87d
fix config.guess permissions
2020-12-24 01:20:00 +03:00
Ozkan Sezer
5ed3d21f6e
testsem.c: fix -Wmissing-braces warnings.
2020-12-24 00:55:30 +03:00
Ozkan Sezer
090fffac6a
test/Makefile.os2: add warning switches to CFLAGS.
2020-12-24 00:29:40 +03:00
Ozkan Sezer
239c8f1f4c
testvulkan.c: fix -Wmissing-braces warnings. also fix whitespace.
2020-12-24 00:28:50 +03:00
Ozkan Sezer
20ca1192d2
testgesture.c: comment out unused drawLine()
2020-12-24 00:26:32 +03:00
Ozkan Sezer
b064028c2d
testatomic.c: fix warnings due to SDL_AtomicDecRef() use
2020-12-24 00:25:40 +03:00
Ozkan Sezer
15fea33915
ran gendynapi.pl after addition of SDL_SoftStretchLinear
2020-12-23 23:47:10 +03:00
Ozkan Sezer
b4b674dabb
CMakeLists.txt: sync DYLIB_CURRENT_VERSION to Xcode project
2020-12-22 22:10:50 +03:00
Ozkan Sezer
a19c008a7f
use GetModuleHandleW() to retrieve kernel32.dll handle (bug #5390.)
...
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.
2020-12-22 17:10:02 +03:00
Ozkan Sezer
9f655fe522
regenerated configure
2020-12-22 17:03:20 +03:00
Ozkan Sezer
5ad5645757
acinclude/pkg.m4: update from mainstream pkgconfig tree.
2020-12-22 17:01:50 +03:00
Ozkan Sezer
86191351c0
acinclude & sdl2.m4 updates:
...
- 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.
2020-12-22 17:00:28 +03:00
Ozkan Sezer
f117db5186
sdl2.m4 updates:
...
- remove HP/UX 9 (%@#!) support
- change fopen() mode from "a" to "w" in test code.
- bump its serial num to 2.
- test/acinclude.m4: same sdl2.m4 updates.
2020-12-22 17:00:11 +03:00
Ozkan Sezer
087de97b56
acinclude/esd.m4: update from mainstream esound tree,
...
- revise for better compatibility with new autoconf,
- remove HP/UX 9 (%@#!) support from it,
- replace system("touch conf.esdtest") with fopen/fclose in the
test code (see, e.g. glib-2.0.m4 -- sdl.m4 does the same.)
2020-12-22 17:00:00 +03:00
Ozkan Sezer
15abab9cf8
regenerated configure
2020-12-22 16:25:00 +03:00
Ozkan Sezer
537f824f38
test/Makefile.os2: wlib must run case-sensitively.
2020-12-21 20:40:10 +03:00
Ozkan Sezer
4198f0e52c
fix uninitialized warnings in KMSDRM_CreateCursor()
2020-12-21 01:20:30 +03:00
Ozkan Sezer
22275b35e4
cmake: fix building for mac (bug #5407.)
2020-12-20 21:55:02 +03:00
Ozkan Sezer
e91153f278
fix non-ARM h/w on FreeBSD builds (bug #5405 , patch from David Carlier.)
2020-12-20 03:03:21 +03:00
Ozkan Sezer
6b81cac420
remove duplicated SDL_SetError after calling check_atomic_modesetting()
2020-12-19 01:25:50 +03:00
Ozkan Sezer
6ac0b23d3a
SDL_DirectFB_video.c: DSPF_ABGR requires directfb >= 1.5.0 -- add guard.
2020-12-18 21:37:20 +03:00
Ozkan Sezer
6c4ab48471
SDL_kmsdrmvideo.c: check atomic modesetting in check_modesetting()
...
.. so that KMSDRM_CreateDevice() can fail and SDL_VideoInit() would
move on to next bootstrap member which is kmsdrm_legacy. hopefully
fixes bug #5393 .
2020-12-18 17:50:02 +03:00
Ozkan Sezer
5c654d0df4
tests: regenerate configure using autoconf patched for AC_PATH_X11
...
Specifically this patch which does not invoke _AC_PATH_X_XMKMF and
_AC_PATH_X_DIRECT internal autoconf routines when cross-compiling:
http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=33c3a47c04ab70a4dd54963fe433a171bc03747f
Without this, CFLAGS would brokenly have system include paths like
-I/usr/include/X11 when cross-compiling e.g. for windows. (And it
also resulted in annoying imake crashes for my setup...)
2020-12-18 17:00:00 +03:00
Ozkan Sezer
10625f9d89
SDL_windowsmessagebox.c: go back to hg rev 14458 state.
...
encountering a NULL caption in AddDialogString() is intended, i.e.
AddDialogStaticIcon() sends it as NULL on purpose.
2020-12-17 23:50:00 +03:00
Ozkan Sezer
4d6eb30523
SDL_windowsmessagebox.c (AddDialogControl): add back NULL caption check.
...
because AddDialogStaticIcon() sends a NULL caption -- fixes bug #5401 .
2020-12-17 23:28:20 +03:00
Ozkan Sezer
90456670b5
more "'for' loop initial declarations are only allowed in C99 mode" fixes
2020-12-17 14:11:00 +03:00
Ozkan Sezer
ed4fcb2cfc
kmsdrm_legacy build fixes:
...
- add missing '_LEGACY' to symbol names
- perform missing 2.0.14 portage
- fix 'for' loop initial declarations are only allowed in C99 mode errors
2020-12-16 03:24:10 +03:00
Ozkan Sezer
9940e71088
Import two post-2.0.12 fixes to kmsdrm_legacy:
...
Fix build breakage without EGL:
https://hg.libsdl.org/SDL/rev/f2606fe53654e305ab9badb821d9d3afb7f92f49
Fix KMSDRM_CreateWindow segfault when starting L?VE2D engine (bug 5199)
https://hg.libsdl.org/SDL/rev/d2e69a78939463d9ff9448a5f4efd1e208bb97b0
2020-12-16 00:10:30 +03:00
Ozkan Sezer
c02d88dd12
configury whitespace cleanup (no actual change.)
2020-12-15 23:01:10 +03:00
Ozkan Sezer
716ac535d8
test/acinclude.m4: rename SDL_CONFIG to SDL2_CONFIG, regenerate configure
2020-12-15 01:20:00 +03:00
Ozkan Sezer
637d425e3e
whitespace.
2020-12-15 00:11:10 +03:00
Ozkan Sezer
44d4a61d92
minor cleanups to configure.ac to reduce autoconf-2.70 warnings a bit.
...
configure output is practically unchanged. there are still lots of
AC_TRY_COMPILE/AC_TRY_LINK replacements needed to really eliminate
the warnings, but that's for another time.
2020-12-14 08:11:40 +03:00
Ozkan Sezer
f8078d3d6c
configure.ac: use AC_DEFINE for SDL_VIDEO_DRIVER_ANDROID
2020-12-14 05:55:20 +03:00
Ozkan Sezer
3c2757ff89
windows SDL_LoadObject: fix warning after commit 2ff650230d96
2020-12-13 18:25:02 +03:00
Ozkan Sezer
15cbddf497
linux/SDL_threadprio.c: fix build on older systems:
...
SCHED_RESET_ON_FORK is in kernel >= 2.6.32.
2020-12-13 18:00:20 +03:00
Ozkan Sezer
3b92933ac6
SDL_LoadObject (windows, os/2): prevent crash if dll name is NULL.
2020-12-13 17:37:50 +03:00
Ozkan Sezer
f674009c56
fix typo from commit 63349df2610a (fixes bug 5396)
2020-12-13 16:51:20 +03:00
Ozkan Sezer
b6e63625c8
fix bug #5395 : handle old systems where inotify_init1 is not available
2020-12-13 15:32:24 +03:00
Ozkan Sezer
bca9decbda
fix bug #5394 - define _DARWIN_C_SOURCE only if not already defined
2020-12-12 23:28:10 +03:00
Ozkan Sezer
5c212cb0c5
remove a few stale NULL message/title checks after commit e2b729b1756a
...
top-level guarantees non-NULL message / title passed in messageboxdata
2020-12-10 12:24:24 +03:00
Ozkan Sezer
f1cab8aea6
fix bug #5253 : handle NULL title or message fields in SDL_MessageBoxData
...
- SDL_video.c (SDL_ShowMessageBox): replace messageboxdata, set title
or message field to "" if either of them is NULL.
- SDL_video.c (SDL_ShowSimpleMessageBox): set title or message to ""
if either of them is NULL for EMSCRIPTEN builds.
- SDL_bmessagebox.cc: add empty string check along with NULL check for
title and message fields.
- SDL_windowsmessagebox.c (AddDialogString): remove NULL string check
- SDL_windowsmessagebox.c (AddDialogControl): add empty string check
along with the NULL check.
- SDL_x11messagebox.c: revert commit 677c4cd68069
- SDL_os2messagebox.c: revert commit 2c2a489d76e7
- test/testmessage.c: Add NULL title and NULL message tests.
2020-12-10 11:20:56 +03:00
Ozkan Sezer
475405e036
CMakeLists.txt: sync DYLIB_CURRENT_VERSION to Xcode project
2020-12-09 12:03:24 +03:00
Ozkan Sezer
250a055727
fix bug #5384 -- define DLL_EXPORT in DLL builds and adjust begin_code.h
2020-12-09 12:01:10 +03:00
Ozkan Sezer
5610e5ae48
Makefile.os2: disable W303 (add -wcd=303 to CFLAGS)
...
newer OpenWatcom versions enable W303 by default. without this, we get
multiple "Parameter '%s' has been defined, but not referenced" warnings.
2020-12-08 00:11:10 +03:00
Ozkan Sezer
3fbff2a45b
SDL_rawinputjoystick.c: fix ambiguous 'else' warning
...
src/joystick/windows/SDL_rawinputjoystick.c: In function 'RAWINPUT_HandleStatePacket':
src/joystick/windows/SDL_rawinputjoystick.c:1343:9: warning: suggest explicit braces to avoid ambiguous 'else'
2020-11-26 10:47:33 +03:00
Ozkan Sezer
e5783e1179
cmake: add missing checks for wcscasecmp, _wcsicmp, wcsncasecmp, _wcsnicmp
2020-11-25 14:51:56 +03:00
Ozkan Sezer
7c18088f00
SDL_config_os2.h: define HAVE__WCSICMP and HAVE__WCSNICMP
2020-11-25 14:51:56 +03:00
Ozkan Sezer
23ad4f4b8c
configure.ac: check GameController framework support when targeting Darwin
...
disables SDL_JOYSTICK_MFI for i386 or if MAC_OS_X_VERSION_MIN_REQUIRED < 1090
--disable-joystick-mfi disables it unconditionally.
2020-11-24 14:10:30 +03:00
Ozkan Sezer
711d409032
CMakeLists.txt: add src/joystick/iphoneos/*.m to Darwin joystick sources
...
.. so that there won't be missing symbols.
TODO: add checks for SDL_JOYSTICK_MFI ???
2020-11-24 14:10:30 +03:00