Commit Graph

2006 Commits

Author SHA1 Message Date
Ozkan Sezer
39870031d1 use format string attributes for functions accepting va_list params, too 2023-11-17 15:56:10 +03:00
Sam Lantinga
708f18d49e Added SDL_HINT_JOYSTICK_IOKIT and SDL_HINT_JOYSTICK_MFI to control whether the IOKit and GCController drivers should be used for joystick support.
This can be used to work around issues where the Apple GCController driver doesn't work for some controllers but there's no way to know which GCController maps to which IOKit device.
2023-11-14 10:28:19 -08:00
Sam Lantinga
1c64366b80 Added SDL_CreateRendererWithProperties() and SDL_CreateTextureWithProperties() 2023-11-14 06:06:51 -08:00
Sam Lantinga
7203641597 Note that the SDL window properties are read-only 2023-11-14 06:06:51 -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
Ryan C. Gordon
dd8ab67bd9
Sync wiki -> headers. 2023-11-13 15:46:29 -05:00
Ryan C. Gordon
91460fc13d
include: Fixed up documentation in SDL_pen.h 2023-11-13 15:40:55 -05:00
Ryan C. Gordon
8766aa39d6
Sync wiki -> headers. 2023-11-13 13:03:42 -05:00
Ryan C. Gordon
e5ffd6d8eb
include: Removed \link and \endlink Doxygen tags. 2023-11-13 13:01:25 -05: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
bd269b0f41 Added SDL_SetBooleanProperty() and SDL_GetBooleanProperty() 2023-11-12 21:58:58 -08:00
Ryan C. Gordon
c47ac5b2df
include: Fixed copy/paste error 2023-11-12 23:41:22 -05:00
Ozkan Sezer
45fc828c95 move SDL_EVENT_WINDOW_PEN_ENTER and SDL_EVENT_WINDOW_PEN_LEAVE down
... to preserve compatibility with sdl2-compat.
2023-11-12 12:22:43 -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
Sam Lantinga
d3e43668d0 Revert "Sync SDL3 wiki -> header"
This reverts commit 43571769f1.
2023-11-12 09:02:22 -08:00
SDL Wiki Bot
43571769f1 Sync SDL3 wiki -> header 2023-11-12 15:55:10 +00:00
Sam Lantinga
b374105975 Replaced SDL_GetTextureDXGIResource() with texture properties
Fixes https://github.com/libsdl-org/SDL/issues/8529
2023-11-10 20:38:13 -08:00
Sam Lantinga
312faf9305 Updated documentation for the controller face buttons 2023-11-10 16:39:32 -08:00
Sam Lantinga
2991b9f6ac SDL now represents gamepad buttons as positional elements with a separate label
This gives applications and binding systems a clearer view of what the hardware is so they can make intelligent decisions about how to present things to the user.

Gamepad mappings continue to use abxy for the face buttons for simplicity and compatibility with earlier versions of SDL, however the "SDL_GAMECONTROLLER_USE_BUTTON_LABELS" hint no longer has any effect.

Fixes https://github.com/libsdl-org/SDL/issues/6117
2023-11-10 12:21:43 -08:00
Ryan C. Gordon
aa7baf63aa
Sync wiki -> headers. 2023-11-09 20:11:23 -05: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
979214363f Added SDL_GetGlobalProperties()
We'll undoubtedly want to have global properties available
2023-11-08 12:01:48 -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
6c91b28e71 Added the "SDL.renderer.d3d12.command_queue" property
Fixes https://github.com/libsdl-org/SDL/issues/8491
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
a1941fad6c Replaced SDL_RenderGetD3D11Device(), SDL_RenderGetD3D12Device(), and SDL_RenderGetD3D9Device() with renderer properties. 2023-11-08 12:01:48 -08:00
Sam Lantinga
0cd4b7d3e3 Added display properties 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
b5057edf29 Remove unused SDL_TextureModulate enum
Fixes https://github.com/libsdl-org/SDL/issues/6387
2023-11-07 09:23:26 -08:00
Sam Lantinga
9458cbf75e Removed unused SDL_OSEvent 2023-11-07 09:14:35 -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
SDL Wiki Bot
fccec65afe Sync SDL3 wiki -> header 2023-11-06 18:32:15 +00: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
Ryan C. Gordon
c53843a961
docs: Remove Doxygen \brief tags.
Doxygen and the wiki bridge don't need them; they'll both just use the first
line/sentence instead.

Fixes #8446.
2023-11-06 10:26:06 -05:00
Ozkan Sezer
c132295ad7 SDL_FlushEventMemory is not a public procedure. 2023-11-06 17:40:56 +03:00
Ryan C. Gordon
7ac281f800
Sync wiki -> headers. 2023-11-06 09:33:05 -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
04dfca958a Added a note to events indicating that memory is owned by SDL 2023-11-05 21:25:43 -08:00
Sam Lantinga
70c149c88f Automatically clean up memory associated with events 2023-11-05 09:14:11 -08:00
Sam Lantinga
d3f2eb2aba Use XINPUT_STATE instead of XINPUT_STATE_EX (thanks Andrew!)
XINPUT_STATE_EX isn't actually a thing, we can just use the normal XINPUT_STATE

Fixes https://github.com/libsdl-org/SDL/issues/2797

(cherry picked from commit e8f4045d0b)
2023-11-04 22:28:09 -07:00
Sam Lantinga
75ea3a8d32 Dynamically allocate long text for SDL_EVENT_TEXT_INPUT events
This prevents input text from being split across Unicode combining or modifier characters, and in practice allocations will rarely happen.
2023-11-04 20:55:10 -07:00
Sam Lantinga
2a1660ab51 Additional cleanup for SDL_RWprintf() (thanks @sezero!) 2023-11-04 20:47:08 -07:00
Ryan C. Gordon
e5f2cea234
Sync wiki -> headers 2023-11-04 22:18:38 -04:00
Sam Lantinga
ad842dd5ad Fixed a typo in SDL_log.h 2023-11-04 16:46:08 -07:00
Sam Lantinga
f9d11807c0 Added SDL_RWprintf() and SDL_RWvprintf() to do formatted printing to an SDL_rwops stream
Fixes https://github.com/libsdl-org/SDL/issues/2390
2023-11-04 16:46:08 -07: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
1a8bf31a69 include: Fixing whitespace on SDL_MixAudioFormat. 2023-11-04 15:06:41 -04:00