Sam Lantinga
ab3c8552c2
Clean up renderers at shutdown
...
Fixes https://github.com/libsdl-org/SDL/issues/10082
2024-06-23 00:41:19 -07:00
expikr
3b504c4a89
Add SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL ( #10085 )
2024-06-23 00:09:59 -07:00
Frank Praznik
0280d8249a
keyboard: Fix typo
2024-06-22 15:56:50 -04:00
Sam Lantinga
90034b16dc
The keycode in key events is affected by modifiers by default.
...
This behavior can be customized with SDL_HINT_KEYCODE_OPTIONS.
2024-06-22 00:19:06 -07:00
Sam Lantinga
0dd579d40d
Removed SDL_Keysym
2024-06-21 22:06:08 -07:00
Sam Lantinga
679e4471ed
Added the ability to query the keymap for keycodes based on modifier state
2024-06-21 22:06:08 -07:00
Sam Lantinga
ef9bd8b609
Add the raw platform specific key code to SDL_Keysym
...
This allows applications to handle keys that SDL doesn't recognize, in a platform dependent way.
Fixes https://github.com/libsdl-org/SDL/issues/6390
2024-06-21 22:06:08 -07:00
Sam Lantinga
9d816c72ef
Updated SDL3 scancode list
...
This adds more app editing and audio control keys and removes keys that launch applications
Work in progress on https://github.com/libsdl-org/SDL/issues/6390
2024-06-21 22:06:08 -07:00
Sam Lantinga
00ab4a8eba
Added missing Windows scancodes
...
Based on the scancode list at https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_code_values , which is correct for all other scancodes
2024-06-21 22:06:08 -07:00
Sam Lantinga
306c4164bc
Added SDL_AllocateEventString()
2024-06-21 22:06:08 -07:00
Anonymous Maarten
cf267e4985
Fix -Wunused-variable warning in src/video/x11/SDL_x11events.c
2024-06-21 17:39:37 +02:00
Sam Lantinga
6e53a36414
Fixed Y + right shoulder button combination on third party Switch controllers
2024-06-20 14:39:04 -07:00
Frank Praznik
2f276a2eea
video: Expose HDR metadata per-window
...
Moves the HDR properties from the display to be per-window, and adds the frog_color protocol to enable HDR under Wayland.
2024-06-20 15:55:07 -04:00
John Kaniarz
8a80f41b77
Added check for n<0 in SDL_rand_n()
2024-06-19 17:00:58 -07:00
John Kaniarz
38cac043af
Added algorithm comments to SDL_rand_*()
2024-06-19 17:00:58 -07:00
John Kaniarz
8f29f8cae5
Renamed SDL_rand() to SDL_rand_bits() and updated tests
2024-06-19 17:00:58 -07:00
John Kaniarz
16e69cb4c9
Removed SDL_rand_r()
2024-06-19 11:02:02 -07:00
John Kaniarz
3ee4bff8ac
Upgraded constants after statistical testing.
2024-06-19 11:02:02 -07:00
John Kaniarz
83d21e20df
Added SDL_rand_float and SDL_rand_n to API
2024-06-19 11:02:02 -07:00
John Kaniarz
f4ee59a1a2
Moved SDL_rand auto-initialization out of SDL_rand_r
2024-06-19 11:02:02 -07:00
Sam Lantinga
421326b6da
Fixed controllers not being seen as gamepads after adding a mapping
2024-06-19 08:32:18 -07:00
Hubert Maier
90b7097a90
JANITORIAL: Fix ammount typos ( #10060 )
2024-06-19 07:27:19 -07:00
Hubert Maier
3acdb8a90b
JANITORIAL: Fix typos in comments in various files ( #10058 )
2024-06-19 07:13:46 -07:00
Aikawa Yataro
0fe9f5da54
Update qsort implementation
2024-06-19 05:40:01 +03:00
Sam Lantinga
d7391394d3
Switched the camera format to use framerate ratio instead of interval ratio
...
This is more intuitive for game developers and users.
Fixes https://github.com/libsdl-org/SDL/issues/9896
2024-06-18 07:39:52 -07:00
Sam Lantinga
ea8df46575
We don't support directly rendering to PQ swap chains
...
Normally this would be done by creating a PQ swap chain and a linear SRGB render target and doing blending operations in linear space and then final conversion to PQ HDR, but we're going to short-circuit all of that and just support linear SRGB output directly.
2024-06-17 17:29:33 -07:00
Sam Lantinga
4236fb2d63
Fixed build warnings with Android debug logging
2024-06-17 15:01:21 -07:00
Sam Lantinga
1cdcb57865
Fixed launching on Android after audio capture -> recording renaming
2024-06-17 14:44:54 -07:00
Sam Lantinga
361cae0874
Pass through the original name used by the Steam Virtual Gamepad
...
Proton uses this on Linux to determine what the XInput slot is for the gamepad. Other applications will get the real controller name and VID/PID by virtue of the code in SDL_steam_virtual_gamepad.c
2024-06-17 12:14:44 -07:00
Sam Lantinga
b6e6c73541
Fixed building the metal renderer with SDL_LEAN_AND_MEAN
...
Fixes https://github.com/libsdl-org/SDL/issues/10038
2024-06-16 22:04:57 -07:00
Sam Lantinga
aeea819494
Added colorspace to SDL_CameraSpec
2024-06-16 17:47:16 -07:00
Sam Lantinga
d1d484ddbe
Added SDL_srand(), SDL_rand(), and SDL_rand_r() (thanks @JKaniarz!)
...
These are simple random functions that should not be used for serious random number generation.
Fixes https://github.com/libsdl-org/SDL/issues/4968
2024-06-16 07:41:00 -07:00
Sam Lantinga
9cb4bb92f6
Fixed parsing SDL_ANALYZER_NORETURN
2024-06-16 07:08:19 -07:00
Sam Lantinga
cf2d8dac30
Reordered conditional for clarity
2024-06-16 06:25:41 -07:00
expikr
ee559d51be
Add SDL_MOUSE_RELATIVE_CURSOR_VISIBLE ( #7947 )
2024-06-16 06:21:29 -07:00
Ryan C. Gordon
17af09f3a9
coreaudio: simplify memory leak fix.
...
I _did_ appreciate the explanation, but it doesn't have to live in the
source code; also we can just release `devuid` and then check for error with
the usual macro, since SDL is done with it either way at this point.
2024-06-15 11:42:44 -04:00
Sam Lantinga
51f90f308b
Fixed spacing
2024-06-15 08:10:48 -07:00
obeecodes
3b5dce10c4
Addressed memory leak in SDL_coreaudio.m
2024-06-15 08:05:47 -07:00
Ryan C. Gordon
b83ab7eb12
audio: Remove const from an SDL_bool parameter in SDL_AddAudioDevice.
2024-06-15 01:08:12 -04:00
Ryan C. Gordon
38f0214e8a
audio: Refer to audio devices to "playback" and "recording".
...
Fixes #9619 .
2024-06-15 01:08:12 -04:00
Anonymous Maarten
031dc0743f
Use an opaque struct typedef for SDL_GLContext
...
Using a struct typedef instead of a void pointer results in extra C typechecks
2024-06-15 01:43:22 +02:00
Frank Praznik
41532e84cb
wayland: Prevent a possible crash when determining the display for a minimized window
...
A minimized window may not be associated with any displays, so check that the output array is valid and that there is at least one associated display before dereferencing.
Fixes a crash when attempting to unset fullscreen on a minimized window.
2024-06-14 12:25:13 -04:00
Emmanuele Bassi
a98774e62c
Check the Xft/DPI XSETTINGS
...
Similar to Xrm's "Xft.dpi" key, but stores in 1024th increments.
2024-06-14 08:54:17 -07:00
Emmanuele Bassi
e049098733
Query XSETTINGS for the content scale factor
...
For GTK-based systems using XSETTINGS it's much more likely to be
available, rather than the "GDK_SCALE" environment variable, which is a
debugging tool according to the GTK documentation.
2024-06-14 08:54:17 -07:00
Emmanuele Bassi
61dafb3b2f
Add XSETTINGS support to x11 driver
...
Import the XSettingsClient implementation to handle the settings
selection.
Currently, we only care about the Gdk/WindowScalingFactor value used by
the windowing system to notify us of display-wide changes in the scaling
factor.
2024-06-14 08:54:17 -07:00
Ozkan Sezer
d6da494c1c
un-revert commit 65d911a:
...
SDL3 isn't using `long long` casts, so there are no issues there
SDL2 needs handling it right..
2024-06-14 18:37:50 +03:00
Ozkan Sezer
e25a7e88ce
revert commit 65d911a as it broke linux..
2024-06-14 14:56:24 +03:00
Ozkan Sezer
65d911aff0
SDL_events.c: override of SDL_PRIs64 for mingw is no longer needed
2024-06-14 14:50:50 +03:00
Ryan C. Gordon
5bc654aad3
camera: SDL_GetCameraDeviceName() now follows the SDL_GetStringRule.
2024-06-13 18:13:51 -04:00
Sam Lantinga
0635112119
Added SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE (thanks @lostgoat!)
2024-06-13 14:54:36 -07:00