Commit Graph

18661 Commits

Author SHA1 Message Date
Sam Lantinga
483e79bf82 Fixed mouse click count for relative mode and multiple mice
We'll track the click count separately for each input source, and the click distance is calculated using a point on an infinite plane that is pushed around by mouse motion deltas, unclamped by the window edge.
2024-12-23 19:00:14 -08:00
Sam Lantinga
ed75d9d22a Document that the mouse ID is only valid in mouse relative mode
Fixes https://github.com/libsdl-org/SDL/issues/11259
2024-12-23 17:12:50 -08:00
Sam Lantinga
024e5da6fb Mouse events only get a mouse ID in relative mode 2024-12-23 17:12:50 -08:00
evertonse
8a0f649363 windows: fix BITMAPINFOHEADER values when getting bitmap from Clipboard 2024-12-23 17:00:47 -08:00
L zard
af2dbbcb53 Merge SDL_wasapi_win32 into SDL_wasapi 2024-12-23 16:54:52 -08:00
SDL Wiki Bot
4d301b88d6 Sync SDL3 wiki -> header
[ci skip]
2024-12-24 00:54:10 +00:00
Sam Lantinga
5a2eb60389 Only save the pending flags we will restore when hiding a window
Fixes https://github.com/libsdl-org/SDL/issues/11564
2024-12-23 16:53:54 -08:00
Sam Lantinga
969f03d9f0 Added SDL_PROP_RENDERER_GPU_DEVICE_POINTER
Fixes https://github.com/libsdl-org/SDL/issues/11600
2024-12-23 16:51:43 -08:00
SDL Wiki Bot
7a22076a7c Sync SDL3 wiki -> header
[ci skip]
2024-12-23 23:58:24 +00:00
Sam Lantinga
3a1810f9a9 Fixed the Linux mapping for the NVIDIA Controller v1.03 2024-12-23 15:43:17 -08:00
Sam Lantinga
49610fd1e8 Leave mouse relative mode when losing focus
Fixes https://github.com/libsdl-org/SDL/issues/7892
2024-12-23 15:23:11 -08:00
Caleb Cornett
62124e2c28 GPU: Enable Metal validation in debug mode (#11691) 2024-12-23 18:08:14 -05:00
SDL Wiki Bot
18115ef6bd Sync SDL3 wiki -> header
[ci skip]
2024-12-23 23:01:15 +00:00
Sam Lantinga
8691408baf Clarify that you shouldn't make any assumptions about the an SDL_FingerID value.
Fixes https://github.com/libsdl-org/SDL/issues/11667
2024-12-23 14:28:54 -08:00
Sam Lantinga
37b87f79fb Fixed Bluetooth Steam Controller detection on iOS and Android 2024-12-23 12:55:25 -08:00
Sam Lantinga
9a43c08146 Allow rendering during the modal resize loop on macOS
Fixes https://github.com/libsdl-org/SDL/issues/11508
2024-12-23 11:46:35 -08:00
Sam Lantinga
225c0e2ad9 Removed unused function declaration 2024-12-23 11:21:00 -08:00
Sam Lantinga
4add7e2005 Round the window size values when using fixed aspect ratio
This won't get you pixel perfect values, since the exact ratio won't necessarily be whole pixel values, but it will be closer, and matches the logic in the other branch.
2024-12-23 09:03:38 -08:00
Eduard Gushchin
3ac28bae6a Removed references to non-existent method SDL_GetAsyncIOTaskResult 2024-12-23 08:02:03 -08:00
SDL Wiki Bot
da37e1541b Sync SDL3 wiki -> header
[ci skip]
2024-12-23 05:32:13 +00:00
SDL Wiki Bot
ecea3471f6 Sync SDL3 wiki -> header
[ci skip]
2024-12-22 20:20:41 +00:00
Anonymous Maarten
f8d8bf8066 SDL_GetNumAllocations returns -1 when allocation counting is disabled 2024-12-22 12:20:04 -08:00
Anonymous Maarten
a33144fbc9 SDL_test: disable memory tracking if SDL does not count allocations 2024-12-22 12:20:04 -08:00
Sam Lantinga
2e4dc9c109 Disable tracking memory allocation counts by default
Fixes https://github.com/libsdl-org/SDL/issues/11099
2024-12-22 12:20:04 -08:00
capehill
80c1b1e1a0 Fix testautomation pixels_saveLoadBMP big endian issue
It seems created surfaces are ARGB8888 format on both BE and LE,
therefore BGRA32 failed.
2024-12-22 12:08:54 -08:00
SDL Wiki Bot
478ac0b9bf Sync SDL3 wiki -> header
[ci skip]
2024-12-22 19:01:42 +00:00
SDL Wiki Bot
03d6e4b69e Sync SDL3 wiki -> header
[ci skip]
2024-12-22 18:53:26 +00:00
Maia
ca4ffc8a00 Fix missing parens in preprocessor defined op 2024-12-22 10:36:03 -05:00
Maia
8475c496b4 Fix typo 2024-12-22 10:35:35 -05:00
SDL Wiki Bot
56cf8d8dc9 Sync SDL3 wiki -> header
[ci skip]
2024-12-22 07:09:56 +00:00
Ryan C. Gordon
f0fad41f2c include: Filled in all remaining missing documentation! 2024-12-22 01:58:13 -05:00
SDL Wiki Bot
4d8f5758cf Sync SDL3 wiki -> header
[ci skip]
2024-12-22 06:18:11 +00:00
Caleb Cornett
c080bb8417 GPU: Fix non-triangle D3D12 primitive topology types 2024-12-21 22:38:40 -05:00
Sam Lantinga
33442701ca Use the monitor as the client rect for maximized borderless windows
Fixes https://github.com/libsdl-org/SDL/issues/9588
2024-12-21 09:19:03 -08:00
Sam Lantinga
7e298f50fe Make windows resizable if we're about to maximize them programmatically 2024-12-21 09:19:03 -08:00
Sam Lantinga
34974d4d2b Don't remove the resizable style for borderless windows
The application may have intended the window to be borderless and resizable
2024-12-21 09:19:03 -08:00
Sam Lantinga
cadeec9cc9 SDL_SoftStretch() doesn't handle large pixel formats
Fixes https://github.com/libsdl-org/SDL/issues/11534
2024-12-21 09:19:03 -08:00
Sam Lantinga
f37eef948c Removed raw mouse events
It's too close the 3.2.0 release for an API change like this.

If/when we re-add these, some things for consideration:
* What use cases does this enable that aren't currently possible?
* What cross-platform API guarantees do we make about the availability of these events? e.g. do we try to simulate them where raw input isn't actually available?
* How is this different from the existing relative mode, and how do we clearly explain when you want these events vs wanting relative mode?

Notes from @expikr:
First observation: the reason I originally passed denominators instead of multipliers was because some rational values cannot be exactly represented by floats (e.g 1/120) so instead let the end-developer decide how to do the dividing themselves. It was the reason why it was using split values with an integer numerator to begin with, instead of having both as floats or even just normalize it in advance.

On the other hand, passing them as multipliers might have hypothetical uses for dynamically passing end-user controlled scaling in a transparent manner without coupling? (Though in that case why not just do that as additional fields appended to `motion` structs in an API-compatible layout?)

So it’s somewhat of a philosophical judgement of what this API of optional availability do we intend for it to present itself as:
- should it be a bit-perfect escape hatch with the absolute minimally-denominal abstraction over platform details just enough to be able to serve the full information (á la HIDPIAPI),
- or a renewed ergonomic API for splitting relative motion from cursor motion (in light of The Great Warping Purge) so that it is unburdened by legacy RelativeMode state machines, in which case it would be more appropriate to just call it `RELATIVE` instead of `RAW` and should be added alongside another new event purely for cursor events?

This alternate API stream was conceived in the context of preserving compatibility of the existing RelativeMode state machine by adding an escape hatch. So given the same context, my taste leans towards the former designation.

However, as The Great Warping Purge has made it potentially viable to do so, if I were allowed to break ABI by nuking the RelativeMode state machine entirely, I would prefer the latter designation unified as one of three separate components split from the old state machine, each independently controlled by platform-dependent availability without any state switching of a leaky melting pot:
- cursor visibility controls (if platform has cursor)
- cursor motion events (if platform has cursor)
- relative motion events (if the platform reports hardware motion)
2024-12-21 05:18:42 -08:00
Sam Lantinga
d07bb0e679 Removed raw key events
They weren't adding any value over the existing keyboard events
2024-12-21 05:18:42 -08:00
Sam Lantinga
c44fa5bb07 Updated raw input events to match SDL style
Also added raw keyboard events, and implemented raw input events on iOS, OpenBSD console, Linux console, and X11
2024-12-21 05:18:42 -08:00
SDL Wiki Bot
1025087c2e Sync SDL3 wiki -> header
[ci skip]
2024-12-21 13:15:56 +00:00
Sam Lantinga
a47b62d1fe Removed PS2 compiler definition
This is already defined as part of the PS2 SDK
2024-12-20 15:51:39 -08:00
Wolfywolfy
f3c194f39a Remove EXTRA_CFLAGS.
(cherry picked from commit 9491389baf)
2024-12-20 15:21:07 -08:00
Ethan Lee
7e8576fd19 gpu: Xbox fixes for swapchain presentation 2024-12-20 14:56:33 -05:00
Ethan Lee
f7580374a1 include: Always declare SDL_GDKSuspendComplete.
This is always defined in the symbol table and the function safely does nothing
on non-GDK targets, so treat it like any other SDL_system function.
2024-12-20 13:14:55 -05:00
SDL Wiki Bot
232c2970d3 Sync SDL3 wiki -> header
[ci skip]
2024-12-20 15:57:39 +00:00
Frank Praznik
5ec5f23fff tests: Print accurate enabled/disabled relative mode status in testrelative 2024-12-20 10:57:12 -05:00
SDL Wiki Bot
b815123cf2 Sync SDL3 wiki -> header
[ci skip]
2024-12-20 07:48:16 +00:00
Ryan C. Gordon
819e1cc95b SDL_stdinc.h: A couple wikiheaders fixes. 2024-12-20 02:45:04 -05:00
Ryan C. Gordon
b2eb23a617 SDL_filesystem.h: Fill in missing documentation. 2024-12-20 02:39:28 -05:00