Commit Graph
100 Commits
Author SHA1 Message Date
Ozkan Sezer 9c6c2387b9 stb_image.h: apply patches from mainstream PRs 1839, 1862 and 1863.
Patches authored by @NBickford-NV to fix mainstream issues 1838, 1860,
1861.
2025-11-30 23:11:20 +03:00
Ozkan Sezer a882afafe5 fixed several -Wzero-as-null-pointer-constant warnings from gcc-15 2025-11-17 17:55:10 +03:00
Ozkan Sezer 3f0545587f Revert "Create FUNDING.yml"
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
This reverts commit 10f6b860ee.
Looks like it was accidental..
2025-11-16 01:15:56 +03:00
Ozkan Sezer 667272e71d Revert "Update README.md"
This reverts commit b83bd80424.
Looks like it was accidental..
2025-11-16 01:15:10 +03:00
Ozkan Sezer 616c21d730 SDL_camera_v4l2.c: fix build against old kernel headers. 2025-11-06 18:28:50 +03:00
Ozkan Sezer 02c4478f93 SDL_ConvertSurface: clear sdl2-compat.surface2 on the converted surface
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Fixes https://github.com/libsdl-org/sdl2-compat/issues/534
2025-10-23 08:24:23 +03:00
Ozkan Sezer 04aa74b5f9 SDL_dlopennote.h: define SDL_DISABLE_DLOPEN_NOTES for old gcc < 3.1
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
gcc < 3.1 doesn't support 'used' attribute at the least.

Also change the SDL_ELF_NOTE_DLOPEN variadic macro for disabled case to
be compatible with old gcc versions: tested with gcc-2.95.

Old MSVC cases, e.g. VS 2003 and older, are still not resolved.

