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
Sam Lantinga
c824060503
Fixed missing line
2023-02-27 21:08:50 -08:00
Sam Lantinga
a6d8cdf186
Setting a window to non-fullscreen when it's not fullscreen is a no-op
...
Also explicitly reset fullscreen mode when destroying a window, eliminating the need for doing that in SDL_HideWindow(), as that's already taken care of in SDL_OnWindowHidden() normally.
2023-02-27 21:06:05 -08:00
Sam Lantinga
fcc9deb365
Only restore desktop mode when hiding a window if that window was fullscreen
2023-02-27 15:38:48 -08:00
Sam Lantinga
206fa4dafb
Added mapping for DualSense Edge Wireless Controller on Linux
...
This is a mapping when using evdev, not the more advanced HIDAPI support.
2023-02-27 15:19:34 -08:00
David Carlier
a5a53c12bf
USE_DEV_RANDOM close the file descriptor even in the rare case it can't read it
2023-02-26 14:00:00 +03:00
Torge Matthies
f18b5656f6
x11: Fix duplicate Xinput2 event reception
...
Passing True for owner_events in the XGrabPointer call makes all
XI_RawMotion events appear in the queue twice, with the only difference
between them being the value of XGenericEventCookie::cookie. These have
always been filtered out by a check in the XI_RawMotion handler,
however with a mouse that polls at more than 1 kHz frequency, there
also exist legitimate events that appear indistinguishable from these
duplicated events. These must not be filtered out, otherwise the
pointer may move at an inconsistent speed, appearing like a bad pointer
acceleration implementation.
Change owner_events to False in the XGrabPointer and remove the
duplicate event detection code to fix this.
Signed-off-by: Torge Matthies <openglfreak@googlemail.com >
2023-02-25 10:04:46 -08:00
David Carlier
d73f2d76a0
Haiku modernizing a bit the C++ code with C++11 heuristics
...
with BApplication
2023-02-24 20:54:41 -08:00
Sam Lantinga
2897de9efc
Clear the undefined position state when the window is placed
...
This allows the window to be recreated in the same location if needed, for example if recreated because of switching to OpenGL rendering.
2023-02-24 18:04:54 -08:00
Sam Lantinga
4d9d343662
Added handling for undefined window position on X11
2023-02-24 17:49:45 -08:00
Sam Lantinga
3bfd596608
Added handling for undefined window position on Windows
2023-02-24 17:06:47 -08:00
Sam Lantinga
daffe02b11
Fixed relative mouse motion over remote desktop
...
Setting the cursor clip area to a single pixel prevents the relative mouse motion remote desktop warping from working, so the mouse is never recentered.
2023-02-24 09:20:38 -08:00
Anonymous Maarten
f2a277414f
raspberry: SDL_DisplayMode's w/h members have been renamed to screen_w/screen_h
...
Found by running the coccinelle script on SDL's source tree.
2023-02-24 06:55:28 -08:00
Sam Lantinga
516e48515e
Changed the VID/PID used for the Backbone One controller on iOS
2023-02-23 12:24:15 -08:00
Sam Lantinga
59bf1c2853
Added support for the Backbone One PlayStation Edition
2023-02-23 11:57:48 -08:00
Sam Lantinga
b2d913883c
Fixed view frame from flipping back and forth between landscape and portrait on iOS
2023-02-23 09:14:53 -08:00
Frank Praznik
e8fd7f74bd
windows: Track the window display ID locally
...
Track the current window display ID locally so as not to depend on specific behavior of the video layer, which may change the value at times when it isn't expected.
2023-02-23 07:39:16 -08:00
Frank Praznik
9f1a7bb94c
wayland: Track the window display ID locally
...
Track the current window display ID locally so as not to depend on specific behavior of the video layer, which may change the value at times when it isn't expected.
2023-02-23 07:39:16 -08:00
Frank Praznik
d9fadb8b47
video: Update the current display when moving a window programmatically
...
When moving a window programmatically, the move event will be deduplicated due to the window x and y coordinates already being updated, so the window's current display ID needs to be explicitly updated.
2023-02-23 07:39:16 -08:00
Frank Praznik
e8076b78ef
video: Move fullscreen windows via SDL_UpdateFullscreenMode()
...
Update the target display ID and use SDL_UpdateFullscreenMode() when moving a fullscreen window to handle the case where the target display has an existing fullscreen window.
2023-02-23 07:39:16 -08:00
Sam Lantinga
c2f8a478d8
Don't set a logical presentation mode by default
...
SDL3 applications are DPI aware by default, and can set the logical presentation mode as appropriate.
2023-02-22 22:27:01 -08:00
Sam Lantinga
bff307c4b2
Fixed warning building on iOS
2023-02-22 22:03:25 -08:00
Sam Lantinga
6c9e199f73
Use bridged pointers to Objective C objects in C structures
...
Fixes https://github.com/libsdl-org/SDL/issues/7244
2023-02-22 22:03:25 -08:00
Sam Lantinga
9eb19d2bf2
SDL_CheckWindowDisplayChanged() is a static function
2023-02-22 15:34:44 -08:00
Sam Lantinga
756921a049
Fixed float conversion warning
2023-02-22 15:33:47 -08:00
Ozkan Sezer
a2f8cf8fc0
fix MSVC build failures in CI after commit 1e5e8e2f
2023-02-22 10:30:56 +03:00