Commit Graph

17211 Commits

Author SHA1 Message Date
Arias800 36a3959bde
Merge d8d91934c6 into 88a01fbc96 2024-09-19 15:42:06 -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
Ryan C. Gordon b4e2777820
examples/renderer/03-lines: Fix compiler warning on Visual Studio. 2024-09-19 13:31:24 -04:00
Ryan C. Gordon 2e3e5abd7d
examples/renderer/03-lines: use a gray background. 2024-09-19 12:58:37 -04:00
Frank Praznik fd0ce75e2e tests: Fix tests when run with the --high-pixel-density flag
Scales pointer coordinates where needed to fix the following tests when run with the --high-pixel-density flag:

- testaudio
- testaudiostreamdynamicresample
- testhittesting
- testintersections
- testmanymouse
- testoverlay
- testwm
2024-09-19 12:54:13 -04:00
Ryan C. Gordon 745d5e4991
examples/renderer/03-lines: Make this less obnoxious to look at. 2024-09-19 12:52:04 -04:00
Ryan C. Gordon 1b266ec13d
examples: added renderer/03-lines 2024-09-19 12:16:12 -04:00
Sam Lantinga 6771a6020d testcamera: don't enable verbose logging
Fixes https://github.com/libsdl-org/SDL/issues/10541
2024-09-18 22:26:38 -07:00
T3hD0gg 594edb6bd2 Add Thrustmaster TMX VID & PID to wheel device list. 2024-09-18 22:19:54 -07:00
Sam Lantinga 34c6011360 Fixed Windows build 2024-09-18 14:55:51 -07:00
Sam Lantinga d29a0e3f31 Fixed warning: no previous prototype for function 2024-09-18 14:34:14 -07:00
Sam Lantinga 7a924b36ae compile_shaders.sh shouldn't be in the SDL framework 2024-09-18 14:31:00 -07:00
SDL Wiki Bot 1f727b61f3 Sync SDL3 wiki -> header 2024-09-18 21:04:36 +00:00
Sam Lantinga 398dff7c25 Added support for the HORI licensed Steam Controller 2024-09-18 14:08:32 -07:00
Sam Lantinga 481203c074 Fixed Xcode warnings 2024-09-18 13:20:53 -07: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
Sam Lantinga 95c3ee77c1 Removed testing code 2024-09-18 11:12:06 -07:00
Sam Lantinga ea640894d3 Fixed SDL_DEFINE_STDBOOL logic if __bool_true_false_are_defined is defined 2024-09-18 10:50:52 -07:00
Sam Lantinga 46fb2c6f1b Added a script to help with the bool rename 2024-09-18 10:48:11 -07:00
Simon McVittie 23f855a970 render: Integrate fix-shaders.sh into build-shaders.sh
By writing the fxc and dxc output to a temporary file and then
converting that temporary file to the desired filename, we avoid
the incompatible semantics of sed -i on GNU systems (sed -i does not
create a backup filename, and does not take an argument unless it is
"bundled") and macOS (sed -i requires an argument, possibly empty).

Resolves: https://github.com/libsdl-org/SDL/issues/10878
Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-18 10:38:59 -07:00
Sam Lantinga d658ef6627 Don't guess about the size of an int, assert it! 2024-09-18 10:37:11 -07:00
Sam Lantinga 32fd1878a0 Provide a definition of bool if needed for your environment 2024-09-18 10:37:11 -07:00
Sam Lantinga 1834c83d5a testplatform: make sure bool is 1 byte 2024-09-18 10:01:15 -07:00
SDL Wiki Bot 026d3c2306 Sync SDL3 wiki -> header 2024-09-18 15:33:11 +00:00
Sam Lantinga 95f7e53233 Added the examples directory to the API renaming tool 2024-09-18 08:32:30 -07:00
Sam Lantinga a90ad3b0e2 Removed SDL_bool in favor of plain bool
We require stdbool.h in the build environment, so we might as well use the plain bool type.

