Commit Graph

14891 Commits (e35c304022c43dc3099f4e3b04e1385984f52d9c)

Author SHA1 Message Date
Simon McVittie 7dbd6669c3 wayland: Move calls to WAYLAND_wl_cursor_theme_get_cursor out of the switch
This will make it easier to potentially share the switch statement
between X11 and Wayland.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-16 07:52:43 -05:00
Simon McVittie 40a6c1c0a7 wayland: Use CSS/freedesktop cursor name "default" as a fallback
The "left_ptr" name is an X11 thing, and there's no guarantee that
Wayland cursor themes contain it. In particular, GNOME's Adwaita theme
as of version 46.beta only contains the CSS/freedesktop names.

To test, either move one of the known cursors out of the way, or edit
the switch statement above to use a wrong name for one of them.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-16 07:52:43 -05:00
Simon McVittie 791646535a wayland: Reference CSS cursor name vocabulary
The freedesktop.org cursor spec recommends the same names as CSS, and
GNOME is treating the CSS vocabulary as canonical.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-16 07:52:43 -05:00
Ryan C. Gordon cb9565354c
x11: Use XcursorLibraryLoadCursor to load system cursors when available.
Apparently this is necessary on the latest Gnome to get properly themed
cursors, vs ancient X11 standard cursors, as Gnome has dropped the old
theme names that XCreateFontCursor eventually expected to find.

Fixes #8939.
2024-02-16 02:08:37 -05:00
Sam Lantinga d451fcd7a7 Fixed HDR video content being too bright on Apple platforms
This probably isn't the exact formula that we need, but it's much closer to correct.
2024-02-15 16:39:13 -08:00
Sam Lantinga c09daf8388 Removed unused variables 2024-02-15 14:11:04 -08:00
Ozkan Sezer 6efe5f30ed don't let SDL_render.c:render_drivers[] have an empty initializer list. 2024-02-15 20:55:04 +03:00
Ozkan Sezer aae2d22852 Check the SDL_VIDEO_RENDER_??? macros with #if instead of #ifdef
Allows users to disable them by defining them as 0.

Closes https://github.com/libsdl-org/SDL/issues/8996

