6280 Commits

Author SHA1 Message Date
Frank Praznik
707b561f97 wayland: Enable compositor fullscreen toggling
The compositor can toggle the fullscreen state (via a hotkey or otherwise), so the internal SDL state must be updated accordingly when it does.

When toggling fullscreen via the compositor, SDL will attempt to use the last fullscreen flag explicitly set. If no flag was previously set, SDL_WINDOW_FULLSCREEN will be used if a window video mode was set, otherwise SDL_WINDOW_FULLSCREEN_DESKTOP will be used. If the previous flag was SDL_WINDOW_FULLSCREEN and the window video mode was cleared, it will revert to SDL_WINDOW_FULLSCREEN_DESKTOP.
2022-09-09 08:17:27 -07:00
Frank Praznik
31979e2d98 wayland: Add missing static qualifiers 2022-09-09 08:17:27 -07:00
Taiko2k
1c88a0522f Update Wayland cursors to match X11 cursors 2022-09-09 08:59:37 -04:00
Sam Lantinga
9f4baeea53 Clean up thread local storage when quitting SDL
SDL_Quit() should be the last SDL API that you call before exiting your application, and is intended to clean up all internal state.

If real-life applications are relying on thread-local storage after SDL_Quit() we could potentially add a hint to control this behavior.

Fixes https://github.com/libsdl-org/SDL/issues/6200
2022-09-08 20:08:20 -07:00
Sam Lantinga
a3900a751e Lock joysticks when removing a controller on the WGI thread 2022-09-08 13:59:25 -07:00
Sam Lantinga
12413ab31f Lock joysticks while attaching a virtual one 2022-09-08 13:33:21 -07:00
Ozkan Sezer
787cd580ee silence unused function warning for SDL_endswith() on non-linux. 2022-09-08 23:00:04 +03:00
Sam Lantinga
4071573241 Don't try to second guess DS4Windows, let it remap things as expected.
DS4Windows can create both emulated Xbox and emulated PS4 controllers, and we don't know which the user has it doing, so don't try to second guess it, just let it do it's thing. Users should follow the remapping software recommendations on when to enable/disable it for various situations.

Fixes https://github.com/libsdl-org/SDL/issues/6167
2022-09-08 11:50:56 -07:00
Sam Lantinga
a0f169603d Fixed the CRC in the mappings for PS2, PSP, and Vita controllers 2022-09-08 09:53:51 -07:00
Sylvain
90a480a100
Fixed bug #6199 - Broken clip behaviour on a render target (metal) 2022-09-08 05:44:39 +02:00
Sam Lantinga
0ad8d9d292 SDL_IsXInputDevice() shouldn't return true if XInput isn't enabled 2022-09-07 15:31:24 -07:00
Sam Lantinga
d93f9a778b The new Wii Remote shares the same VID/PID as the Wii U Pro controller 2022-09-07 12:33:43 -07:00
Sam Lantinga
f398d8a424 Note that the Logitech Extreme 3D is a flight stick 2022-09-07 11:53:13 -07:00
Sam Lantinga
0a05b281f2 Make sure we hold the joystick lock when updating the device state while opening it 2022-09-07 11:51:51 -07:00
Sam Lantinga
d4e0d27c1c Added Wii Remote controller mappings for Linux 2022-09-07 02:02:04 -07:00
Sam Lantinga
42cf6d6c56 Don't treat the Wii extension controls as a separate game controller on Linux 2022-09-07 01:41:11 -07:00
Sam Lantinga
87f8b6ff0f Don't mess with the state of the Motion Plus extension on Linux 2022-09-07 01:21:01 -07:00
Sam Lantinga
c28da4892a Fixed build 2022-09-07 00:52:40 -07:00
Sam Lantinga
638452ecf7 Assert that continuous reporting is enabled, so input timeout is a reliable way of detecting Bluetooth connection problems. 2022-09-07 00:44:13 -07:00
Sam Lantinga
8dfe0e4beb Removed checks not needed for the Wii U Pro Controller 2022-09-07 00:41:29 -07:00
Sam Lantinga
4018f35ef2 Added left and right sensors for Nintendo Joy-Con and Wii controllers 2022-09-07 00:00:27 -07:00
Sam Lantinga
30f55a5d59 Added initial support for the Wii Motion Plus extension
This adds a gyro sensor to the Wii controller, and is enabled in standalone and nunchuk mode
2022-09-06 23:33:55 -07:00
Sam Lantinga
29f4a5ba0e Add GLES2 shader prologue infrastructure. (by @eloj)
There is supposedly an OpenGL ES2 target that does not support precision specifiers. However, the existing logic to detect this is currently broken in two ways:

