Cameron Cawley
05e7dcf8f8
Support returning <8bpp surfaces in SDL_LoadBMP_RW
2023-11-17 08:45:32 -08:00
Cameron Cawley
773ec1cfcb
Extend blitting support for all <8bpp formats
2023-11-17 08:45:32 -08:00
Cameron Cawley
753bbd199e
Add SDL_PIXELFORMAT_INDEX2LSB and SDL_PIXELFORMAT_INDEX2MSB
2023-11-17 08:45:32 -08:00
Sam Lantinga
aaf54b09a1
Revert "Cleanup WIN_CreateCursor() code a bit"
...
This reverts commit 876c97454a .
This caused the blank cursor to be entirely black
2023-11-15 11:32:06 -08:00
Frank Praznik
078995bbe0
x11: Set the skip taskbar and skip pager atoms on utility windows
...
Some compositors apparently still need these set to keep the window out of the taskbar and pager, even with the utility window atom being set.
2023-11-15 04:43:37 -05:00
Louis M
bd4966999b
Replacing SDL_SCANCODE_AUDIOMUTE by SDL_SCANCODE_MUTE on Windows
...
(cherry picked from commit 925362a2fc )
2023-11-14 09:27:43 -08:00
Sam Lantinga
15504da0b8
Fixed mouse wheel scrolling direction on iOS
2023-11-14 09:10:56 -08:00
Sam Lantinga
e0c45c6c98
Renamed SDL_WINDOW_FOREIGN to SDL_WINDOW_EXTERNAL
2023-11-14 06:06:51 -08:00
Sam Lantinga
229b7b9d50
SDL_CreateWindowWithPosition() and SDL_CreateWindowFrom() have been replaced with SDL_CreateWindowWithProperties()
...
This is a more general interface that can be extended in the future as needed.
2023-11-14 06:06:51 -08:00
Dimitriy Ryazantcev
876c97454a
Cleanup WIN_CreateCursor() code a bit
...
Closes #6476
2023-11-13 11:46:50 -08:00
Sam Lantinga
1c4723ac66
SDL_CreateWindowFrom() now takes a set of properties that describe the native window and options.
2023-11-12 21:58:58 -08:00
Sam Lantinga
0907f345cb
Added property types: pointer, string, number, float
2023-11-12 10:48:38 -08:00
Christoph Reichenbach
7c80ac6df7
API for pressure-sensitive pens + XInput2/Wayland
...
This patch adds an API for querying pressure-
sensitive pens, cf. SDL_pen.h:
- Enumerate all pens
- Get pen capabilities, names, GUIDs
- Distinguishes pens and erasers
- Distinguish attached and detached pens
- Pressure and tilt support
- Rotation, distance, throttle wheel support
(throttle wheel untested)
- Pen type and meta-information reporting
(partially tested)
Pen event reporting:
- Three new event structures: PenTip, PenMotion, and
PenButton
- Report location with sub-pixel precision
- Include axis and button status, is-eraser flag
Internal pen tracker, intended to be independent
of platform APIs, cf. SDL_pen_c.h:
- Track known pens
- Handle pen hotplugging
Automatic test:
- testautomation_pen.c
Other features:
- XInput2 implementation, incl. hotplugging
- Wayland implementation, incl. hotplugging
- Backward compatibility: pen events default to
emulating pens with mouse ID SDL_PEN_MOUSEID
- Can be toggled via SDL_HINT_PEN_NOT_MOUSE
- Test/demo program (testpen)
- Wacom pen feature identification by pen ID
Acknowledgements:
- Ping Cheng (Wacom) provided extensive feedback
on Wacom pen features and detection so that
hopefully untested Wacom devices have a
realistic chance of working out of the box.
2023-11-12 09:52:02 -08:00
Sylvain Becker
04b6b2979f
Re-add SDL_assert() with non boolean ptr syntax ( #8530 )
2023-11-11 12:28:24 +03:00
meyraud705
8708ba7393
Don't leak if realloc fails
2023-11-10 06:33:39 -08:00
Frank Praznik
74f3643bfa
wayland: Add missing break to switch statement
2023-11-09 19:48:56 -05:00
Anonymous Maarten
2d6bae70b4
Older gcc does not support #pragma GCC diagnostic inside functions
2023-11-09 23:33:28 +01:00
Sylvain
d8600f717e
Pointer as bool (libsdl-org#7214)
2023-11-09 14:18:36 -08:00
Anonymous Maarten
23db971681
x11: Ignore deprecated declaration of XKeycodeToKeysym
2023-11-09 18:45:54 +01:00
Sylvain
59f93e20a7
Add SDL Video Capture, with back-end for linux/macos/ios/android
2023-11-09 08:36:23 -08:00
Sam Lantinga
f4b61fff30
Implemented VT switching for KMSDRM on Linux
...
Fixes https://github.com/libsdl-org/SDL/issues/3844
2023-11-08 20:35:16 -08:00
Sam Lantinga
bea34c5380
Fixed a memory leak at window creation.
...
Windows updates the desktop display mode once at video init (in WIN_InitModes()) and once when creating a window (in WIN_RefreshDisplays())
Fixes https://github.com/libsdl-org/SDL/issues/7982
Fixes https://github.com/libsdl-org/SDL/issues/8189
2023-11-08 14:26:07 -08:00
Sam Lantinga
02f356439d
Allow the application to draw while Windows is in a modal move/resize loop
...
If you're using the application main callbacks, your SDL_AppIterate() function will be called while Windows is moving and resizing your window. If not, then SDL will send an SDL_EVENT_WINDOW_EXPOSED event for your window and you can use an event watcher to redraw your window directly from the callback.
Fixes https://github.com/libsdl-org/SDL/issues/1059
Closes https://github.com/libsdl-org/SDL/pull/4836
2023-11-08 13:32:56 -08:00
Sam Lantinga
151cdfa99f
Added the "SDL.window.wayland.registry" property
...
Fixes https://github.com/libsdl-org/SDL/issues/8393
2023-11-08 12:01:48 -08:00
Sam Lantinga
4e8d1ec983
Fixed crash trying to create a metal view with the dummy driver
2023-11-08 12:01:48 -08:00
Sam Lantinga
fd4a2cce9e
SDL_syswm.h has been removed and replaced with window properties
2023-11-08 12:01:48 -08:00
Sam Lantinga
aea6e6de6f
Simplified SDL_SetProperty() and added SDL_SetPropertyWithCleanup()
...
Most of the time people won't need to set a cleanup callback, so we can simplify the more commonly used API.
2023-11-08 12:01:48 -08:00
Sam Lantinga
0cd4b7d3e3
Added display properties
2023-11-08 12:01:48 -08:00
Sam Lantinga
a02afbaea5
Clean up window properties when the window is destroyed
2023-11-08 12:01:48 -08:00
Sam Lantinga
8668943746
Standardized property names for internal SDL properties
2023-11-08 12:01:48 -08:00
Sam Lantinga
04e98d2236
Added missing calls to SDL_InvalidParamError("surface")
2023-11-07 21:57:15 -08:00
Sam Lantinga
4106697774
Make sure we include the null terminator in XLookupStringAsUTF8()
...
Fixes https://github.com/libsdl-org/SDL/issues/6728
2023-11-07 16:24:08 -08:00
Frank Praznik
1a57f6bb29
wayland: Remove QtWayland extensions
...
These were added a very long time ago and seem to serve no purpose now, as the functionality they provided is now in core Wayland protocols, current information on their usage and status is nonexistent, no modern compositor seems to support them, and the code paths are untested and subject to bit-rot at this point. It also causes duplicate symbol issues when statically linking an application to both Qt and SDL.
2023-11-07 11:00:32 -05:00
Ryan C. Gordon
4d1aecc225
vulkan: Patched to compile on iOS.
2023-11-06 13:35:19 -05:00
Ryan C. Gordon
2f92807087
vulkan: SDL_Vulkan_CreateSurface now accepts an app-provided allocator.
...
Fixes #3638 .
2023-11-06 13:31:20 -05:00
Sam Lantinga
f7d40b7594
Added 10-bit pixel formats in addition to SDL_PIXELFORMAT_ARGB2101010
...
Added SDL_PIXELFORMAT_XRGB2101010, SDL_PIXELFORMAT_XBGR2101010, SDL_PIXELFORMAT_ABGR2101010
Fixes https://github.com/libsdl-org/SDL/issues/3553
2023-11-06 00:41:09 -08:00
Sam Lantinga
9302d7732d
Fixed touch normalized coordinates
...
When converting normalized coordinates to pixel coordinates, the valid range is 0 to (width or height) - 1, and the pixel coordinate of width or height is past the edge of the window.
Fixes https://github.com/libsdl-org/SDL/issues/2913
2023-11-05 06:55:39 -08:00
Sam Lantinga
91f0456391
Add the source application for drag and drop events (thanks Nathan!)
...
This is only implemented on iOS, but is useful for third party application integrations.
Fixes https://github.com/libsdl-org/SDL/issues/2024
2023-11-04 13:00:41 -07:00
Ryan C. Gordon
780b6612a9
wayland: Wayland_Vulkan_GetInstanceExtensions didn't set the count variable.
...
Fixes #8468 .
2023-11-04 14:53:24 -04:00
Sam Lantinga
7e445da569
Added SDL_CleanupEvent()
...
This is used to free any dynamically allocated memory in events.
2023-11-04 06:47:24 -07:00
Sam Lantinga
dad1a84be4
Fixed building Vivante video driver
2023-11-03 14:56:15 -07:00
Sam Lantinga
fe175d025f
Fixed building Vivante video driver
2023-11-03 14:54:11 -07:00
Sam Lantinga
f3261fedcc
Code cleanup now that SDL_bool is equivalent to a C boolean expression
2023-11-03 09:54:04 -07:00
Ozkan Sezer
5e869d1b35
fix Cocoa_Vulkan_GetInstanceExtensions prototype for Mac
2023-11-02 22:12:56 +03:00
ilyas-taouaou
9224a0a2d8
Fix emscripten, android, uikit and windows
2023-11-02 14:27:36 -04:00
ilyas-taouaou
d0d8b28df1
Change SDL_Vulkan_GetInstanceExtensions
2023-11-02 14:27:36 -04:00
Frank Praznik
875e45e70b
wayland: Sanity check pointers and protocols before confining
2023-10-29 14:24:47 -04:00
Frank Praznik
0e87b71d08
wayland: Check the relative pointer handle before destroying
...
If the relative protocol is unsupported, this will always be null and the destroy function won't be called.
2023-10-29 14:15:23 -04:00
Sam Lantinga
552bee47cb
Clear any previous errors if we successfully show a message box
2023-10-27 10:11:23 -07:00
Sam Lantinga
343da852a6
Don't try to use the Wayland messagebox if we're not in Wayland
...
Also cleaned up some potential file handle leaks when querying the zenity version
2023-10-27 10:11:23 -07:00