Reference issue: https://github.com/libsdl-org/SDL/issues/14214.
2025-10-11 05:20:20 +03:00
Ozkan Sezer 2603565993 SDL_gtk.c: make private procedure signal_connect() static 2025-10-11 02:51:14 +03:00
Ozkan Sezer ae7643e8ae SDL_fribidi.h: include sys/types.h for ssize_t.
also remove fribidi.h include from SDL_fribidi.c (already included
by SDL_fribidi.h) and do style clean-up.
2025-10-11 02:50:20 +03:00
Ozkan Sezer aab9423796 fix wiki breakage for commit e4f24ff7ae (PR/#14053) 2025-10-08 22:10:50 +03:00
Ozkan Sezer 97c1df66a8 ci: bump cross-platform-actions. 2025-10-07 14:01:34 +03:00
Ozkan Sezerandeafton 3723913969 SDL_zenitymessagebox.c: Add exit code checking.
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Fixes https://github.com/libsdl-org/SDL/issues/14140
Closes https://github.com/libsdl-org/SDL/pull/14146

Co-authored-by: eafton <blox2000@protonmail.com>
2025-10-05 12:28:39 +03:00
Ozkan Sezer 6c3cc3587d zenity dialog: make sure that --modal --attach switches are supported.
Reference issue: https://github.com/libsdl-org/SDL/issues/14140
2025-10-05 12:21:14 +03:00
Ozkan Sezer 5fffa8b9ad SDL_video_unsupported.c: fix SDL_iOSAnimationCallback type redefinition error
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-09-29 08:41:14 +03:00
Ozkan Sezer 9cefbab766 remove watcom compiler support from private sources 2025-09-20 03:47:02 +03:00
Ozkan Sezer 81f2f44843 SDL_endian.h: don't add _m_prefetch hack for clang-cl if available as a builtin
Fixes: https://github.com/libsdl-org/SDL/issues/13952 .
2025-09-15 20:04:29 +03:00
Ozkan Sezer 5907bf2555 cmake: remove GetDpiForMonitor() assignment from shellscalingapi.h check
It always fails, because we don't set the needed link library, i.e. shcore.
Besides, SDL3.dll doesn't link to shcore.dll, it links to it at runtime, so
it is unnecessary to check for that symbol here.

Reference issue: https://github.com/libsdl-org/SDL/pull/13904
2025-09-09 04:55:32 +03:00
Ozkan Sezer b2c6dfa4c5 dialog, windows: tweak includes and include order,
so that the set _WIN32_WINNT value is visible to the source.

Reference issue: https://github.com/libsdl-org/SDL/pull/13904
2025-09-09 04:55:24 +03:00
Ozkan Sezer baf965c1ca Revert "video/openvr: define OPENVR_API_NODLL"
This reverts commit 976ba1e750.
2025-09-06 04:15:55 +03:00
Ozkan Sezer 976ba1e750 video/openvr: define OPENVR_API_NODLL
.. so that S_API doesn't expand to __declspec(dllimport)
2025-09-06 03:05:50 +03:00
Ozkan Sezer cc9937201e x11: fix a typo after PR/13855 and kill lots of trailing whitespace 2025-09-03 04:37:56 +03:00
Ozkan Sezer 83bb0f9105 cmake: simd detection clean-up for Apple multi-arch configs. 2025-09-02 22:34:10 +03:00
Ozkan Sezer 875653658a cmake: revert commit 5d1bbd9 and change sse4.2 test
clang doesn't support -mcrc32 until version 14.0, therefore drop -mcrc32
use in sse 4.2 test, and change it to check _mm_cmpgt_epi64() instead of
_mm_crc32_u32(). without this, sse4.2 check was failing with clang <= 13

Fixes https://github.com/libsdl-org/SDL/pull/12223
2025-08-31 03:20:20 +03:00
Ozkan Sezer c0e5fd55d2 CI: add OpenBSD workflow 2025-08-30 01:55:02 +03:00
Ozkan Sezer 98bed62259 cmake: fall back to -Wconversion if -Wfloat-conversion isn't available
... during checks for valid isinf/isinff/isnan/isnanf macros.
2025-08-27 22:20:02 +03:00
Ozkan Sezer f241e8e8fd windows: replace shobjidl_core.h usage with shobjidl.h except for when targeting xbox
Closes https://github.com/libsdl-org/SDL/pull/13571
2025-08-01 17:11:49 -07:00
Ozkan Sezer 83818eeb95 tests: c90 fixes (#endif comments) for consistency after commit 9e37839
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-08-01 06:28:02 +03:00
Ozkan Sezer 9c54d686aa arguably better wording..
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-07-27 20:00:02 +03:00
Ozkan Sezer fb0e03f262 fix ARM64 linkage with Visual Studio >= 17.14 when SDL_LIBC is disabled
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Reference issue:  https://github.com/libsdl-org/SDL/issues/13254

(cherry picked from commit 2fb6abb9ad)
2025-07-09 01:30:55 +03:00
Ozkan Sezer af8bee2dd1 alsa: change an SDL_LogError into SDL_LogDebug.
it is informational only and seeing ERROR on the terminal was confusing
2025-06-22 21:04:44 -07:00
Ozkan Sezer 81e3066303 hidapi/libusb: disable C5287 warning in MSVC builds
A quick search implies that it is a bogus warning:
https://www.google.com/search?q=visual+studio+C5287
2025-06-21 07:15:53 -07:00
Ozkan Sezer 329b5f27d6 fix preprocessor directive for SDL_RESTRICT definition in C99 case.
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-05-30 23:56:50 +03:00
Ozkan Sezer 0d58594e66 fix inverted __STDC_VERSION__ condition in SDL_RESTRICT definition. 2025-05-30 23:51:50 +03:00
Ozkan Sezer 25db127450 SDL_video.c: remove two stray line continuation chars .
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-05-26 01:41:47 +03:00
Ozkan Sezer d9e58baa6d fixed the field of SDL_MouseMotionTransformCallback 2025-05-08 14:45:24 +03:00
Ozkan Sezer 17bba029ba don't prototype strdup() for __clang_analyzer__ case in windows builds.
Fixes:  https://github.com/libsdl-org/SDL/issues/12948.
2025-05-04 10:35:31 -07:00
Ozkan Sezer 016ba86f93 tray, unix: make pointers g_object_ref and g_object_ref_sink static
Fixes:  https://github.com/libsdl-org/SDL/issues/12908.
2025-04-27 11:34:40 -04:00
Ozkan Sezer 0dbf585ace fix SDL_audiocvt.c MSVC build. 2025-04-26 05:50:00 +03:00
Ozkan Sezer 360cc2791f test/msdf_font.bmp: mark as non-executable. 2025-04-26 02:39:20 +03:00
Ozkan Sezer b5ed0d0138 stb_image.h: apply mainstream PR/1736
Fix root-cause of CVE-2021-45340 : dereference of NULL ptr.
Patch authored by Henner Zeller <h.zeller@acm.org>
Mainstream pull request: https://github.com/nothings/stb/pull/1736
2025-04-23 17:55:02 +03:00
Ozkan Sezer ab57ef9d7b update sdlgenblit.pl after PR/12769
Closes: https://github.com/libsdl-org/SDL/issues/12774.
2025-04-08 18:24:11 +03:00
Ozkan Sezer b0a0d236d8 fix sdlgenblit.pl so that it actually matches the generated source 2025-04-08 18:24:11 +03:00
Ozkan Sezer 0fdfa925f2 rename local pointer vars 'pixel' to 'pixels'
Reference issue: https://github.com/libsdl-org/SDL/issues/12749.
2025-04-08 18:20:03 +03:00
Ozkan Sezer 4c1a3ccd45 rename local vars 'pixel' to 'pixelvalue'
Reference issue: https://github.com/libsdl-org/SDL/issues/12749.
2025-04-07 21:10:51 +03:00
Ozkan Sezer 433704e774 rename 'pixel' params of SDL_GetRGB, SDL_GetRGBA and SDL_LookupRGBAColor
Reference issue: https://github.com/libsdl-org/SDL/issues/12749.
2025-04-07 21:10:51 +03:00
Ozkan Sezer 5a59b5f321 bool is 4 bytes in Apple MacOS X 32 bit PPC ABI
Reference issue: https://github.com/libsdl-org/SDL/issues/12749.
2025-04-07 19:21:30 +03:00
Ozkan Sezer 87e6d2250f examples, affine-textures: fix RISC-OS build. 2025-03-28 20:56:50 +03:00
Ozkan Sezer ca3c5fd409 fix build: s/SDL_DetectSandbox/SDL_GetSandbox/ 2025-03-02 19:40:02 +03:00
Ozkan Sezer 60c65f9fa4 SDL_camera.c: fix failure-return in SDL_PrepareCameraSurfaces(). 2025-03-01 04:37:02 +03:00
Ozkan Sezer 73a8143581 timer, windows: allow building high resolution code with old SDKs. 2025-02-02 21:23:50 +03:00
Ozkan Sezer e4fcc7b6e7 gpu/vulkan/SDL_gpu_vulkan.c: fix type redefinition error
src/gpu/vulkan/SDL_gpu_vulkan.c:763: error: redefinition of typedef 'VulkanUniformBuffer'
src/gpu/vulkan/SDL_gpu_vulkan.c:482: note: previous declaration of 'VulkanUniformBuffer' was here
2025-01-31 02:50:00 +03:00
Ozkan Sezer 5815372206 minor update to mingw-w64 build instructions. 2025-01-14 05:04:24 +03:00
Ozkan Sezer 307dac97ac testcontroller.c: fix build errors due to -Wformat after commit b524af1 2025-01-12 22:00:02 +03:00
Ozkan Sezer 61f13b94d1 add a fallback SDL_TriggerBreakpoint() for MSVC after commit ebaa30d3. 2025-01-11 02:11:50 +03:00
Ozkan Sezer 8ec576ddab tray, windows: fix logic error from commit 1167cf54e1
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-01-07 10:15:40 +03:00
Ozkan Sezer 54752f8d1c SDL_malloc.c: replace FORCEINLINE usage with SDL_FORCE_INLINE 2025-01-02 01:15:28 +01:00
Ozkan Sezer c2121dd9a2 testcamera: fix MSVC build failure due to C4244 warning. 2024-12-29 21:28:02 +03:00
Ozkan Sezer ec8a780ad4 tray, unix: fix -Wformat warnings
src/tray/unix/SDL_tray.c: In function 'get_tmp_filename':
src/tray/unix/SDL_tray.c:345: warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'
src/tray/unix/SDL_tray.c: In function 'get_appindicator_id':
src/tray/unix/SDL_tray.c:361: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int'
2024-12-28 18:37:56 +03:00
Ozkan Sezer 578509c326 windows/SDL_tray.c, video/windows/SDL_surface_utils.h: use SDL_windows.h
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions
2024-12-27 12:28:02 +03:00
Ozkan Sezer 05932e05da tray, windows: replace ZeroMemory() with SDL_zero() 2024-12-27 12:05:00 +03:00
Ozkan Sezer cd1bb6247b video/windows/SDL_surface_utils.c: replace ZeroMemory() with SDL_zero() 2024-12-27 06:03:37 +03:00
Ozkan Sezer 50fbae9302 tray, windows: define NOTIFYICON_VERSION_4 and NIF_SHOWTIP, if missing. 2024-12-27 05:30:50 +03:00
Ozkan Sezer 17ef0c1237 SDL_video.c: replace strlcpy with memcpy in SDL_ShowMessageBox() 2024-12-27 00:01:56 +03:00
Ozkan Sezer 6fa6297441 fix typo from commit b84f150d06 2024-12-17 11:15:56 +03:00
Ozkan Sezer b84f150d06 fix macOS builds with hidapi disabled
Fixes: https://github.com/libsdl-org/SDL/issues/11647 .
2024-12-17 11:11:56 +03:00
Ozkan Sezer d1b8fcd692 work around type redefinition errors in SDL_immdevice.h 2024-12-06 17:51:00 +03:00
Ozkan Sezer 5bfece34f9 ran gendynapi.pl after PR/11170. 2024-12-05 02:28:50 +03:00
Ozkan Sezer 830b132cd4 SDL_asyncio_liburing.c: replace __kernel_time64_t use with SDL's Sint64 2024-12-03 23:39:11 -05:00
Ozkan Sezer 4ac78706bf SDL_asyncio_liburing.c: replace size_t casts on pointers with intptr_t 2024-12-03 23:39:11 -05:00
Ozkan Sezer 41b0d36a6c fix MSVC projects after commit 51637495 2024-11-23 01:22:12 +03:00
Ozkan Sezer 7bf3cae02e examples: fix cmake after commit 51637495 2024-11-23 00:56:40 +03:00
Ozkan Sezer 0f9e551d71 joystick/gdk/SDL_gameinputjoystick.c: fix build errors due to -Wformat 2024-11-17 00:45:02 +03:00
Ozkan Sezer 93471cf78d video/openvr: minor clean-up:
- make all of function pointers static
- make EGLint context_attribs[] static
- comment out unused function pointer ov_wglGetCurrentContext
- remove unused SDL_DisplayMode openvr_dm_default
- move SDL_VideoDisplay openvr_vd_default to OPENVR_VideoInit()
  context and eliminate its C99 initializers
- replace atoi() calls with SDL_atoi()
- replace atof() calls with SDL_atof()
2024-10-25 23:20:24 +03:00
Ozkan Sezer 3d2c8c510d add GLES3 headers from Khronos for OpenVR video driver. 2024-10-19 10:23:55 -07:00
Ozkan Sezer a6e5ab437f video/openvr: Avoid type redefinition errors.
Also, let SDL handle stdint.h and stdbool.h.
2024-10-18 19:21:32 +03:00
Ozkan Sezer 569691797d windows/SDL_systhread.c: fix permissions 2024-10-18 05:00:04 +03:00
Ozkan Sezer 4612db21a3 SDL_utils.c: restrict gethostname() usage to non-windows
Reference issue: https://github.com/libsdl-org/SDL/issues/11228.
2024-10-17 12:47:02 +03:00
Ozkan Sezer 3ebfdb04be SDL_stdinc.h: provide a prototype for strdup for __clang_analyzer__ case
Because strdup is not ANSI but POSIX, and its prototype might be hidden..

... and re-enable clang-tidy in CI for LoongArch64.

Fixes:  https://github.com/libsdl-org/SDL/issues/11219.
2024-10-16 21:50:40 +03:00
Ozkan Sezer 18410c03ea cmake: fix checks for fdatasync() and gethostname() 2024-10-16 19:40:51 +03:00
Ozkan Sezer 638b50b69b CI, LoongArch64: disable clang-tidy
Reference issue: https://github.com/libsdl-org/SDL/issues/11219 .
2024-10-15 21:05:20 +03:00
Ozkan Sezer 9fac4b9f5f SDL_windowsmodes.c: Fix MSVC builds against SDKs older than 10.0.17134.0
workaround the missing DISPLAYCONFIG_DEVICE_INFO_GET_SDR_WHITE_LEVEL enum value
and DISPLAYCONFIG_SDR_WHITE_LEVEL struct.

Fixes: https://github.com/libsdl-org/SDL/issues/11193
Closes:  https://github.com/libsdl-org/SDL/pull/11205
2024-10-14 09:04:25 -07:00
Ozkan Sezer 41dfe2c246 test/testautomation_stdlib.c: fix gcc warning on 32 bit
test/testautomation_stdlib.c:361: warning: integer constant is too large for 'long' type
2024-10-10 21:10:24 +03:00
Ozkan Sezer 7ff819141d libm/e_exp.c: fix gcc warning on 32 bit:
src/libm/e_exp.c:105: warning: integer constant is too large for 'long' type
2024-10-10 18:23:20 +03:00
Ozkan Sezer 13c5d1092f hidapi: update hid_write() for windows from mainstream.
Returns bytes_written if WriteFile returns synchronously
Relevant mainstream discussions:
	https://github.com/libusb/hidapi/pull/697
	https://github.com/libusb/hidapi/issues/695
2024-09-30 19:49:44 -07:00
Ozkan Sezer 5f304b3a47 Fix builed error after commit 0e45b824e3 due to -Wunused-variable 2024-09-29 15:40:02 +03:00
Ozkan Sezer 1088ea55fa SDL_gpu_d3d11.c: define D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD for old toolchains 2024-09-27 23:55:02 +03:00
Ozkan Sezer b736285053 examples/renderer/08-rotating-textures: Fix compiler warning on MSVC . 2024-09-22 12:02:50 +03:00
Ozkan Sezer 254b36361e Add SDL_PRILL? format specifiers specifically for long long type. 2024-09-21 23:03:50 +03:00
Ozkan Sezer 88a01fbc96 testautomation_stdlib.c: fix -Wformat warnings from mingw with %lld/%llu
i.e.:  unknown conversion type character 'l' in format
See https://github.com/libsdl-org/SDL/pull/10789#issuecomment-2354011906
2024-09-19 20:37:11 +03:00
Ozkan Sezer 7edf7fad66 fix bool define when SDL_DEFINE_STDBOOL is defined:
it should be unsigned.
2024-09-18 12:17:22 -07:00
Ozkan Sezer ff90570a3c define SDL_DEFINE_STDBOOL for gcc < 3 2024-09-18 12:17:22 -07:00
Ozkan Sezer 8caf25f7b3 testautomation_stdlib.c (stdlib_strtox): fix warning from gcc-4.9:
test/testautomation_stdlib.c: In function 'stdlib_strtox':
test/testautomation_stdlib.c:1339:9: warning: this decimal constant is unsigned only in ISO C90
         STRTOX_TEST_CASE(SDL_strtoul, unsigned long, "%lu", "4294967295", 10, 4294967295, 10);
         ^
test/testautomation_stdlib.c:1340:9: warning: this decimal constant is unsigned only in ISO C90
         STRTOX_TEST_CASE(SDL_strtoul, unsigned long, "%lu", "4294967296", 10, 4294967295, 10);
         ^
2024-09-18 01:03:10 +03:00
Ozkan Sezer a833ee2e63 SDL_gpu.c: fixed build when SDL_GPU_DISABLED is defined. 2024-09-14 20:40:56 +03:00
Ozkan Sezer c0b15e57f4 cmake: disable GPU backends for winrt 2024-09-05 22:39:02 +03:00
Ozkan Sezer f494658f9c SDL_gpu.c: remove BOM. 2024-09-05 22:39:02 +03:00
Ozkan Sezer cb2919ac55 [GPU] MinGW build fixes:
- CreateEventEx() is guarded by _WIN32_WINNT >= 0x0600:
  In SDL_gpu_d3d12.c, include core/windows/SDL_windows.h
  that defines _WIN32_WINNT properly to account for that
- DXGIInfoQueue stuff is not available in all toolchains
  such as mingw-w64 version 8.0.3
- SDL_gpu_d3d11.c: _WIN32 is always defined by MinGW, as
  is the case for all windows-targeting compilers, so it
  doesn't guarantee absence of DXGIInfoQueue stuff:
  rely on __IDXGIInfoQueue_INTERFACE_DEFINED__, as it is
  done elsewhere.

Fixes: https://github.com/libsdl-org/SDL/issues/10705 .
2024-09-05 22:39:02 +03:00
Ozkan Sezer f317581c91 SDL_log.h: Use ASCII characters.
(was missed in commit 7ca676aeed for issue #10636)
2024-09-04 14:56:40 +03:00
Ozkan Sezer 845212388e RAWINPUT_JoystickOpen: add missing SDL_stack_free() calls.
Fixes https://github.com/libsdl-org/SDL/issues/10574.
2024-08-25 11:05:40 +03:00
Ozkan Sezer f93920a4f1 video, x11: fix linkage if SDL_VIDEO_DRIVER_X11_XINPUT2 isn't defined. 2024-08-10 15:55:00 +03:00
Ozkan Sezer 7d27a97402 d3d12.h, d3d12sdklayers.h: fix build against older mingw-w64 versions.
Fixes: https://github.com/libsdl-org/SDL/issues/10452 .
2024-08-01 21:45:02 +03:00