Commit Graph

4317 Commits (8130950e926d7a8b6322ba741447a0edc0f5b977)

Author SHA1 Message Date
Sam Lantinga afd100f02b Added support for the PowerA Fusion Pro 2 and the PDP Xbox Series X Afterglow and Blue controllers 2021-06-18 17:37:46 -07:00
Ryan C. Gordon 839387ed0a
video/dummy: Don't zero out the fake display mode before adding it.
The SDL_zero call was in the wrong place as a historical accident, I think.
2021-06-17 22:11:10 -04:00
Sam Lantinga 268fbcd460 Fixed compiler warning on Visual Studio 2021-06-17 11:23:47 -07:00
Sam Lantinga d8dba5bcf3 Added support for the Logitech G923 racing wheel 2021-06-17 11:22:08 -07:00
Ethan Lee 7f261d3b76 wayland: Fix returning to a window from fullscreen without calling SetWindowSize 2021-06-15 09:00:18 -07:00
Ivan Epifanov 8da0dd17a1 Oops. Renderer already queues viewport change 2021-06-15 08:58:53 -07:00
Ivan Epifanov 1fc519880d Reset/re-apply viewport on frame start/target change. Fixes SDL_RenderSetLogicalSize on PSVita 2021-06-15 08:58:53 -07:00
Phillip Trudeau bc7ac134db Windows: Fix SDL_GetBasePath() truncating paths
SDL_GetBasePath grows its path buffer for long paths, but GetModuleFileNameExW always truncates and succeeds,
so `len` was always equal to (buflen - 1) which is 127. This is easily fixed by checking for (buflen - 1) instead of buflen.
For paths longer than MAX_PATH, this problem sometimes got hidden by Windows path shortening ("C:\PROGRA~1\" etc.).

Tested on Windows 10 x64 19041 and 10586.
2021-06-12 23:07:46 -04:00
Paul Cercueil db5cd8c694 joystick: virtual: Fix event injection for axes/hats
SDL_JoystickSetVirtualAxisInner() and SDL_JoystickSetVirtualHatInner()
did not properly sanitize the 'axis' and 'hat' parameters.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2021-06-12 17:55:03 +03:00
Paul Cercueil f3cf019ecb joystick: Add missing comma in joystick drivers list
Without this comma it is impossible to enable both the Vita and Dummy
drivers at the same time.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2021-06-12 15:50:02 +03:00
Ozkan Sezer bc9888c9b5 OS2_GetDisplayModes: malloc a new copy of mode's driver data.
Based on a patch by Jochen Schäfer <josch1710@live.de> :

The problem is, that in the initialization code uses the same structure for
desktop_mode and current_mode.  See SDL_os2video.c:OS2_VideoInit():

  stSDLDisplay.desktop_mode = stSDLDisplayMode;
  stSDLDisplay.current_mode = stSDLDisplayMode;
  ...
  stSDLDisplayMode.driverdata = pDisplayData;

Then, if you call GetDisplayModes, current_mode will added to the modes
list, with the same driverdata pointer to desktop_mode.

  SDL_AddDisplayMode( display, &display->current_mode );

When VideoQuit gets called, first the modes list gets freed including the
driverdata, the desktop_mode gets freed.  See SDL_video.c:SDL_VideoQuit():

  for (j = display->num_display_modes; j--;) {
      SDL_free(display->display_modes[j].driverdata);
      display->display_modes[j].driverdata = NULL;
  }
  SDL_free(display->display_modes);
  display->display_modes = NULL;
  SDL_free(display->desktop_mode.driverdata);
  display->desktop_mode.driverdata = NULL;

So, the display_modes[j].driverdata gets freed, but desktop_mode->driverdata
points to the same memory, but is not NULL'ed. When desktop_mode->driverdata
gets freed the memory is already freed, and libcx crashes the application on
SDL_Quit.
2021-06-12 14:55:24 +03:00
Ozkan Sezer d28437de3c SDL_keyboard.c: Add bounds guards when assigning to the scancode array.
Based on a patch by Jochen Schäfer <josch1710@live.de> :
On a T420 pressing the ACPI button for volume control, big scancodes
were emitted. This was causing an overflow, because missing guards.
2021-06-12 08:00:50 +03:00
Ethan Lee eb15b4e962 wayland: Drop SwapWindow calls for hidden windows 2021-06-11 21:50:18 -07:00
Ryan C. Gordon 37d35a3e34
kmsdrm: hook up KMSDRM_GLES_DefaultProfileConfig for use.
Fixes #3678.
2021-06-11 21:03:35 -04:00
Ivan Epifanov bbdd08e0b2 Build without PIB support by default and add flag to enable it 2021-06-11 13:21:07 -04:00
Ivan Epifanov a4442476df Cleanup dead and duplicate code 2021-06-11 13:21:07 -04:00
Ivan Epifanov c2b8b55634 Older api, not needed 2021-06-11 13:21:07 -04:00
Ivan Epifanov dd2a285825 Remove leftovers 2021-06-11 13:21:07 -04:00
Ozkan Sezer 2f248a2a31 SDL_cocoaevents.m: fix build against SDK < 10.12 after commit 0dd7024d. 2021-06-11 04:00:32 +03:00
Dimitriy Ryazantcev f5122377c9 Move SDL_IsXInputDevice check above actual joystick allocation 2021-06-10 16:41:09 -07:00
Dimitriy Ryazantcev 766d81ec86 Rewrite SDL_DINPUT_JoystickPresent method to avoid costly IDirectInput8_CreateDevice calls 2021-06-10 16:41:09 -07:00
Dimitriy Ryazantcev a6da2fbf73 Rename haptic methods to avoid confusion with joystick:
`SDL_DINPUT_MaybeAddDevice`->`SDL_DINPUT_HapticMaybeAddDevice`
`SDL_DINPUT_MaybeRemoveDevice`->`SDL_DINPUT_HapticMaybeRemoveDevice`
`SDL_XINPUT_MaybeAddDevice`->`SDL_XINPUT_HapticMaybeAddDevice`
`SDL_XINPUT_MaybeRemoveDevice`->`SDL_XINPUT_HapticMaybeRemoveDevice`
2021-06-10 16:41:09 -07:00
Dimitriy Ryazantcev 73dc68a7ae Simplify and cleanup DirectInput joystick backend code:
- Do not call IDirectInputDevice8_QueryInterface(device, &IID_IDirectInputDevice8,...) on DIRECTINPUTDEVICE8 device
- Get joystick VendorID and ProductID via IDirectInputDevice8_GetProperty(.., DIPROP_VIDPID, ..) call instead of messing with DIDEVICEINSTANCE.guidProduct
- Normalize HID device interface path to upper case for stable operation of XInput check
- Remove useless RawInput calls in SDL_IsXInputDevice() - just check for "IG_" string in HID device interface path that we already have

There shouldn't be any observable behavior changes.
2021-06-10 16:41:09 -07:00
Dimitriy Ryazantcev f2f759dca3 Remove not used DirectInput ignored_devices list 2021-06-10 16:41:09 -07:00
Dimitriy Ryazantcev adc2d362ba Remove outdated and not used WIN_IsXInputDevice code 2021-06-10 16:41:09 -07:00
Sam Lantinga 0e62926ec5 Fixed crash if vendor or product strings are empty 2021-06-10 16:28:32 -07:00
Ryan C. Gordon e65a658320
x11: Add a hint to force override-redirect.
Fixes #3776.
2021-06-09 22:10:20 -04:00
Sam Lantinga cb5e86353b Fixed crash after reinitializing libusb HID support 2021-06-08 13:15:24 -07:00
Eric Wasylishen c33e3c15fb testwm2: draw various debug logging into the window itself
Renderer output size, window position/size, display bounds, etc.
Uses new SDLTest_CommonDrawWindowInfo function in test_common.
2021-06-08 05:29:29 +03:00
Cameron Gutman e13b43ac21 Don't skip sending wakeups for the current thread
We can be in a situation where we receive a win32 hook callback on the same
thread that is currently waiting. In that case, we do still need to trigger
a wakeup when an event is pushed because the hook itself won't necessarily
do that (depending on what we return from the hook).
2021-06-05 14:35:21 -07:00
Cameron Gutman b992b915e5 Optimize SDL_WaitEventTimeout() for the SDL_PollEvent() case
There's no sense in doing all the setup for waiting if we're just polling.
2021-06-05 14:35:21 -07:00
Cameron Gutman 85b51e6c92 Fall back to polling normally if not operating the win32 message loop
In this condition, we cannot safely wait/wake on events.
2021-06-05 14:35:21 -07:00
Cameron Gutman e13d5df00b Call SDL_SendWakeupEvent() directly from SDL_PeepEvent()
SDL_PeepEvent() is a documented public API, so we must properly support
waking a waiting thread in SDL_WaitEventTimeout() with SDL_PeepEvent().
2021-06-05 14:35:21 -07:00
Ethan Lee d956636c85 wayland: Implement FlashWindow 2021-06-04 16:26:03 -07:00
Jupeyy 64724db0a1 Implement bare minimum for SDL_FlashWindow 2021-06-04 15:07:55 -07:00
Francesco Abbate 0dd7024d55 Modifies WaitEvent and WaitEventTimeout to actually wait instead of polling
When possible use native os functions to make a blocking call waiting for
an incoming event. Previous behavior was to continuously poll the event
queue with a small delay between each poll.

The blocking call uses a new optional video driver event,
WaitEventTimeout, if available. It is called only if an window
already shown is available. If present the window is designated
using the variable wakeup_window to receive a wakeup event if
needed.

The WaitEventTimeout function accept a timeout parameter. If
positive the call will wait for an event or return if the timeout
expired without any event. If the timeout is zero it will
implement a polling behavior. If the timeout is negative the
function will block indefinetely waiting for an event.

To let the main thread sees events sent form a different thread
a "wake-up" signal is sent to the main thread if the main thread
is in a blocking state. The wake-up event is sent to the designated
wakeup_window if present.

The wake-up event is sent only if the PushEvent call is coming
from a different thread. Before sending the wake-up event
the ID of the thread making the blocking call is saved using the
variable blocking_thread_id and it is compared to the current
thread's id to decide if the wake-up event should be sent.

Two new optional video device methods are introduced:

WaitEventTimeout
SendWakeupEvent

in addition the mutex

wakeup_lock

which is defined and initialized but only for the drivers supporting the
methods above.

If the methods are not present the system behaves as previously
performing a periodic polling of the events queue.

The blocking call is disabled if a joystick or sensor is detected
and falls back to previous behavior.
2021-06-04 13:50:50 -07:00
Sam Lantinga 40e5ce7fe5 This delay is no longer needed on Steam Link hardware 2021-06-04 13:23:54 -07:00
Andrew Murray cd67f42d8f
add Linux mapping for brook fighting board (#4416)
* added controller mapping for Brook fighting board

* fixed formatting on Brook Universal Fighting Board controller mapping entry
2021-06-04 09:20:47 -07:00
Sjoerd Simons 89fd9821de Add controller mapping for Atari vcs controllers
This add controller mappings for the Atari vcs (modern) controller as
well as the classic controller, for both bluetooth and USB connectivity.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2021-06-03 11:43:41 -07:00
Sjoerd Simons de4ba6ebc0 Ignore the device version for Atari vcs controllers
At least on bluetooth the guid user the version reported by the
bluetooth device. Which for Atari vcs controllers is the firmware
version. However the mapping will stay the same regardless of firmware
version, so ignore the version entirely to avoid needing a new mapping
entry for each firmware version.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2021-06-03 11:43:41 -07:00
Sam Lantinga 6de33c0945 Clarify why we're skipping Game Controller framework supported devices in hid.c 2021-06-03 09:05:33 -07:00
Patrick Hogan 28da6c5ddb Have HIDAPI skip MFI supported HID devices on macOS to avoid duplicate devices. 2021-06-03 09:03:11 -07:00
Ethan Lee 2af3f64ecf wayland: Activate the window on first ShowWindow, if possible 2021-06-02 12:59:07 -07:00
Ethan Lee 151f953815 wayland: Implement RaiseWindow with xdg-activation 2021-06-02 12:59:07 -07:00
Ozkan Sezer f498c281e1 fixed build with SDL_JOYSTICK_RAWINPUT enabled after commit b81969d46f
See: https://github.com/libsdl-org/SDL/pull/4388#issuecomment-852713792
2021-06-02 14:10:50 +03:00
Kyle Schaefer 4522cb1df9 Changing variable from float to int, this way we can check it's value without having to do an unnecessary conversion. Then do explicit conversions later on if we need. 2021-06-01 16:53:39 -07:00
Kyle Schaefer c289bad900 In x11, GetDisplayDPI can give incorrect or unusable DPI information. Using XGetDefaults to get the Xft DPI if it's available and returning that. This could allow you to figure out DPI scale. 2021-06-01 16:53:39 -07:00
Ethan Lee d32440359a wayland: Add support for maximized/restored events 2021-06-01 15:33:45 -07:00
Anthony Pesch fc508eabe2 kmsdrm: remove redundant modeset_pending flag
this variable was added in commit 2067a7db8e and
ultimately tracks if this is a surface's first present. checking if the current
bo is NULL provides the same functionality and cuts down on a redundant piece
of state potentially getting out of sync in the future
2021-06-01 15:32:02 -07:00
Anthony Pesch 4c965b7a8d kmsdrm: fix SetDisplayMode binding the the wrong surface / context
SetDisplayMode needs to recreate the EGL surfaces, which then need to be
bound along with the correct context in each rendering thread

commit 3a1d7d9c9a removed this behavior which
has broken using SetDisplayMode when rendering with multiple contexts

the commit message was rather vague, but if the surfaces do need to be
created immediately, this process probably needs to be split such that
surface is created immediately, but the binding is deferred
2021-06-01 15:32:02 -07:00
Anthony Pesch 0219928dd5 kmsdrm: honor mode previously set by SDL_SetWindowDisplayMode when enabling fullscreen
and remove duplicate SDL_WINDOWEVENT_RESIZED event

commit 2067a7db8e made SDL_SetWindowSize and
SDL_SetWindowFullscreen modify the display mode previously set by a call to
SDL_SetWindowDisplayMode

as far as I understand the SDL API, calling SDL_SetWindowDisplayMode followed
by calling SDL_SetWindowFullscreen(..., SDL_WINDOW_FULLSCREEN) is the correct
way to mode set / switch to fullscreen

this change restores that functionaliy when switching to SDL_WINDOW_FULLSCREEN,
but other cases are still modifying the display mode set by the user. rather
than modifying the display mode set by the user, it seems this logic inside of
KMSDRM_ReconfigureWindow should be pushed further down into KMSDRM_CreateSurfaces
(as it was originally) to only modify the final mode that's set (based on the
fullscreen flags), but not override the mode requested by the user
2021-06-01 15:32:02 -07:00
Anthony Pesch fd5de93a02 kmsdrm: fix gbm surface dimensions not matching the mode being set
commit 2067a7db8e introduced new surface_w and surface_h
variables which were passed to gbm_surface_create rather than the dimensions from the
drmModeModeInfo structure. commit 5105ecf8b1 further
refactored this code and no longer synchronized these variables inside
KMSDRM_SetDisplayMode, breaking it

this change removes the variables since they're seemingly redundant to begin with
2021-06-01 15:32:02 -07:00
Timo Gurr b63cb822bf Added T500RS to known wheel list 2021-06-01 09:54:58 -07:00
Dimitriy Ryazantcev b81969d46f Be more explicit about Xbox 360/One device ids.
When Xbox One/Series Controllers are connected via USB on Windows they all are using `XBOXGIP` driver and produce a special ProductID `0x02FF` (GIP software PID) for any connected controller.

On the other hand `Xbox 360 Wireless Controller Reciever` (PID 0x0719) is using `XUSB` driver and produces special ProductID `0x02A1` (XUSB software PID) for each connected Xbox 360 Wireless Controller.

Also fixed Xbox One Series X Controller comment.
2021-06-01 09:54:13 -07:00
Per Nyblom 86ee383fdd Removed duplicate SDL_AtomicGet() 2021-05-28 12:29:54 -04:00
Ryan C. Gordon fed8465085
loadbmp: Attempt to handle small palettes better.
Only adjust the biClrUsed field if it is set to zero in the bitmap, and make
some effort to make sure we don't overflow a buffer in any case.

This was triggering an issue with the sailboat bmp used for testpalette.c in
SDL 1.2, which is an 8-bit paletted image with 66 palette entries instead of
256. See discussion at https://github.com/libsdl-org/sdl12-compat/issues/63

This change might be a problem, but there's no indication this code, which
originally landed in SDL_image 17 years ago with a large rewrite, is actually
fixing a specific issue. I'm also not sure we should actually make an effort
to accept a bmp that has a biClrUsed field that is both non-zero and _also_
incorrect.
2021-05-27 10:49:25 -04:00
Sam Lantinga db146e66c6 Fixed warnings building with Visual Studio 2021-05-25 10:34:04 -07:00
Sam Lantinga 3fcaf5b4b3 Fixed incorrect axis scaling for Nintendo Switch controllers 2021-05-25 10:33:30 -07:00
Sam Lantinga 157c3f8097 [SDL] Minimize number of system calls when handling WM_INPUT raw input messages.
Details:
Currently doing 4 system calls per WM_INPUT message, which can cause the thread handling the message loop to be swapped out several times:
* GetProp - to get window data from the window handle
* GetRawInputData - to retrieve the raw input data
* 2 calls to GetMessageExtraInfo - to ignore synthetic mouse events generated for touchscreens

In this change:
* Replaced GetProp by iterating the list of windows maintained by SDL (with a fallback to GetProp). Note that this will affect all messages and not just WM_INPUT
* only calling GetMessageExtraInfo if a touchscreen has been detected

Fix for https://jira.valve.org/browse/CSGO-4855
@saml
2021-05-21 09:45:08 -07:00
Cacodemon345 dbbc725f5e Remove WSCONS mouse scaling 2021-05-19 21:09:19 -04:00
Cacodemon345 2aa14b3806 Add missing key to WSCONS-to-SDL conversion table 2021-05-19 21:09:19 -04:00
Sam Lantinga 333c8e75f1 The PS5 driver supports Joystick LED 2021-05-17 11:54:05 -07:00
Ethan Lee be5356af93 winrt: Fix support for multiple simultaneous mouse button presses 2021-05-14 13:33:59 -07:00
Sylvain 62a562dea2
X11: use x11sym loaded functions (see bug #3978) 2021-05-12 23:37:18 +02:00
Sylvain 531d83bf6a
X11: allow using touchscreen, while pointer is grabbed (see bug #3978) 2021-05-12 23:13:48 +02:00
Kimplul 9e1d7baef1 Added T300RS to known wheel list 2021-05-12 09:25:57 -07:00
Ryan C. Gordon e1db4b82ec
egl: Don't crash if we failed halfway through SDL_CreateWindow. 2021-05-11 14:08:17 -04:00
Ethan Lee f2f451a59d wayland: Call SetWindowBordered at the end of ShowWindow 2021-05-10 11:11:38 -07:00
Fredrick Brennan c5dd9964c1 Copied X11 error handler code from SDL_x11opengl.c
Avoids needing to malloc to hold the error string.
2021-05-10 13:31:39 -04:00
Fredrick Brennan b3b4677e32 (X11) Set _NET_WM_NAME properly, fixes Unicode window titles
Removes deprecated code meant to support extremely ancient, pre-UTF-8
versions of Xorg. Uses new xlib API's for doing this same thing.

Closes #4288.
2021-05-10 13:31:39 -04:00
Ryan C. Gordon f4ab1c94f9
gamecontrollerdb: Add entry for the 8BitDo Receiver for Linux.
Fixes #3048.
2021-05-10 13:08:34 -04:00
Ryan C. Gordon bedc509afc
gamecontrollerdb: added entry for PowerA XBox One Controller for Linux.
Fixes #3910.
2021-05-10 13:04:59 -04:00
Ethan Lee efbb6ff9d7 wayland: Create the server decorations after the toplevel has been configured 2021-05-10 12:49:26 -04:00
Ryan C. Gordon 9dc97afa71 cocoa: Report an error if SDL_SetClipboardText() isn't using UTF-8 encoding.
Fixes #4110.
2021-05-08 12:39:50 -04:00
Sam Lantinga 9231f1f1cf Added support for the PS5 controller on iOS and tvOS 2021-05-07 12:29:03 -07:00
Henk Kalkwater 889cebb7c2 Wayland touch inputs send normalized coords
Resolves #4361
2021-05-05 15:20:42 -07:00
Nicolas Caramelli 31637ddeea Generic check for desktop GL and EGL on Linux systems 2021-05-05 15:19:55 -07:00
Ozkan Sezer 58884e4c1b SDL_audiocvt.c: fixed MSVC double->float conversion warnings. 2021-05-04 00:23:40 +03:00
Ethan Lee c69fde348f wayland: Maximize/Restore should set the relevant window flags.
Also, Maximize should be ignored for fixed-size windows.
2021-05-02 19:03:32 -04:00
Christian Rauch 006378b921 fix NULL frame_callback access 2021-05-02 14:07:40 -04:00
Christian Rauch 424bbaec06 wayland: destroy frame callback when window is destroyed 2021-05-01 14:19:25 -04:00
Ethan Lee 2092855035 wayland: Guard surface_frame_listener for OpenGL, document why it exists 2021-05-01 13:27:12 -04:00
Ethan Lee 3d47ddc422 wayland: Use refresh_rate to calculate max_wait in SwapWindow 2021-05-01 13:27:12 -04:00
Sylvain 7b284dbb34
EglChooseConfig: choose an accelerated configuration
- especially because we can be promoted to true color 888
  make sure we don't select a potentially software implementation

- hopefully fix bug #1482 (EGL ChooseConfig selects software renderer on Android)
2021-04-30 22:01:48 +02:00
Ethan Lee 9161f95166 egl: Reject attempts to set negative swap intervals 2021-04-30 13:24:01 -04:00
Ryan C. Gordon c54c16d353
wayland: don't hang in SDL_GL_SwapBuffers if the compositor is ghosting us.
If you hide a window on Mutter, for example, the compositor never requests
new frames, which will cause Mesa to block forever in eglSwapBuffers to
satisfy the swap interval.

We now always set the swap interval to 0 and manage this ourselves, handing
the frame to Wayland when it requests a new one, and timing out at 10fps just
to keep apps moving if the compositor wants no frames at all.

My understanding is that other protocols are coming that might improve upon
this solution, but for now it solves the total hang.

Fixes #4335.
2021-04-30 13:20:35 -04:00
Ozkan Sezer 227021b647 SDL_windowsmessagebox.c (MessageBoxDialogProc): fix calling convention. 2021-04-30 11:25:20 +03:00
Sylvain a74f888ff9
Fixed bug #4337 - compilation of 'SDL_vulkan_utils' fails with 'VK_ERROR_INCOMPATIBLE_VERSION_KHR' undeclared 2021-04-29 22:25:00 +02:00
Sylvain 8ac0fb52cb
OpenSLES: CloseDevice() is called at higher level, if OpenDevice() fails
- explicit initialization of static variables
2021-04-29 09:29:02 +02:00
Sylvain 1f3df900f9
Error missing 'flags' initialization (see bug #2881) 2021-04-28 23:40:26 +02:00
Sylvain fcbf19b764
AAudio: make sure stream is not null to prevent crash in RequestStop (see #3710) 2021-04-28 21:04:47 +02:00
Sylvain c93e3b3607
Fixed bug #2881 - SDL_RLEsurface may encode RGB888 if it has no color key (Thanks Simon Hug)
To encode with BLEND mode, it needs a valid alpha channel
2021-04-28 10:43:28 +02:00
Sylvain b626429745
Merge remote-tracking branch 'refs/remotes/origin/main' 2021-04-27 11:10:41 +02:00
Sylvain f869518533
Audio: normalize conversion Stereo to 5.1, Quad to 7.1, 5.1 to 7.1 (bug #4104) 2021-04-27 11:07:51 +02:00
Sylvain 21349901ea
Audio: convert 5.1 to 7.1, use right-surround for r-front and r-back (see #4104) 2021-04-27 10:57:48 +02:00
Ryan C. Gordon 8527c583f4 cocoa: Fix recreated windows that are both borderless and resizable.
These would accidentally get a titlebar because the "borderless" style mask
is zero but the resizable attribute adds a bit. I assume this happens because
you used to need window decoration to resize a window in macOS, but this
changed in later releases.

This only caused problems when recreating a window (you had an
SDL_WINDOW_OPENGL window and tried to create a Metal SDL_Renderer on it, etc).

Fixes #4324.
2021-04-27 01:36:23 -04:00
Ethan Lee 40210f8945 winrt: Always use a thread for joystick support 2021-04-26 21:29:56 -04:00
Ryan C. Gordon 2fdbae22cb cocoa: Remove mouse event tap.
It doesn't appear to work anymore, and was disabled by default anyhow, since
the needed APIs are forbidden on the Mac App Store.

A better solution to lock the mouse to the window on macOS would still be
welcome. CGAssociateMouseAndMouseCursorPosition() works fine for relative
mouse mode, this was just a question of SDL_SetWindowGrab(). As it stands
now, a grabbed mouse can briefly break out of the window, causing varying
degrees of chaos.
2021-04-26 18:43:28 -04:00
Sylvain 9727655b89
SDL_test_common: add other window flags: --shown, --hidden, --input-focus, --mouse-focus 2021-04-26 14:22:19 +02:00
Sylvain d62ebec260
SDL_test_common: replace 'resize' by 'resizable' 2021-04-26 14:10:39 +02:00