If your environment doesn't have stdbool.h, this simple replacement will suffice:
typedef signed char bool;
2024-09-18 08:32:30 -07:00
SDL Wiki Bot 9dd8859240 Sync SDL3 wiki -> header 2024-09-18 15:19:01 +00:00
Sam Lantinga 32cf23d392 Added video/x11/edid.h to third party code list 2024-09-18 08:18:26 -07:00
Sam Lantinga 407ccadfd7 Added copyright header to edid.h 2024-09-18 08:18:26 -07:00
Sam Lantinga bd04459cde Fix typos (thanks @qndel!)
Fix typos in comments and in one case in a returned error ("insuffient -> insufficient" fb273eb)
codespell src/ *.cpp *.h *.hpp --ignore-words-list unknwn,thid,algebric,statics,pixelX,pEvents,caf,ptd,parms,pEvent,parm,TextureRS,TE,HDA,LOD,datas,UE,xwindows,IIF
cd src; git checkout \
    events/imKStoUCS.* \
    hidapi \
    joystick/controller_type.c \
    joystick/controller_type.h \
    joystick/hidapi/steam/controller_constants.h \
    joystick/hidapi/steam/controller_structs.h \
    libm \
    stdlib/SDL_malloc.c \
    stdlib/SDL_qsort.c \
    stdlib/SDL_strtokr.c \
    video/khronos \
    video/x11/edid.h \
    video/x11/edid-parse.c \
    video/x11/xsettings-client.* \
    video/yuv2rgb
2024-09-18 08:18:26 -07:00
Frank Praznik e4f987f299
tests: Fix testdropfile on high-DPI displays
Convert the window pointer coordinates to buffer coordinates for rendering, so that the cross-hairs align with the cursor on scaled desktops.
2024-09-18 11:00:19 -04: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
Sam Lantinga 03ae792df3 Fixed the recording field in audio device events
Fixes https://github.com/libsdl-org/SDL/issues/10885
2024-09-17 11:36:55 -07:00
Sam Lantinga c68e9e157c Fixed typo 2024-09-17 10:59:28 -07:00
Sam Lantinga bc9780299c Don't define backends if SDL_GPU_DISABLED is set 2024-09-17 09:40:29 -07:00
SDL Wiki Bot 8481d1a12b Sync SDL3 wiki -> header 2024-09-17 15:54:09 +00:00
Sam Lantinga 807b8a9d4d Allow initializing hints and properties from any thread 2024-09-17 08:53:27 -07:00
Sam Lantinga d0edf68774 Added Uint32 versions of the atomic functions 2024-09-17 08:53:27 -07:00
Sam Lantinga 8d223b3037 Renamed atomic functions to match SDL 3.0 naming convention
This will also allow us to cleanly add atomic operations for other types in the future.
2024-09-17 08:53:27 -07:00
Sam Lantinga f3e419596b Removed SDL_INIT_TIMER
This is no longer necessary before calling SDL_AddTimer()
2024-09-17 08:53:27 -07:00
Sam Lantinga 9275c533ca Added thread-safe initialization/cleanup support
Also went through and removed inappropriate uses of spinlocks.

Fixes https://github.com/libsdl-org/SDL/issues/10872
2024-09-17 08:53:27 -07:00
Sam Lantinga 7edd43c276 Don't define render_drivers if SDL_RENDER_DISABLED is set
Fixes https://github.com/libsdl-org/SDL/issues/10861
2024-09-17 08:46:05 -07:00
Sam Lantinga 98cd8b34a7 Close the other file descriptors after redirection has taken place
Fixes https://github.com/libsdl-org/SDL/issues/10868
2024-09-17 07:46:48 -07:00
Simon McVittie 4b3058d58d render: Don't try to rebuild D3D11, D3D12, Metal shaders without spirv-cross
Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-17 07:43:37 -07:00
Simon McVittie 13500bbf50 render: Fix detection of fxc, dxc in build-shaders.sh
We want `$USE_FXC` to default to the result of evaluating the variable
`$HAVE_FXC`, not the literal string `HAVE_FXC`, and the same for dxc.

Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-17 07:43:37 -07:00
Green Sky 11129761e7 v4l2: return success if the device is ready 2024-09-17 07:41:43 -07:00
Simon McVittie ab9c68d9ff pipewire: Always destroy hotplug loop during deinitialization
We always need to destroy the hotplug loop and its associated resources
(if created) before we can deinitialize and unload the Pipewire library.

In the happy path where everything worked correctly, this means we will
call hotplug_loop_destroy() twice (once from PIPEWIRE_DeinitializeStart()
and a second time from PIPEWIRE_Deinitialize()), but that's OK, because
it's idempotent and so will do nothing the second time.

In error-handling code paths, this avoids needing to remember to call
hotplug_loop_destroy() explicitly, which should make it easier to avoid
bugs like #10787.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-09-17 07:35:42 -07:00
Anonymous Maarten 1ffb9f22aa build-release.py fixes from SDL2 port 2024-09-17 16:24:02 +02:00
Sam Lantinga 231ea07617 Added SDL_LogTrace() 2024-09-17 02:04:54 -07:00