Ozkan Sezer
73066492f6
testshader.c: include stdlib.h for exit()
2024-07-22 17:40:56 +03:00
Ozkan Sezer
86b4d035db
SDL_stdinc.h (SDL_COMPILE_TIME_ASSERT): Keep C++ case alone (after PR/10331)
...
Some versions of gcc will define __STDC_VERSION__ even when compiling in C++ mode.
Reference issue: https://github.com/libsdl-org/SDL/issues/6078 which was fixed by
https://github.com/libsdl-org/SDL/commit/f6b81125b340e00129978f2c9eebfba6a4d25692
(cherry picked from commit 70c1012e8c )
2024-07-22 16:02:00 +03:00
Ozkan Sezer
956a8bf6c0
ci: bump FreeBSD
...
Reference issue: https://github.com/libsdl-org/SDL/issues/10224 .
2024-07-11 18:55:50 +03:00
Ozkan Sezer
6a10309568
SDL_hidapi.c: work-around watcom build error when libusb is enabled
2024-07-05 18:56:10 +03:00
Ozkan Sezer
a0ec7c0906
libtool.m4: fix appending of -no_fixup_chains to allow_undefined_flag.
2024-06-29 17:50:40 +03:00
Ozkan Sezer
98ec8b88c1
acinclude/libtool.m4: updates from mainstream git:
...
- Disables chained fixups for macOS ('-no_fixup_chains' if supported by
linker), because it is not compatible with '-undefined dynamic_lookup'
- Fixes Wstrict-prototypes warnings
- Regenerate the 'configure' script.
2024-06-29 17:03:04 +03:00
Ozkan Sezer
a4d240d295
SDL_events.c: remove long long casts an the override of SDL_PRIs64
2024-06-14 18:47:56 +03:00
Ozkan Sezer
9422c57201
revert commit ac25395 as it broke linux..
2024-06-14 14:56:32 +03:00
Ozkan Sezer
ac253956b9
SDL_events.c: override of SDL_PRIs64 for mingw is no longer needed
...
(cherry picked from commit 65d911aff0 )
2024-06-14 14:51:10 +03:00
Ozkan Sezer
948b926d47
SDL_qsort.c: better match private funcs' compare args to SDL3 version.
2024-06-14 14:50:32 +03:00
Ozkan Sezer
ce6d3c5cc1
SDL_qsort.c: change private function compare args to SDL_CompareCallback
...
fixes watcom os/2 and win32 builds after commit b2b2369414
2024-06-13 04:50:56 +03:00
Ozkan Sezer
70faef84aa
build-scripts/ltmain.sh: minor updates hand-picked from mainstream
2024-06-05 23:11:10 +03:00
Ozkan Sezer
863670c0a8
always define PRI?64 using 'I64' when targeting windows
...
avoids -Wformat warnings from mingw toolchains -- e.g.:
src/test/SDL_test_harness.c:581:37: warning: unknown conversion type character 'l' in format [-Wformat=]
(cherry picked from commit 49b6c24722 )
2024-06-01 22:37:50 +03:00
Ozkan Sezer
d5e5d4a802
move vista+ display config function ptr calls to device->driverdata
...
backport from PR/9923 (commit e4518af377 )
2024-05-31 20:04:20 +03:00
Ozkan Sezer
0439fc6007
Makefile.in: add VisualC-GDK to SRC_DIST
...
Fixes https://github.com/libsdl-org/SDL/issues/9913
2024-05-28 14:10:24 +03:00
Ozkan Sezer
6825a4aabb
SDL_config_os2.h: remove duplicated HAVE_WCSL* defines.
2024-05-28 08:01:02 +03:00
Ozkan Sezer
b3081bbbd2
regenerated the configure script.
2024-05-27 23:40:04 +03:00
Ozkan Sezer
b6899f82fb
SDL_iconv_string: simplify recomputation of outbuf and outbytesleft
...
Noticed this in SDL-1.2 where gcc-13 emits a -Wuse-after-free warning.
No such warning in SDL2 and SDL3, because unlike SDL1.2, SDL_realloc()
is not a macro expanding to libc realloc(). It warns, of course, if
SDL_realloc() is replaced with plain realloc():
src/stdlib/SDL_iconv.c: In function 'SDL_iconv_string_REAL':
src/stdlib/SDL_iconv.c:824:39: warning: pointer 'oldstring' may be used after 'realloc' [-Wuse-after-free]
824 | outbuf = string + (outbuf - oldstring);
| ~~~~~~~~^~~~~~~~~~~~
src/stdlib/SDL_iconv.c:818:30: note: call to 'realloc' here
818 | string = (char *)realloc(string, stringsize + sizeof(Uint32));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(cherry picked from commit 2205626816 )
2024-05-10 18:56:24 +03:00
Ozkan Sezer
312a8a19d7
SDL_x11sym.h: corrected XQueryKeymap() proto.
...
Noticed this in SDL-1.2 in a gcc-13 build, which emitted the following
warning: (No such warnings in SDL2 and SDL3, due to macro differences)
./src/video/x11/SDL_x11sym.h:84:48: warning: argument 2 of type 'char *' declared as a pointer [-Warray-parameter=]
84 | SDL_X11_SYM(int,XQueryKeymap,(Display* a,char *b),(a,b),return)
| ~~~~~~^
./src/video/x11/SDL_x11dyn.c:95:15: note: in definition of macro 'SDL_X11_SYM'
95 | rc fn params { ret p##fn args ; }
| ^~~~~~
In file included from ./src/video/x11/SDL_x11dyn.h:27,
from ./src/video/x11/SDL_x11dyn.c:26:
/usr/include/X11/Xlib.h:2980:5: note: previously declared as an array 'char[32]'
2980 | char [32] /* keys_return */
| ^~~~~~~~~
The original actually was char[32] but was changed with
https://github.com/libsdl-org/SDL-1.2/commit/8ada1e8a6eb2b3e7da1503345ebc4d785aa96302
(https://bugzilla.libsdl.org/show_bug.cgi?id=170
https://github.com/libsdl-org/SDL-1.2/issues/101 )
(cherry picked from commit b2fca55e5c )
2024-05-10 18:56:10 +03:00
Ozkan Sezer
d8fbeec096
autotools, cmake, macOS: Do not use the system iconv() by default
...
backport from PR #9676 by @flibitijibibo
2024-05-03 11:56:50 +03:00
Ozkan Sezer
63ea838db6
test, watcom.mif: revert 78391e6530
...
%copy isn't recognized by older wmake versions.
2024-05-01 17:37:20 +03:00
Ozkan Sezer
78391e6530
test, watcom.mif: revert 9ecdcd8bb and use %copy instead
...
Ref.: https://github.com/open-watcom/open-watcom-v2/issues/1281 .
2024-05-01 17:02:50 +03:00
Ozkan Sezer
9ecdcd8bb6
test, watcom makefile: change copy command to use a dos path separator
...
fixes copy failure with recent open watcom wmake changes. (Issue reported
mainstream as https://github.com/open-watcom/open-watcom-v2/issues/1281 )
2024-05-01 11:02:10 +03:00
Ozkan Sezer
26e3d65ea8
CI, macOS: install autoconf.
...
Reference issue: https://github.com/libsdl-org/SDL/issues/9606 .
2024-04-24 00:33:14 +03:00
Ozkan Sezer
4d91f0e796
SDL_stdinc.h: Android passes sizeof(ENUM) == sizeof(int) assertion
...
Reference issue: https://github.com/libsdl-org/SDL/issues/9392 .
(cherry picked from commit 6cf71ca9a9 )
2024-03-28 21:10:00 +03:00
Ozkan Sezer
358a80a473
remove non-existent vulkan.hpp and vulkan_mir.h from Xcode project
2024-03-25 21:23:24 +03:00
Ozkan Sezer
177a836653
SDL_RWFromFile, stdio: allow named pipes along with regular files.
...
Fixes https://github.com/libsdl-org/SDL/issues/9174
2024-03-06 18:50:00 +03:00
Ozkan Sezer
bc30fb295d
don't let SDL_render.c:render_drivers[] have an empty initializer list.
2024-02-15 20:33:24 +03:00
Ozkan Sezer
d0731ab9a3
Check the SDL_VIDEO_RENDER_??? macros with #if instead of #ifdef
...
Allows users to disable them by defining them as 0.
Closes https://github.com/libsdl-org/SDL/issues/8996
2024-02-15 02:55:02 +03:00
Ozkan Sezer
971508c0d7
autotools: a few libtool updates from mainstream
2024-01-28 20:04:34 +03:00
Ozkan Sezer
fcd1c155cc
SDL_rwops.c (SDL_IsRegularFile): fix WinRT build failure due to S_ISREG
2024-01-28 02:20:00 +03:00
Ozkan Sezer
230ae797a7
SDL_RWFromFile, stdio: reject if the file is not a regular file.
...
Fixes https://github.com/libsdl-org/SDL/issues/8935
2024-01-28 01:44:50 +03:00
Ozkan Sezer
48b62e2e57
make video/pandora to actually compile somehow.
...
no one ever maintained it for years..
2024-01-23 17:50:10 +03:00
Ozkan Sezer
9e352e61db
fixes after ShowMessageBox changes:
...
- SDL_video.c (SDL_ShowMessageBox): remove C99'ism.
- SDL_os2video.c (OS2DIVE_bootstrap): add OS2_ShowMessageBox
- SDL_os2video.c (OS2VMAN_bootstrap): add OS2_ShowMessageBox
- SDL_DirectFB_video.c (DirectFB_bootstrap): NULL ShowMessageBox
- SDL_naclvideo.c (NACL_bootstrap): NULL ShowMessageBox
2024-01-23 04:11:20 +03:00
Ozkan Sezer
aaf426e280
testhaptic.c: include stdlib.h for exit()
2024-01-23 01:20:00 +03:00
Ozkan Sezer
8eb2ec6a8d
watcom makefiles: remove yuv_rgb_lsx.c from sources
2024-01-21 11:56:20 +03:00
Ozkan Sezer
c3a3f18076
updated WhatsNew.txt
2024-01-20 11:51:00 +03:00
Ozkan Sezer
f52a12a8fe
remove several instances of unnecessary emptry str "" after SDL_PRI???
2024-01-18 17:25:56 +03:00
Ozkan Sezer
3d6cf2b5c0
update config.guess and config.sub from mainstream
2024-01-18 00:29:56 +03:00
Ozkan Sezer
2afd04d09b
test/acinclude.m4 (AM_PATH_SDL2): apply recent sdl2.m4 PKG_CONFIG patch
2024-01-09 17:11:10 +03:00
Ozkan Sezer
7b4f1ef01b
yuv2rgb: warning fixes and comment out unused code
...
(cherry picked from commit 46de6241d7 )
(cherry picked from commit 0bd77a5b93 )
(cherry picked from commit f341c06552 )
(cherry picked from commit 4d2f9f3a32 )
(cherry picked from commit 06f8f9a891 )
(cherry picked from commit 0c4cb3d153 )
(cherry picked from commit 0dad56354c )
2024-01-03 09:07:50 -05:00
Ozkan Sezer
39a0013900
Makefile.os2: -DSDL_USE_LIBICONV to fix linkage for GNU libiconv option
2023-12-21 08:55:04 +03:00
Ozkan Sezer
ca26cde4e1
SDL_config_os2.h: enable SDL_JOYSTICK_VIRTUAL
2023-12-21 08:55:02 +03:00
Ozkan Sezer
d76097dc5e
fix os/2 and watcom builds after commit 7bb0e839a6
2023-12-21 01:11:24 +03:00
Ozkan Sezer
5773c347d5
test/watcom.mif: disable W201 warning for testautomation_stdlib.c.
2023-12-17 20:51:10 +03:00
Ozkan Sezer
3ac69c6210
test/watcom.mif: remove a stale rule.
2023-12-17 20:51:02 +03:00
Ozkan Sezer
bbcf40e811
cmake: fixed iconv detection test program
...
Fixes https://github.com/libsdl-org/SDL/issues/8614
2023-11-26 01:55:24 +03:00
Ozkan Sezer
657f5f791c
autotools: fix actually wrong use of AC_MSG_RESULT
2023-11-24 14:37:40 +03:00
Ozkan Sezer
489e9b69df
autotools: bump minimum needed autoconf version to 2.65.
...
older versions seem to output a broken configure script.
2023-11-24 01:01:20 +03:00
Ozkan Sezer
8cf7e9e7da
autotools, cmake: set SDL_SYSTEM_ICONV to OFF for windows (like SDL3.)
2023-11-23 03:32:04 +03:00
Ozkan Sezer
17e62abb6d
revise iconv detection:
...
- check libiconv with a linkage test with iconv.h included
- check libc iconv with a linkage test with iconv.h included
and LIBICONV_PLUG defined (in case libiconv header is in
include path)
- add new configuration option to prefer iconv from libiconv,
if available, over the libc version, defaults to disabled:
SDL_LIBICONV for cmake, --enable-libiconv for autotools.
- change FreeBSD specific LIBICONV_PLUG define in SDL_iconv.c
to configuration result.
2023-11-22 23:29:00 +03:00
Ozkan Sezer
3fb5124174
cmake: add openbsd wscons sources to build, if supported
2023-11-22 05:10:02 +03:00
Ozkan Sezer
59b0a2d711
kmsdrm: restrict KMSDRM_ReleaseVT/KMSDRM_AcquireVT to SDL_INPUT_LINUXEV
2023-11-22 05:10:02 +03:00
Ozkan Sezer
2222f44c94
use format string attributes for functions accepting va_list params, too
2023-11-17 15:56:10 +03:00
Ozkan Sezer
7555701def
autotools: fix linux joystick breakage after commit 221d6ea8a8
...
Fixes https://github.com/libsdl-org/SDL/issues/8488
2023-11-06 23:25:58 +03:00
Ozkan Sezer
93e51dd33e
fix a possible memory leak in SDL_vasprintf()
...
(cherry picked from commit 1a83bf2399 )
2023-11-05 20:02:20 +03:00
Ozkan Sezer
e226008d83
configure: move HAVE_LINUX_INPUT_H to CheckInputEvents()
...
c.f.: https://github.com/libsdl-org/SDL/pull/8459 .
Ref. issue https://github.com/libsdl-org/SDL/issues/8450
2023-11-02 23:33:20 +03:00
Ozkan Sezer
b29128994e
CI: change FreeBSD CI runner to cross-platform-actions.
2023-10-26 01:03:50 +03:00
Ozkan Sezer
44d8721087
Allow building against old Linux kernels.
2023-10-19 11:14:20 +03:00
Ozkan Sezer
b7a0ef6bdf
artsaudio: revert bad arts_init return code check from commit ce5da5d.
2023-10-10 10:40:20 +03:00
Ozkan Sezer
834e8898b9
SDL_dbus.h: define DBUS_TIMEOUT_USE_DEFAULT if not already defined.
...
(cherry picked from commit c521e1286b )
2023-09-21 01:32:50 +03:00
Ozkan Sezer
95a6f986a0
update config.guess and config.sub from mainstream
2023-09-20 14:50:56 +03:00
Ozkan Sezer
f032e8c191
updated dynapi after SDL_GDKGetDefaultUser addition
2023-08-25 19:03:40 +03:00
Ozkan Sezer
53d818e31c
updated config.guess and config.sub from mainstream
2023-08-05 14:03:02 +03:00
Ozkan Sezer
57f3c41b97
adjusted coding style in SDL_os2_joystick.c to match rest of SDL better
2023-08-02 20:40:10 +03:00
Ozkan Sezer
b58557a3a6
minor os/2 stuff merged from the bitwiseworks' fork
...
(cosmetics only.)
2023-08-02 17:10:28 +03:00
Ozkan Sezer
6a787b8004
SDL_video.c: move ngage video before offscreen.
...
Reference issue: https://github.com/libsdl-org/SDL/pull/8069 .
(cherry picked from commit e2e87a536c )
2023-08-02 17:00:40 +03:00
Ozkan Sezer
0deed07b3e
SDL_video.c: move os2 video before offscreen.
...
as offscreen is enabled in CMakeLists.txt, we get a blanks window
otherwise.
From a patch by Silvan Scherrer, at Bitwiseworks' fork.
(cherry picked from commit 66d5ad19f0 )
2023-08-02 17:00:40 +03:00
Ozkan Sezer
7cc3248044
minor os/2 stuff merged from the bitwiseworks' fork
2023-07-28 23:55:50 +03:00
Ozkan Sezer
3e341021c3
fixed typo in prev. patch.
2023-07-28 07:35:14 +03:00
Ozkan Sezer
1ecf77d630
test/testnativecocoa.m: fixed deprecation warnings.
2023-07-28 07:21:14 +03:00
Ozkan Sezer
e7761aec37
update docs/README-os2 after the last os/2 audio patch.
2023-07-25 20:51:32 +03:00
Ozkan Sezer
890bee64a4
os2 audio refactoring and capture support
...
- Fixed audio device detection and usage.
- Implemented audio capture support
- Refactored buffer handling to separate pointers to fill and drain buffers.
Based on patches by josch1710 and Lars Erdmann:
https://github.com/bitwiseworks/SDL2-os2/pull/7
2023-07-25 11:40:02 +03:00
Ozkan Sezer
4b2b475ac2
remove unused vulkan/*.hpp files.
...
(cherry picked from commit 611b3dd1fd )
2023-07-17 00:11:51 +03:00
Ozkan Sezer
776a5e0d25
pulseaudio: eliminate <pulse/simple.h> include.
2023-07-13 01:51:10 +03:00
Ozkan Sezer
376c6a9dd1
apply commit 3aba9d4473 to autotools, too.
2023-07-13 01:51:02 +03:00
Ozkan Sezer
29d461b628
need pulseaudio >=0.9.15. call pa_threaded_mainloop_set_name only if available.
2023-07-12 21:39:41 +03:00
Ozkan Sezer
0ad822eb70
SDL_RWFromMem, SDL_RWFromConstMem: reject negative size parameters.
2023-07-10 00:14:35 +03:00
Ozkan Sezer
825b0324cf
fixed windows build after commit 7e8be3f
2023-07-04 02:24:28 +03:00
Ozkan Sezer
681f67d353
fixed build after commit d2372c8538.
2023-06-14 00:25:50 +03:00
Ozkan Sezer
154ad6faa9
SDL_dynapi.c: minor cosmetics.
2023-06-10 20:50:10 +03:00
Ozkan Sezer
f5b3247aae
further mouse relative motion fix for os/2 (thanks Andrey Vasilkin)
2023-06-08 03:40:32 +03:00
Ozkan Sezer
b1324fbc9f
fixed os/2 mouse relative motion not working (thanks Andrey Vasilkin,)
...
for issue reported at https://github.com/bitwiseworks/SDL2-os2/issues/5
2023-06-05 11:50:50 +03:00
Ozkan Sezer
a1dea11d32
fix MSVC build error.
2023-06-04 14:29:10 +03:00
Ozkan Sezer
7f7ea909bc
testautomation_guid.c: fix integer warning in 32 bit builds.
2023-05-31 04:50:02 +03:00
Ozkan Sezer
9dea06f5b5
fix mingw build failures in CI with clang-tidy.
...
(cherry-picked from commit a8a72de6fb )
2023-05-26 23:55:04 +03:00
Ozkan Sezer
feeec90873
test/testgles2_sdf.c: type fixes from commit e26e893daf, style clean-up.
2023-05-19 17:00:24 +03:00
Ozkan Sezer
92a487f2e4
style fixes for SDL_PROC macros.
2023-05-19 14:10:02 +03:00
Ozkan Sezer
0f2322acfc
hidapi/mac: replace sprintf uses with snprintf.
...
Reference issues:
- https://github.com/libusb/hidapi/pull/509
- https://github.com/libusb/hidapi/pull/511
(cherry picked from commit ae9119c36b )
2023-04-24 10:46:49 -07:00
Ozkan Sezer
5f344c17c2
hidapi/mac: import mainstream commit c1b9d2ad
...
https://github.com/libusb/hidapi/commit/c1b9d2ad985c826f7916aa793d4728885a43a0f4
Properly handle the close of run loop on macOS
(https://github.com/libusb/hidapi/pull/522 )
- as per documentation `kCFRunLoopRunStopped` should be handled once the runloop is closed via `CFRunLoopStop`;
- if it is not handled - a race condition/crash may happen on the latest macOS when a device gets disconnected while being open;
(cherry picked from commit 62d1a2c836 )
2023-04-24 10:46:49 -07:00
Ozkan Sezer
f633915443
fix build after commit 22685556e5.
2023-04-05 02:10:56 +03:00
Ozkan Sezer
45a6ad8e57
wikiheaders.pl: make it work with older perl versions, e.g. 5.10.
2023-03-24 11:56:40 +03:00
Ozkan Sezer
5e35309913
fix bad merge of sizeof style patch
2023-03-10 08:32:24 +03:00
Ozkan Sezer
22de91a947
Removed guard around the enabled assertions support code
...
Otherwise, SDL_assert_always() wouldn't work.
Fixes https://github.com/libsdl-org/SDL/issues/7433
2023-03-09 20:51:50 +03:00
Ozkan Sezer
a70964aaf4
fix SDL_FindFreePlayerIndex so it can really return -1.
2023-03-08 20:00:50 +03:00
Ozkan Sezer
bc87983310
tests: added -DHAVE_SIGNAL_H to CFLAGS in watcom makefiles
2023-03-08 18:56:50 +03:00
Ozkan Sezer
fd4bb4154b
dynapi: replace uses of deprecated SDL_assert_state and SDL_assert_data
2023-03-03 03:01:02 +03:00
Ozkan Sezer
5a7ea76ed3
fix MSVC build failures in CI after commit 1e5e8e2f
...
(cherry picked from commit a2f8cf8fc0 )
2023-02-22 13:31:44 -05:00
Ozkan Sezer
da6bce4f76
SDL_x11dyn.h: include XInput2.h also for Xfixes
...
Fixes https://github.com/libsdl-org/SDL/issues/7343
2023-02-11 23:51:28 +03:00
Ozkan Sezer
22df572979
look for clock_gettime() in libc first, then in librt if not found.
2023-02-13 22:28:02 +03:00