Sam Lantinga
2ca727aec6
If the client rect is empty, use the last known window size
...
This happens on Windows 11 with fullscreen desktop windows when the desktop is brought up with the Windows+D shortcut.
Fixes https://github.com/libsdl-org/SDL/issues/7419
2023-03-09 10:31:39 -08:00
Ozkan Sezer
34d13cd0a9
made IsModifierKeyPressed() helper static
2023-03-09 20:28:05 +03:00
Deve
4de6ddd07f
Fixed incorrect modifier keys handling on macOS
2023-03-09 09:00:53 -08:00
David Demelier
d0c4849d0b
Rename SDL_atomic_t to SDL_AtomicInt
2023-03-09 09:00:09 -08:00
Sam Lantinga
8994878767
Added SDL_GetSystemTheme() to return whether the system is using a dark or light color theme, and SDL_EVENT_SYSTEM_THEME_CHANGED is sent when this changes
...
Fixes https://github.com/libsdl-org/SDL/issues/5334
Fixes https://github.com/libsdl-org/SDL/issues/6958
Closes https://github.com/libsdl-org/SDL/pull/6440
2023-03-09 03:25:20 -08:00
Sam Lantinga
cabedee4a1
Fixed constraining the mouse to the window in relative mode
2023-03-08 22:29:45 -08:00
Ryan C. Gordon
d898dbfe50
render: Make sure logical_target is bound when presenting.
...
Fixes black screen on macOS.
Fixes #7320 .
2023-03-08 22:57:29 -05:00
Lokathor
b8bc4a234b
Make mappings for "Retrolink SNES Controller" with SDL_GAMECONTROLLER_USE_BUTTON_LABELS both on and off
...
I've only tested this on windows, but I went ahead and made the same changes for linux and mac because I assumed it's the same there and that we'd want to keep the three platforms in sync.
2023-03-08 16:43:12 -08:00
Sam Lantinga
ba87b96cea
Fixed signed/unsigned warnings
...
Fixes https://github.com/libsdl-org/SDL/issues/7424
2023-03-08 12:36:44 -08:00
Ozkan Sezer
53bde3abee
fix SDL_FindFreePlayerIndex so it can really return -1.
2023-03-08 20:00:00 +03:00
Sam Lantinga
dd7cf12206
Fixed instances of SDL_joystick_players being set to -1 (thanks @AntTheAlchemist!)
...
Fixes https://github.com/libsdl-org/SDL/issues/7426
2023-03-08 08:38:59 -08:00
Sylvain
c963f02571
More fix warnings about static function and prototype
2023-03-08 16:14:09 +01:00
Sam Lantinga
61309b4382
Disassociate the SDLOpenGLContext from the view before deleting it
...
If we don't do this, the view will be blanked even if another context is current and rendering from that context won't be visible.
Fixes https://github.com/libsdl-org/SDL/issues/4986
2023-03-08 01:35:21 -08:00
Sam Lantinga
04a03a3eec
Use SDL_GL_DeleteContext instead of Cocoa_GL_DeleteContext for context cleanup
...
That will make the current context NULL before deleting the context.
2023-03-08 01:33:28 -08:00
Sam Lantinga
d08338ddc5
Added mapping for the Xbox Elite Core controller connected via Bluetooth on Android
2023-03-06 15:36:49 -08:00
divVerent
6f1f586086
Fix Xbox One gamepad axis assignment on SDL_JOYSTICK_ANDROID API ( #7405 )
2023-03-06 15:33:18 -08:00
Sam Lantinga
f8106d4f30
Fixed build warning
...
format '%x' expects argument of type 'unsigned int', but argument 2 has type 'Uint32' {aka 'long unsigned int'}
2023-03-06 13:33:52 -08:00
Sam Lantinga
c0e7845874
Be more clear about what flags conflicted
2023-03-06 11:43:28 -08:00
Sam Lantinga
c69aea887a
Fixed permissions for src/video/x11/SDL_x11modes.c
2023-03-06 11:39:21 -08:00
Sam Lantinga
698dbd8464
SDL_CreateWindow() has been simplified and no longer takes a window position.
2023-03-06 09:50:12 -08:00
Sam Lantinga
7905254087
Updated debug print with new SDL_DisplayMode fields
2023-03-06 09:50:12 -08:00
Sylvain
a946a34452
Add Drag and drop position, for x11, wayland and MACOSX
2023-03-06 08:44:05 -08:00
Sylvain
813c586edb
Change local (void*) to SDL_FunctionPointer
2023-03-06 12:38:38 +01:00
Sylvain
9b065bf54b
Fix various warnings: static /void / comma
2023-03-06 12:37:37 +01:00
Sam Lantinga
c9aec268fa
SDL_GetJoystickIDForPlayerIndex() should return 0 for invalid ID (thanks @AntTheAlchemist!)
2023-03-03 16:15:28 -08:00
Michal Suchanek
987b748067
evdev_kbd: Use current keymap
...
keymap can change over time, caching the keymap causes wrong keys
returned when user changes keymap during runtime
Signed-off-by: Michal Suchanek <msuchanek@suse.de >
(cherry picked from commit 96a2a6b945 )
2023-03-03 14:31:20 -08:00
Sam Lantinga
6b87d1938f
Added SDL_EVENT_DISPLAY_SCALE_CHANGED
2023-03-03 11:16:31 -08:00
Sam Lantinga
16f4e37bb5
Fixed build
2023-03-03 09:49:48 -08:00
Sam Lantinga
e3d90c694c
Make sure the window is valid in SDL_SetKeyboardFocus()
2023-03-03 09:09:11 -08:00
Sam Lantinga
f1c3d3be97
Default to using newer D3D renderers in SDL 3.0
2023-03-02 15:09:57 -08:00
Ryan C. Gordon
8b9a938413
dataqueue: Make thread safe.
...
Each data queue gets its own mutex and each function obtains it.
Fixes #7390 .
2023-03-02 16:35:16 -05:00
Eddy Jansson
91b9ba8c54
Correct typo GetSlectionText -> GetSelectionText
2023-03-02 16:29:18 -05:00
Ryan C. Gordon
f833e005e1
dataqueue: Removed non-public SDL_ReserveSpaceInDataQueue function
...
This wasn't used, and it was just asking for trouble.
2023-03-02 16:09:23 -05:00
Ozkan Sezer
ea824c6d20
hidapi/windows tidy-up.
2023-03-02 21:40:02 +03:00
Sam Lantinga
3bba33932f
Fixed testshape on high DPI displays
...
Since the shape is set based on the pixels in the image, we want the window to have the same number of pixels.
2023-03-02 10:15:14 -08:00
Sam Lantinga
bd2e2ee7aa
SDL_RenderTexture() and SDL_RenderTextureRotated() take floating point source coordinates
...
See the discussion at https://discourse.libsdl.org/t/sdl-rendercopyf-uses-ints/36732/8
2023-03-02 09:42:32 -08:00
Ozkan Sezer
199a7af296
hidapi/windows: fix build using older toolchains.
2023-03-02 20:21:20 +03:00
Sam Lantinga
c887b55964
Fixed mingw build
2023-03-02 08:58:52 -08:00
Sam Lantinga
a5fba759b3
Get the name, manufacturer and serial number for Bluetooth devices on Windows
...
Adapted from upstream hidapi code
2023-03-02 08:20:38 -08:00
Sam Lantinga
727c7d4e2f
Don't clobber an existing entry with a different version when adding a gamepad mapping
2023-03-01 16:38:48 -08:00
Sam Lantinga
add980efb7
Unfixed spacing
...
From @ozkan: Except for line 2537, all those trailing whitespace are from original code which had left in as-is in case we want to upgrade to a newer version more easily.
2023-03-01 11:19:52 -08:00
Sam Lantinga
2f14b36709
Fixed spacing
2023-03-01 10:02:14 -08:00
Sam Lantinga
cfb96e260b
Fixed spacing
2023-03-01 09:51:27 -08:00
David Carlier
8d24381e7e
SDL_GetSystemRAM completion for Haiku system.
...
using native system_info's api.
2023-03-01 09:50:03 -08:00
Sam Lantinga
d5775f6708
The gamepad event structures caxis, cbutton, cdevice, ctouchpad, and csensor have been renamed gaxis, gbutton, gdevice, gtouchpad, and gsensor.
...
Fixes https://github.com/libsdl-org/SDL/issues/7375
2023-03-01 09:48:28 -08:00
Ryan C. Gordon
f48d0cc164
audio: Remove AUDIO_U16* support.
...
It wasn't heavily used, and you can't use memset to silence a U16 buffer.
Fixes #7380 .
2023-03-01 10:26:01 -05:00
Sam Lantinga
ebdb320651
Follow the same pattern for releasing the window data in the UIKit driver
...
Possible fix for https://github.com/libsdl-org/SDL/issues/7361
2023-02-28 15:56:49 -08:00
Eddy Jansson
5f5abb6805
Always allocate zt in output of SDL_iconv_string()
...
Before this, the function could not be used on buffers,
as it would not account for the zero-termination unless
it was included in the input.
2023-02-28 09:26:01 -08:00
Sam Lantinga
6aeb07d4c2
Fixed SDL windows getting the maximized state after leaving fullscreen on macOS
2023-02-28 09:03:28 -08:00
Sam Lantinga
da134a3039
Fixed locking up the Logitech F310 with the PlayStation controller detection
2023-02-28 08:36:31 -08:00