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
51902d4ac5
Updated headers with latest wikiheaders tweaks.
2024-06-14 02:09:55 -04:00
Ryan C. Gordon
c0c0c64a1d
wikiheaders: Some quick scripting to make params/return info consistent.
...
- Lowercase the first letter of \param and \returns data; in the former case,
it looks better in the table and Doxyggen (imho), in the latter it's because
it's inserted after the word "Returns" to make an english sentence on the
wiki. This is disabled in this commit, but it was useful to turn it on to
fix up the headers manually.
- Make sure everything ends with punctuation. Inserts a period if there's
no existing period or exclamation point at the end of the text. This is
enabled going forward, so we won't have to manage it ourselves.
2024-06-14 02:08:50 -04:00
Ryan C. Gordon
5bc654aad3
camera: SDL_GetCameraDeviceName() now follows the SDL_GetStringRule.
2024-06-13 18:13:51 -04:00
Ryan C. Gordon
2ad7c70ac6
documentation: clean up a minor syntax issue.
2024-06-13 18:10:28 -04:00
Ryan C. Gordon
466886049c
SDL_main.h: fix up SDL_main_func documentation to match SDL_main.
2024-06-13 18:08:40 -04:00
SDL Wiki Bot
2253c3cacf
Sync SDL3 wiki -> header
2024-06-13 21:49:55 +00:00
Sam Lantinga
0635112119
Added SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE (thanks @lostgoat!)
2024-06-13 14:54:36 -07:00
SDL Wiki Bot
d46b8bc54e
Sync SDL3 wiki -> header
2024-06-13 21:31:58 +00:00
Ryan C. Gordon
9d3d893322
testcamera: Report device name and SDL camera driver in the window title.
2024-06-13 17:05:47 -04:00
SDL Wiki Bot
fa3e22c5da
Sync SDL3 wiki -> header
2024-06-13 21:04:27 +00:00
Ryan C. Gordon
12119cbaad
include: Several documentation tweaks; cleaned up new wikiheaders warnings.
2024-06-13 17:03:31 -04:00
Ryan C. Gordon
a9d0eaf34a
wikiheaders: Warn if a function returns non-void but has no \returns
line.
2024-06-13 16:45:59 -04:00
SDL Wiki Bot
49f2a3463f
Sync SDL3 wiki -> header
2024-06-13 19:34:29 +00:00
Sam Lantinga
6821fb2fe4
Fixed the right trigger on the Nintendo SNES Controller in simple report mode
2024-06-13 11:35:29 -07:00
Sam Lantinga
a3cc900157
Fixed Nintendo Switch triggers when in simple report mode
2024-06-13 11:25:27 -07:00
Frank Praznik
4eb08a6154
x11: Ungrab before attempting a confinement grab with XInput2 enabled
...
If XInput2 is enabled, it will grab the pointer on button presses, which results in XGrabPointer returning AlreadyGrabbed. Clear any existing grabs before attempting the confinement grab to avoid a timeout scenario.
2024-06-13 13:04:44 -04:00
Mykola Rubets
4919359a6f
Fix compilation with enabled render commands logging
2024-06-13 09:51:00 -07:00
Sam Lantinga
bf27269952
Re-enable full controller reports for Joy-Con controllers
...
When they are in simple report mode, the thumbstick gets turned into a digital hat, so let's use them in full report mode.
2024-06-12 23:36:16 -07:00
Sam Lantinga
6619de8f24
Try to guess the type of a Nintendo Switch controller if we can't read the device info
2024-06-12 23:22:44 -07:00
Sam Lantinga
5ee9a840b1
Ignore spurious reply packets when reading Nintendo Switch controller reports
2024-06-12 23:03:50 -07:00
Sam Lantinga
fcd2a3a6ad
Fixed mapping for Joy-Con controllers in simple report mode
2024-06-12 22:28:47 -07:00
Sam Lantinga
9f984e6fb4
testcontroller: fixed showing analog axis values
2024-06-12 22:27:54 -07:00
SDL Wiki Bot
674cc04ef4
Sync SDL3 wiki -> header
2024-06-13 02:25:45 +00:00
Sam Lantinga
80a907e0e6
Backed out the viewport and cliprect changes in 9fb5a9ccac0a6bb6af02e72644c1c56dc6ab6f3e
...
This ended up being lots of application code churn without any real benefit in practice.
2024-06-12 19:25:15 -07:00
Sam Lantinga
b2ccfc0b6f
Log whether a controller is Bluetooth or not
2024-06-12 17:22:52 -07:00
SDL Wiki Bot
99f0309ac1
Sync SDL3 wiki -> header
2024-06-12 23:34:42 +00:00
Ryan C. Gordon
97ec4b0937
wikiheaders: fixed to work with not-SDL3 projects.
...
(SDL2 still uses DECLSPEC, not SDL_DECLSPEC.)
2024-06-12 19:30:10 -04:00
Ryan C. Gordon
fe620f0345
wikiheaders: List parameter and return value datatypes.
...
This lets them be clickable on the wikipages when they are SDL symbols.
Reference Issue #9236 (the "Missing links" checklist).
Reference Issue #9995 .
2024-06-12 19:30:10 -04:00
Sam Lantinga
3e70376bce
Enabled HIDAPI debug logging for diagnostic purposes
2024-06-12 15:03:41 -07:00
SDL Wiki Bot
9e3e489012
Sync SDL3 wiki -> header
2024-06-12 19:10:53 +00:00
Ryan C. Gordon
5416bd5fdc
ios: Move animation callback to its own typedef.
2024-06-12 15:10:16 -04:00
SDL Wiki Bot
5b0f14a936
Sync SDL3 wiki -> header
2024-06-12 17:19:08 +00:00
Sam Lantinga
9fb5a9ccac
Use floating point values for viewport, clip rectangle, and texture sizes
...
These are integer values internally, but the API has been changed to make it easier to mix other render code with querying those values.
Fixes https://github.com/libsdl-org/SDL/issues/7519
2024-06-12 10:18:39 -07:00
Sam Lantinga
463984ec20
Make sure the output settings match the camera device format
2024-06-11 20:43:28 -07:00
Sam Lantinga
876f10795f
Don't set a YCbCr colorspace for an RGB texture
...
Fixes https://github.com/libsdl-org/SDL/issues/10006
2024-06-11 20:43:28 -07:00
SDL Wiki Bot
2d13fefc20
Sync SDL3 wiki -> header
2024-06-12 02:20:21 +00:00
SDL Wiki Bot
a4bb93e8e4
Sync SDL3 wiki -> header
2024-06-12 01:34:03 +00:00
Anonymous Maarten
32907a9606
Rename SDL_Swap(16|32|64)(LE|BE) to SDL_Swap(LE|BE)(16|32|64)
2024-06-12 02:29:39 +02:00
Anonymous Maarten
ef6123886e
Add SDL_ReadS8 and SDL_WriteS8
2024-06-12 01:39:08 +02:00
Ryan C. Gordon
96bb06d9c7
wikiheaders: Clean out extra blank lines in function declarations on wiki.
...
This has been driving me nuts for awhile now. :)
2024-06-11 12:37:41 -04:00
Ryan C. Gordon
386aa56711
wikiheaders: Make cleaning out function attributes more generic.
...
Changes the wiki page's "Syntax" section from things like...
```c
void SDL_LockMutex(SDL_Mutex *mutex) SDL_ACQUIRE(mutex);
```
...to...
```c
void SDL_LockMutex(SDL_Mutex *mutex);
```
2024-06-11 12:30:32 -04:00
SDL Wiki Bot
f003461a0b
Sync SDL3 wiki -> header
2024-06-11 16:23:27 +00:00
Ryan C. Gordon
96f2ef77ab
include: Make function pointer params into typedefs.
...
This is easier to read and document in general, but will also make some
new parsing work in wikiheaders much easier.
2024-06-11 12:22:46 -04:00