Commit Graph

10980 Commits

Author SHA1 Message Date
Ryan C. Gordon
191f3ecbbc render: Restore previous policy for converting window/render coordinates.
Before this commit, it would adjust for the logical presentation settings.
Now, it works as it did before the logical presentation render target was
removed: it takes current viewport and scale into account, as well.

Fixes #10978.
2024-10-03 16:31:56 -04:00
Petar Popovic
3246df8bd3 Remove redundant SDL_Vulkan_GetResultString() declaration 2024-10-03 13:29:53 -07:00
Ethan Lee
a0de6c4abf Add properties to SDL_IOStreams returned by IOFromMem 2024-10-02 22:09:09 -07:00
Petar Popovic
f4cea5e019 Removed const qualifiers from SDL_CreateHashTable() parameter types 2024-10-02 16:29:49 -07:00
Ryan C. Gordon
d287feaddf render: Remove non-pointer args' const qualifiers on SDL_RenderTextureRotated.
Reference Issue #11032.
2024-10-02 15:31:20 -04:00
Ryan C. Gordon
8b4f5f09c1 dynapi: It's a Python script now, not a perl script.
Fixes #11032.
2024-10-02 15:27:47 -04:00
Sam Lantinga
47450425fd Allow iterating just the keys or values in a hashtable 2024-10-02 10:20:00 -07:00
Sam Lantinga
d5fe6dd627 Don't use const for non-pointer API parameters 2024-10-02 09:17:31 -04:00
Sam Lantinga
eced9f58a9 Added a userdata parameter for EGL attribute callbacks
Fixes https://github.com/libsdl-org/SDL/issues/11013
2024-10-01 11:45:19 -07:00
Sam Lantinga
4fa92d233d Include stdbool.h when using Visual Studio 2017+
Also cleaned up some incorrect return values from bool functions.
2024-10-01 09:57:59 -07:00
Sam Lantinga
3b3c4a79b6 Don't close file descriptors already handled by AddFileDescriptorCloseActions()
Fixes https://github.com/libsdl-org/SDL/issues/10997
2024-10-01 09:32:14 -07:00
Anthony
5f5379dc99 Add SDL_IsTV() (#11004)
Moved SDL_IsAndroidTV() out of public API, to match SDL_IsAndroidTablet().

Added SDL_IsTV(), to mirror existing SDL_IsTablet().
2024-10-01 09:20:00 -07:00
Ryan C. Gordon
0b5e01a305 loadso: library handles are now SDL_SharedObject* instead of void*.
Improved the SDL_loadso.h documentation a little, too.

Fixes #11009.
2024-10-01 12:16:10 -04:00
Sam Lantinga
3234a3b902 Simplified internal SDL_Surface structure 2024-10-01 08:10:04 -07:00
Sam Lantinga
1f3a0d12e6 Made texture size and format public in the API
Also added refcount to textures so they can be retained by application code.
2024-10-01 08:10:04 -07:00
Ryan C. Gordon
5136b30652 render: SDL_ConvertEventToRenderCoordinates() now handles pen events.
Reference Issue #10863.
2024-10-01 10:30:36 -04:00
Ozkan Sezer
13c5d1092f hidapi: update hid_write() for windows from mainstream.
Returns bytes_written if WriteFile returns synchronously
Relevant mainstream discussions:
	https://github.com/libusb/hidapi/pull/697
	https://github.com/libusb/hidapi/issues/695
2024-09-30 19:49:44 -07:00
cosmonaut
3eab599977 just force the barrier on UpdateTexture actually 2024-09-30 19:47:27 -07:00
cosmonaut
e17741a6cb Render GPU: Only cycle on update if entire texture is replaced 2024-09-30 19:47:27 -07:00
Sam Lantinga
45ad763de5 Disable backface culling and use a constant rectangle winding order.
This makes it so we don't have to surface the rectangle winding order for applications that want to use the raw geometry API.
2024-09-30 19:12:02 -07:00
cosmonaut
fa14b53273 GPU Vulkan: Clear up some swapchain edge cases 2024-09-30 15:10:27 -07:00
David Fort
818d7d892a x11: store all atoms in a specific struct 2024-09-30 11:13:08 -07:00
David Fort
801870c8cf video: cache some more atoms under X11
This patch adds the caching of some atoms used by the clipboard.
2024-09-30 11:13:08 -07:00
Evan Hemsley
afdf325fb4 GPU: Add swapchain dimension out params (#11003) 2024-09-30 10:23:19 -07:00
Anonymous Maarten
b3388d5753 Haiku does not have fdatasync, but has fsync
https://dev.haiku-os.org/ticket/17378
2024-09-30 15:10:03 +02:00
Sam Lantinga
0b64520997 hashtable: fixed unused-parameter warnings
These show up with -Wextra when dropped into other projects.
2024-09-29 23:56:43 -07:00
Ryan C. Gordon
1787d6ca5c main: SDL_AppQuit() now reports the result value.
Fixes #10994.
2024-09-29 23:24:04 -04:00
Ryan C. Gordon
6a7f8b74f1 filesystem: SDL_GlobDirectory shouldn't strip final '/' if the path is "/".
This is common on Emscripten, where the base directory is "/".
2024-09-29 23:09:04 -04:00
Anonymous Maarten
f6055432c8 Fix null-pointer dereference on failing SDL_SYS_CreateProcess 2024-09-30 03:03:33 +02:00
Anonymous Maarten
e9bfa5bf6a Mitigate BatBadBut vulnerability 2024-09-30 03:03:33 +02:00
RT2
06e122103c Fix window opacity update 2024-09-29 14:08:09 -07:00
Sam Lantinga
c84d825241 Added SDL_HashPointer() and SDL_KeyMatchPointer() 2024-09-29 10:59:18 -07:00
Frank Praznik
d0c9c008e1 wayland: Use high-DPI system cursors on non-DPI aware windows
Using an unscaled buffer just results in the compositor scaling up the low-res cursor image for output, resulting in it appearing blurry. Always use the scaled cursor to ensure that it appears sharp and matches the native system look.
2024-09-29 13:27:46 -04:00
Ozkan Sezer
5f304b3a47 Fix builed error after commit 0e45b824e3 due to -Wunused-variable 2024-09-29 15:40:02 +03:00
Sam Lantinga
0e45b824e3 renderer: always update the output pixel size at startup
Fixes https://github.com/libsdl-org/SDL/issues/10990
2024-09-29 05:22:28 -07:00
Sam Lantinga
2825a682f0 Fixed build errors 2024-09-29 04:42:19 -07:00
Andrei Alexeyev
ba7b346e52 hashtable: reimplement as open-addressed robin hood hashtable
This is mostly ported from Taisei Project
2024-09-29 04:11:14 -07:00
Evan Hemsley
fc242abbd2 GPU: recreate swapchain on window pixel size change event (#10985) 2024-09-28 18:09:56 -07:00
Evan Hemsley
66f6b40c92 Render GPU: Don't call GetWindowSizeInPixels during RenderPreset (#10984) 2024-09-28 18:01:16 -07:00
Sam Lantinga
a923771978 Added SDL_murmur3_32() 2024-09-28 17:19:01 -07:00
Sam Lantinga
039148fb0e Updated check for stdbool.h
If you're building in a C99 or newer environment, we'll automatically include stdbool.h.

If you're building in a C89 or C90 environment, we'll assume that stdbool.h isn't available and define bool as an unsigned char. If you have a working stdbool.h and want SDL to use it, you can either include stdbool.h before SDL headers, or define SDL_INCLUDE_STDBOOL_H in your project.

Closes https://github.com/libsdl-org/SDL/pull/10980
2024-09-28 16:55:09 -07:00
Frank Praznik
7ca0e9ede1 wayland: Scale the pointer destination size relative to the theme size
This better matches compositor behavior and avoids slight size jumps when the cursor enters and leaves the window.
2024-09-28 14:32:10 -04:00
Frank Praznik
d2094bd0a2 wayland: Don't query the cursor info with DBus if the cursor shape protocol is present
If the cursor shape protocol is supported, the compositor will handle cursor themes and sizes automatically, so querying the properties with DBus serves no purpose as the values are never used.
2024-09-28 12:18:58 -04:00
Ryan C. Gordon
7d21a49c9c filesystem: SDL_EnumerateDirectoryCallback uses an enum now, not an int.
Fixes #10955.
2024-09-28 01:33:40 -04:00
Ryan C. Gordon
55bd9f5311 iostream: flush() should attempt to sync file data to physical media. 2024-09-27 20:20:51 -04:00
Ethan Lee
0852307b58 gpu: Check Vulkan device features for IsDeviceSuitable 2024-09-27 19:58:30 -04:00
cosmonaut
fb165a542b GPU Vulkan: add resolve info to framebuffer and render pass lookups 2024-09-27 15:57:57 -07:00
Ryan C. Gordon
4a296f1bde filesystem: Fixed memory leak on Windows. 2024-09-27 18:54:18 -04:00
Ryan C. Gordon
428f2f35be filesystem: SDL_CreateDirectory should make parent directories.
Fixes #10502.
2024-09-27 18:54:18 -04:00
Ryan C. Gordon
94030131de filesystem: Windows SDL_SYS_CreateDirectory should succeed if dir exists. 2024-09-27 18:54:18 -04:00