Sam Lantinga
3d951134a3
Removed SDL_FILE_DISABLED
...
This didn't actually do anything except break functionality on Apple platforms
2024-01-17 09:24:04 -08:00
Sam Lantinga
ac367be171
Updated CMakeLists.txt now that timers and threads can't be disabled
2024-01-17 09:24:04 -08:00
Sam Lantinga
e2080f74fd
Fixed building with the joystick subsystem disabled
2024-01-17 09:24:04 -08:00
Sam Lantinga
a0967c017f
Fixed building with the video subsystem disabled
2024-01-17 09:24:04 -08:00
Sam Lantinga
31f34e9504
Removed SDL_ATOMIC_DISABLED
...
It turns out that because we redefine SDL functions internally, it is safe to call SDL mutex functions while initializing the jump table
2024-01-17 09:24:04 -08:00
Sam Lantinga
6e1b11368d
Removed SDL_CPUINFO_DISABLED
...
CPU info is a core part of the SDL API, and shouldn't be disabled
2024-01-17 09:24:04 -08:00
Sam Lantinga
52d6587084
Removed SDL_EVENTS_DISABLED
...
Events are a core part of the SDL API, and shouldn't be disabled
2024-01-17 09:24:04 -08:00
Sam Lantinga
ba02722755
Removed SDL_LOADSO_DISABLED
...
Loading shared libraries is core functionality on platforms that support it.
2024-01-17 09:24:04 -08:00
Sam Lantinga
0d7df16812
Timers are a required platform feature
...
Many SDL subsystems depend on being able to see time passing. If you are porting to a new platform, you'll need to fill in a timer implementation as part of the initial port.
Fixes https://github.com/libsdl-org/SDL/issues/8850
2024-01-16 20:50:08 -08:00
Sam Lantinga
518b070aa9
Fixed drop event coordinate conversion
2024-01-16 14:07:42 -08:00
SDL Wiki Bot
3ca8cee874
Sync SDL3 wiki -> header
2024-01-16 20:27:25 +00:00
Ryan C. Gordon
8bf74280e0
docs: Note SDL_UpdateWindowSurfaceRects can update beyond specified areas.
...
Reference Issue #8825 .
2024-01-16 15:26:13 -05:00
Sam Lantinga
9408299bad
Set the number of audio devices to 0 if audio hasn't been initialized
...
This updates GetAudioDevices() to have the same behavior as SDL_GetJoysticks() where the return value will only be NULL if there is an error. Returning no devices will return a valid array containing NULL.
2024-01-16 12:15:13 -08:00
Sam Lantinga
be0ba78c56
Convert the coordinates in drop events as well (thanks @Dragon-Baroque!)
2024-01-16 12:00:36 -08:00
Sylvain
e6c8872fdc
Fixed bug #7614 : Segmentation Fault in SDL_BlitSurface
2024-01-16 07:09:35 -08:00
Sylvain
ce0e0675de
Fixed bug #8301 - Software renderer draws long lines incorrectly / SDL_RENDERLINEMETHOD_GEOMETRY
2024-01-16 07:06:29 -08:00
Sam Lantinga
6e48d4532c
Added raw input device handle for WM_INPUT mouse button handling
2024-01-15 19:47:55 -08:00
Sam Lantinga
cf5e0637b5
Touchpads already have their right/left buttons swapped in raw input
...
Fixes https://github.com/libsdl-org/SDL/issues/8597
2024-01-15 19:41:46 -08:00
Sam Lantinga
fb2d7ed83e
Restore window minimum and maximum size if it is recreated
...
Fixes https://github.com/libsdl-org/SDL/issues/8805
2024-01-15 16:33:49 -08:00
Francisco Javier Trujillo Mata
915afae514
Remove force using one thread
2024-01-15 15:05:03 -08:00
Francisco Javier Trujillo Mata
64a3e2d17d
Remove ps2_driver from workflow
2024-01-15 15:05:03 -08:00
SDL Wiki Bot
464a41411e
Sync SDL3 wiki -> header
2024-01-15 18:55:24 +00:00
Frank Praznik
4f3d4bd110
wayland: Add the ability to import and wrap external surfaces
...
Add the ability to import and wrap external surfaces from external toolkits such as Qt and GTK.
Wayland surfaces and windows are more intrinsically tied to the client library than other windowing systems, so it is necessary to provide a way to initialize SDL with an existing wl_display object, which needs to be set prior to video system initialization, or export the internal SDL wl_display object for use by external applications or toolkits. For this, the global property SDL_PROPERTY_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER is used.
A Wayland example was added to testnative, and a basic example of Qt 6 interoperation is provided in the Wayland readme to demonstrate the use of external windows with both SDL owning the wl_display, and an external toolkit owning it.
2024-01-15 13:54:35 -05:00
SDL Wiki Bot
99f6bcf504
Sync SDL3 wiki -> header
2024-01-15 04:32:24 +00:00
chalonverse
3a4ac15a27
Make Xbox GDK code public (and fix some GDK code rot) ( #8844 )
2024-01-14 20:31:41 -08:00
Frank Praznik
649556befa
win32: Let windows manage the floating state unless explicitly overridden
...
Windows doesn't inform applications if the window is in the docked/tiled state, so let windows manage the window size when restoring from a fixed-size state, unless the application explicitly requested a new size/position.
Fixes the video_getSetWindowState test.
2024-01-13 15:24:25 -08:00
Frank Praznik
d4a9748740
win32: Fix test failures
...
WM_WINDOWPOSCHANGING needs to return 0 when a resize was initiated programmatically
Checking the SWP_NOMOVE and SWP_NOSIZE flags in the WINDOWPOS struct when handling WM_WINDOWPOSCHANGED to avoid sending redundant resize and move events is unreliable, as they can be set even when the window has moved or changed size, such as when leaving fullscreen, or programmatically resizing a window without STYLE_RESIZABLE set.
Fixes the video_getSetWindowSize and video_setWindowCenteredOnDisplay tests.
2024-01-13 15:24:25 -08:00
Sylvain
101f903bb1
testgeometry: allow to use arrows to move the triangle
2024-01-12 11:53:34 -08:00
Sylvain
4033a0a83b
Prevent ASAN warning:
...
like SDL_triangle.c:305:30: runtime error: left shift of negative value -672
(even if the value was correctly computed)
2024-01-12 11:53:34 -08:00
Sam Lantinga
f0b9c7f0f0
Let Windows track floating window state
...
This fixes restoring window size and position after moving it to a tiled location (which isn't maximized) and then back.
2024-01-12 10:58:30 -08:00
Sam Lantinga
98be55894e
Moved window state change handling from WM_WINDOWPOSCHANGING to WM_WINDOWPOSCHANGED
...
Applications might override WM_WINDOWPOSCHANGING which would prevent us from getting the correct window state.
This also fixes cases where the window doesn't get WM_SHOWWINDOW, as described in Raymond Chen's blog post:
https://devblogs.microsoft.com/oldnewthing/20080115-00/?p=23813
2024-01-12 09:38:28 -08:00
Sam Lantinga
7efeb36131
Pass the frame DPI to WIN_AdjustWindowRectForHWND()
2024-01-12 09:33:05 -08:00
Sam Lantinga
e4ee1cade7
Revert "SDL_windowsevents.c: fixed -Werror=unused-variable"
...
This reverts commit f8cce4ead4 .
2024-01-12 09:33:05 -08:00
Ozkan Sezer
f8cce4ead4
SDL_windowsevents.c: fixed -Werror=unused-variable
2024-01-12 18:56:10 +03:00
Sam Lantinga
277fded7ba
Refactor AdjustWindowRectEx() into WIN_AdjustWindowRectForHWND()
...
Also include the window EXSTYLE to calls to AdjustWindowRectEx()
2024-01-12 07:07:27 -08:00
Sam Lantinga
312160935d
Removed deprecated use of __IPHONEOS__ (thanks @Dragon-Baroque!)
2024-01-12 06:51:44 -08:00
Sam Lantinga
483155bbf9
Fixed borderless window client area calculation
2024-01-11 13:49:28 -08:00
Sylvain
cf0d1d7234
Fixed ASAN warning, runtime error: left shift of 160 by 24 places cannot be represented in type 'int'
2024-01-11 09:00:19 -08:00
George Broughton
0c6b070761
Capture debug macros off by default
2024-01-11 10:22:36 -05:00
Sam Lantinga
b5bc64aa55
Fixed pause key on Windows (thanks Mikhail!)
2024-01-10 16:13:01 -08:00
Caleb Cornett
d766f68cb3
Fix compile error with XInputOnGameInput.h
2024-01-10 12:51:27 -08:00
Frank Praznik
ec2159d492
tests: Clean up the window creation properties in the Wayland custom surface example
2024-01-10 11:17:06 -05:00
Sam Lantinga
9a77813df0
WinMain is specified by the Win32 API as having extern "C" linkage
...
Fixes https://github.com/libsdl-org/SDL/issues/8814
2024-01-10 06:25:49 -08:00
Sam Lantinga
6407e0cc37
Added attribution for GIP protocol handling (thanks @medusalix!)
2024-01-09 11:43:12 -08:00
Frank Praznik
3a219caf3d
wayland: Restore accidentally removed line of code
2024-01-08 18:01:06 -05:00
Sam Lantinga
ccae9c1ef6
Only initialize audio drivers that have been requested
...
If testautomation is running with only a specific audio driver enabled, we shouldn't try to open other ones, as they might fail.
Fixes https://github.com/libsdl-org/SDL/issues/8797
(cherry picked from commit 4c11307a4e )
2024-01-08 14:35:42 -08:00
Sam Lantinga
590d0bec6f
Revert "Make sure new windows have mouse and keyboard focus if there's no windowing system"
...
This reverts commit 5948ea997f .
This isn't needed, the proper focus logic is in SDL_ShowWindow()
2024-01-08 14:32:28 -08:00
Sam Lantinga
5948ea997f
Make sure new windows have mouse and keyboard focus if there's no windowing system
2024-01-08 13:54:18 -08:00
SDL Wiki Bot
05d18aab1c
Sync SDL3 wiki -> header
2024-01-08 19:55:19 +00:00
Frank Praznik
4b6df89238
wayland: Add a property to allow creation of a wl_egl_window object even if OpenGL is not enabled
...
Useful if the application handles OpenGL outside of SDL and wants to use the window without having to pull in Wayland as a dependency.
2024-01-08 14:54:47 -05:00