(manual port of https://github.com/libsdl-org/SDL/pull/9063 to SDL3.0)
2024-02-15 20:55:02 +03:00
Ryan C. Gordon 8ddddd36cd
audio: Deal with race conditions against default device changes.
This catches the case where we obtain a logical device while the default is
changing in another thread, so you accidentally end up with the previous
default physical device locked and returned from ObtainLogicalAudioDevice.
2024-02-15 14:13:26 -05:00
Frank Praznik 4eae38580f cocoa: Remove resize hack when changing the window backing scale
Zeroing the window width and height was necessary in SDL2 to short-circuit the resize event deduplication code when the window backing scale changed, but not the logical size. This is no longer necessary in SDL3, as it will explicitly check for scale changes on resize events and dispatch pixel size/scale changed events as appropriate, even if the window's logical size hasn't changed.
2024-02-14 17:33:06 -05:00
Frank Praznik f9ba0e1dbd wayland: Don't store wl_output pointers in mode driver data
They aren't used for anything, and cause problems if the video core tries to free them.
2024-02-14 10:42:15 -05:00
Ryan C. Gordon 5e1d9d19a4
audio: Don't use SDL_BindAudioStream inside SDL_OpenAudioDeviceStream().
It has a lot of complex validation and locking we want to avoid here.
2024-02-13 15:23:27 -05:00
Sam Lantinga 5e6ae85b63 Update the draggable state when the hit test callback changes
Fixes https://github.com/libsdl-org/SDL/issues/7617
2024-02-13 09:26:39 -08:00
SDL Wiki Bot 4d4c24acdd Sync SDL3 wiki -> header 2024-02-13 17:07:23 +00:00
Ryan C. Gordon bc984f78bf android: Remove blocking permission request code. Async only in SDL3!
(this actually still blocks at our internal points of usage, though, for
replacement at a later time.)
2024-02-13 12:06:51 -05:00
Ryan C. Gordon af61cfd5e0 android: Added SDL_AndroidRequestPermissionAsync. 2024-02-13 12:06:51 -05:00
Frank Praznik 310f21bf84 video: Ensure that all references to a destroyed fullscreen window are removed
Windowing systems that receive fullscreen state changes asynchronously may not receive a configure event notifying SDL that the window has left fullscreen when the window is being destroyed. Ensure that no display holds a reference to a destroyed fullscreen window.
2024-02-13 09:56:07 -05:00
Sam Lantinga f2695856d6 Use SDL string functions 2024-02-12 19:51:48 -08:00
Sam Lantinga 725c79f3ac Fixed building with SDL_LEAN_AND_MEAN
Fixes https://github.com/libsdl-org/SDL/issues/9054
2024-02-12 19:34:10 -08:00
Sam Lantinga 734d6fa1f3 Fixed documentation of SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN 2024-02-12 18:53:26 -08:00
Sam Lantinga ead3cbafd7 Fixed documentation for SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4 (thanks @AntTheAlchemist!) 2024-02-12 18:32:29 -08:00
Sam Lantinga 814a94c349 Fixed error: unused variable 'axes' [-Werror,-Wunused-variable] 2024-02-12 11:18:11 -08:00
Sam Lantinga b39246936b Added SDL_cocoashape* to Xcode project 2024-02-12 11:17:54 -08:00
Sam Lantinga f4d97bdb14 Update mouse transparency when the window shape changes
Fixes github.com/libsdl-org/SDL/issues/7617
2024-02-12 10:49:45 -08:00
Sam Lantinga 42cdbf6b21 Explicitly retain and release NSObjects in C structures
Fixes https://github.com/libsdl-org/SDL/issues/9021
Fixes https://github.com/libsdl-org/SDL/issues/9042
2024-02-12 10:20:06 -08:00
Sam Lantinga 87c07a79c0 Changed property name from '-' to '_' 2024-02-12 09:55:40 -08:00
SDL Wiki Bot 59f1e66adc Sync SDL3 wiki -> header 2024-02-12 17:55:23 +00:00
Sam Lantinga dca2721b91 Removed SDL_HINT_VIDEO_EXTERNAL_CONTEXT
This is replaced with SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT in SDL_CreateWindowWithProperties()
2024-02-12 09:54:33 -08:00
Sam Lantinga 2f7c24e4be Removed SDL_HINT_RENDER_SCALE_QUALITY
Textures now default to linear filtering, use SDL_SetTextureScaleMode(texture, SDL_SCALEMODE_NEAREST) if you want nearest pixel mode instead.
2024-02-12 09:54:33 -08:00
Sam Lantinga 20051f805f Removed SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4
Replaced with SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4, defaulting to SDL_TRUE
2024-02-12 09:54:33 -08:00
Sam Lantinga 7cb1ca60ec Removed SDL_HINT_RENDER_OPENGL_SHADERS
Shaders are always used if they are available.
2024-02-12 09:54:33 -08:00
Sam Lantinga 9920e062d5 Removed SDL_HINT_THREAD_STACK_SIZE
The stack size can be specified using SDL_CreateThreadWithStackSize()
2024-02-12 09:54:33 -08:00
Sam Lantinga 9e505252c0 Renamed SDL_HINT_PS2_DYNAMIC_VSYNC SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC 2024-02-12 09:54:33 -08:00
Sam Lantinga a538936821 Renamed SDL_HINT_LINUX_JOYSTICK_DEADZONES to SDL_HINT_JOYSTICK_LINUX_DEADZONES 2024-02-12 09:54:33 -08:00
Sam Lantinga 980c379a0b Renamed SDL_HINT_LINUX_JOYSTICK_CLASSIC to SDL_HINT_JOYSTICK_LINUX_CLASSIC 2024-02-12 09:54:33 -08:00
Sam Lantinga 1f7936d545 Renamed SDL_HINT_LINUX_HAT_DEADZONES to SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES 2024-02-12 09:54:33 -08:00
Sam Lantinga 39cfb437ed Renamed SDL_HINT_LINUX_DIGITAL_HATS to SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS 2024-02-12 09:54:33 -08:00
Sam Lantinga b557c15bcf Renamed SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE to SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE 2024-02-12 09:54:33 -08:00
Sam Lantinga 4f628b5b62 Renamed SDL_HINT_GDK_TEXTINPUT_DEFAULT to SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT 2024-02-12 09:54:33 -08:00
Sam Lantinga fd5d761128 Renamed SDL_HINT_DIRECTINPUT_ENABLED to SDL_HINT_JOYSTICK_DIRECTINPUT 2024-02-12 09:54:33 -08:00
Sam Lantinga a5da7d0dd5 Renamed SDL_HINT_ALLOW_TOPMOST to SDL_HINT_WINDOW_ALLOW_TOPMOST 2024-02-12 09:54:33 -08:00
Sam Lantinga ef8791cba8 Cleaned up and organized hint documentation 2024-02-12 09:54:33 -08:00
Sam Lantinga 9ce7fe2848 Removed SDL_HINT_ACCELEROMETER_AS_JOYSTICK
Sensors are a first-class object in SDL and we haven't gotten any feedback that this feature is useful these days.

Closes https://github.com/libsdl-org/SDL/pull/7879
2024-02-12 09:54:33 -08:00
Zack Middleton 5af7113842 Rename property define names to have a type suffix
Renamed the following property define names to have a type suffix to
match other property names.

SDL_PROP_TEXTURE_OPENGL_TEXTURE_TARGET (number)
SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET (number)
SDL_PROP_WINDOW_CREATE_WAYLAND_SCALE_TO_DISPLAY (boolean)
SDL_PROP_WINDOW_RENDERER (pointer)
SDL_PROP_WINDOW_TEXTUREDATA (pointer)
2024-02-12 09:54:11 -08:00
Sam Lantinga cacac6cc34 Updated structure and field names for consistency
Type names are camel case and field names are snake case except for fields ending in id, which are capitalized.

Fixes https://github.com/libsdl-org/SDL/issues/6955
2024-02-11 08:27:56 -08:00
Sam Lantinga 6f87973b9c Added a reserved field to the SDL_Event structure
This guarantees 64-bit alignment for the timestamp
2024-02-11 08:27:56 -08:00
Ozkan Sezer 97d6e58a19 mark SDL_CleanupWindowTextureData as SDLCALL. 2024-02-11 18:55:40 +03:00
Ozkan Sezer ee5289ef09 mark SDL_ClipboardTextCallback as SDLCALL 2024-02-11 18:55:40 +03:00
Ozkan Sezer 168322f358 SDL_properties.c: mark CleanupFreeableProperty and CleanupSurface as SDLCALL 2024-02-11 17:29:20 +03:00
Sam Lantinga bba2a5d360 Added SDL_SetFreeableProperty() for internal use 2024-02-10 08:04:27 -08:00