1) There's a typo of the `#ifdef` as `#if`.
2) Checking for `GL_FRAGMENT_PRECISION_HIGH` can not be the correct way to detect this platform. Other targets, including some desktops, will also not have this defined (for various reasons).

Because some of the shader code is missing precision specifiers, and because a default is ONLY provided if `GL_FRAGMENT_PRECISION_HIGH` is set, these other targets break.

Instead of 'hard-coding' the prologue string into shaders in the C source, use our ability to provide a list of strings to `glShaderSource` instead, leaving the determination to run-time.

This commit closes https://github.com/libsdl-org/SDL/pull/6182
2022-09-06 15:55:27 -07:00
Sam Lantinga
4fd6bba257 Refactored for similarity to surrounding code 2022-09-06 12:29:42 -07:00
Ozkan Sezer
5ffede35d9 Fix https://github.com/libsdl-org/SDL/issues/6191 2022-09-06 19:56:29 +03:00
Cameron Cawley
10e1ef00e2 Fix compatibility with Windows XP 2022-09-06 08:55:35 -04:00
Sam Lantinga
d1fea10c0f Added support for the accelerometer in the Wii Remote 2022-09-05 16:08:15 -07:00
Sam Lantinga
a61b823da8 Added support for the Wii Remote with the Classic Controller Pro extension
Also changed event order to: buttons, triggers, axes, for consistency with other drivers
2022-09-05 14:32:45 -07:00
Ozkan Sezer
612a86ebad HIDAPI_DriverPS3_UpdateEffects: kill bad use of & operator on effects[] 2022-09-05 20:47:00 +03:00
Sam Lantinga
b00e1b1b62 Added support for a ShanWan PS2 -> PS3 USB converter to the HIDAPI driver 2022-09-05 10:01:51 -07:00
Cameron Cawley
fd93f817ba Assume that stdint.h is available on Windows with compilers other than MSVC <= 2008 2022-09-05 09:01:31 -07:00
Sylvain
03485db0a3
Android: understand HAL_PIXEL_FORMAT_BGR_565 as a returned value from ANativeWindow_getFormat() (see #6016) 2022-09-03 23:40:14 +02:00
Sam Lantinga
1b4e08b89e Added an entry for the Hori Fighting Stick mini 4 kai
This is a PS3/PS4 arcade stick which becomes an Xbox 360 controller on PC
2022-09-02 17:04:53 -07:00
Sam Lantinga
47f2373dc1 Added locking for Android joystick events 2022-09-02 16:52:55 -07:00
Sam Lantinga
e8f6b7503a Added mappings for the ASUS ROG Kunai 3 Gamepad 2022-09-02 15:06:13 -07:00
Sam Lantinga
5770e87cb2 Fixed regression handling touchpad input with PS5 controllers using the original shipping firmware 2022-09-02 13:57:59 -07:00
Sam Lantinga
253f6a913d Variable renaming for consistency 2022-09-02 11:49:06 -07:00
Sam Lantinga
5002624e8a Fixed crash when extension controllers are hotplugged 2022-09-02 11:41:19 -07:00
Sam Lantinga
7df571ffc6 HIDAPI_DumpPacket() takes a const memory pointer 2022-09-02 11:37:16 -07:00
Sam Lantinga
b6d23d21db Fixed interactions with the Linux Wiimote driver 2022-09-02 11:21:51 -07:00
Ozkan Sezer
0c984360d1 SDL_hidapi_wii.c: fix a -Wshadow warning 2022-09-02 20:02:56 +03:00
Sam Lantinga
b6b3fb0023 This was intended to be Uint8 2022-09-02 09:59:32 -07:00
Ozkan Sezer
5be157b3a2 SDL_hidapi_wii.c: fix -Wpointer-sign warnings 2022-09-02 19:33:40 +03:00
Sam Lantinga
54356f41a9 Wii: fixed trigger axis reporting for the Wii U Pro Controller 2022-09-02 09:03:44 -07:00
Sam Lantinga
a35642fa3e Wii: don't bother reading the extension type for the Wii U Pro controller, we already know what it is 2022-09-02 08:58:52 -07:00
Sam Lantinga
c3ecb9d099 Wii: re-request the status if we get a communication error 2022-09-02 08:58:52 -07:00
Ozkan Sezer
0c24b46e9f SDL_hidapi_wii.c: fix build in c89 mode. 2022-09-02 18:55:00 +03:00
Sam Lantinga
9874fc4e6a Reconnect as a different controller if the Wii extension hardware changes 2022-09-02 08:47:15 -07:00
Sam Lantinga
5f3cb54972 Updated Wii support with @tellowkrinkle's changes in 2f288e9d5b 2022-09-02 08:28:28 -07:00
Sam Lantinga
785d784a93 Set the output value for ParseExtensionResponse() in all return cases 2022-09-01 22:30:05 -07:00