Commit Graph

7064 Commits

Author SHA1 Message Date
Sam Lantinga
6dc50a78fc Fixed window never being shown on iOS 2023-01-12 12:45:55 -08:00
happyharryh
57e78f4cf5 Fixed the hat_map to avoid segmentation fault 2023-01-12 06:55:35 -08:00
Sam Lantinga
1bf1c866fe Handle new SDL_rwops error codes in SDL_LoadFile_RW()
Thanks @BeWorld2018!
2023-01-12 06:53:07 -08:00
Ozkan Sezer
2ec9a20204 SDL_dynapi.c: add extern "C" guards, just in case.. 2023-01-12 14:01:32 +03:00
Anonymous Maarten
67d517907b log: fix unused-variable warning when configuring SDL with -DSDL_LIBC=OFF 2023-01-11 16:31:27 -08:00
Francisco Javier Trujillo Mata
7f610cd969 Using UV instead of STQ 2023-01-11 15:10:51 -08:00
Francisco Javier Trujillo Mata
555183257d Remove dummy flag 2023-01-11 15:10:51 -08:00
Ozkan Sezer
30516fd3a6 joystick/vita: add some sanity check to SDL_GetJoystickInstanceID result
Reference issue: https://github.com/libsdl-org/SDL/issues/7051
2023-01-11 21:56:50 +03:00
Ozkan Sezer
f046788a5a joystick/vita: fix index value use returned by SDL_GetJoystickInstanceID
Reference issue: https://github.com/libsdl-org/SDL/issues/7051
2023-01-11 21:56:50 +03:00
Ozkan Sezer
85924687fd fix SDL_GetSensorInstanceID() return code upon failure.
Reference issue: https://github.com/libsdl-org/SDL/issues/7051
2023-01-11 21:56:50 +03:00
Ozkan Sezer
0621a67350 fix SDL_GetJoystickInstanceID() return code upon failure
Reference issue: https://github.com/libsdl-org/SDL/issues/7051
2023-01-11 21:56:50 +03:00
Sam Lantinga
21a1508ceb Re-add JNI_OnLoad to the symbols list so Android symbols are resolved properly 2023-01-10 21:15:21 -08:00
Sam Lantinga
237086c917 Fixed Xcode 14.2 warnings 2023-01-10 15:51:14 -08:00
Sam Lantinga
dc280c17a0 Moved SDL_intrin.h back into the public headers for application use 2023-01-10 15:50:35 -08:00
Elad Lahav
413af2f5f1 Addressed comments 2023-01-10 06:19:40 -08:00
Elad Lahav
38b35a3414 Allow the use of posix_spawn() instead of vfork/execlp() 2023-01-10 06:19:40 -08:00
Sam Lantinga
56522034db Fixed building with Visual Studio 2010 2023-01-09 18:30:23 -08:00
Narr the Reg
9fa55d9cab hidapi: switch: Add user calibration support 2023-01-09 18:07:54 -08:00
Sam Lantinga
2aa9569b3e Replaced SDL_SIMDAlloc(), SDL_SIMDRealloc(), and SDL_SIMDFree() with SDL_aligned_alloc() and SDL_aligned_free()
Fixes https://github.com/libsdl-org/SDL/issues/5641
2023-01-09 18:01:59 -08:00
Anonymous Maarten
aa7fdd6624 haiku: remove unused variable in SDL_BApp.h 2023-01-10 02:39:09 +01:00
Anonymous Maarten
f85ef6fc3c haiku: fix use of SDL_ConvertSurfaceFormat 2023-01-10 02:39:09 +01:00
Sam Lantinga
e9b86eebf3 Functions which return function pointers now return SDL_FunctionPointer instead of void*
This fixes the clang warning "Cast between pointer-to-function and pointer-to-object is an extension"

You can define SDL_FUNCTION_POINTER_IS_VOID_POINTER in your project to restore the previous behavior.

Fixes https://github.com/libsdl-org/SDL/issues/2866
2023-01-09 15:46:21 -08:00
Sam Lantinga
5feebcdce0 SDL_AddHintCallback() now returns a standard int result instead of void
Fixes https://github.com/libsdl-org/SDL/issues/7035
2023-01-09 12:09:30 -08:00
Sam Lantinga
fde78d12f2 Updated copyright for 2023 2023-01-09 09:41:41 -08:00
Sam Lantinga
c663e6d568 Revert "Always allow controller events for virtual joysticks regardless of focus state"
This reverts commit d94f2a9ee5.

Rather than changing behavior, we'll set SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS in the joystick tests
2023-01-09 09:05:40 -08:00
Anonymous Maarten
f91a747549 include: SDL_dynapi.h depends on platform defines 2023-01-08 21:37:54 +01:00
Sam Lantinga
d94f2a9ee5 Always allow controller events for virtual joysticks regardless of focus state
Refrence https://github.com/libsdl-org/SDL/pull/7024
2023-01-08 10:48:46 -08:00
Sam Lantinga
ac99db9fc8 Fixed infinite loop shutting down WGI controllers
We are guaranteed that the lock will be held during shutdown, so if we are in InvokeRemoved(), it's because we're shutting down controllers and need to remove them from our internal list.

Fixes https://github.com/libsdl-org/SDL/issues/7016
2023-01-08 09:35:17 -08:00
Anonymous Maarten
f53d797cca cmake: generate git hash using GetRevisionDescription CMake module
This allows the build system (ninja/make/VS) to detect whether the current
checkout git commit has changed. If so, SDL_revision.h will be updated.
2023-01-08 18:20:56 +01:00
Hunter Kvalevog
0953367967 SDL_Vulkan_GetInstanceExtensions: Remove window
Remove the unused `window` parameter from
SDL_Vulkan_GetInstanceExtensions, which is never used by any of the
backends.
2023-01-08 07:55:34 -08:00
Anonymous Maarten
ec14487e1d unix/SDL_systimer.c: add ';' to statement 2023-01-08 01:04:06 +01:00
Sylvain
13ab100317 Fixed bug #6990: fix computation of alpha in BlitRGBtoRGBPixelAlphaMMX
backport from SDL2 branch
2023-01-06 21:29:01 +01:00
Sylvain
93e2903ac5 Add SDL_PlayAudioDevice() to play audio. Remove pause_on param from SDL_PauseAudioDevice() 2023-01-06 09:15:39 -08:00
Frank Praznik
230ad2a201 wayland: Handle modifier keys internally
Modifier keys on Wayland can be remapped, latched/locked, and defer the system modifier state changes to key release events instead of key press events, which the default SDL modifier handling code doesn't deal with correctly. Track and set the modifier keys internally to deal with the plethora of various combinations that the system key modifiers can be in and correctly reflect the actual system state to SDL applications.
2023-01-05 10:39:19 -08:00
Frank Praznik
d2917918c0 events: Add function to send keystrokes and not update the modifier state
Add SDL_SendKeyboardKeyIgnoreModifiers() function and repurpose the source parameter for the SDL_SendKeyboardKeyInternal() function to use as a generic set of keyboard flags.
2023-01-05 10:39:19 -08:00
Matt Durgavich
59ad6793b9 Fix For issue #6948 (#6991)
MessageBoxes attached to a window in macOS should use modal APIs and not
use a poll/sleep pattern on the main thread. Sleeping the main thread
makes the NSWindow message loop sluggish and interferes with external
applications that need to send messages to that window, such as
VoiceOver.
2023-01-05 08:54:27 -08:00
Sylvain
2d7f8d7d51 Remove legacy SDL_Audio functions that acts on device id == 1 2023-01-05 09:40:06 -05:00
Guldoman
5a42831345 wayland: Fallback to default cursor if chosen one wasn't found 2023-01-04 21:28:26 -08:00
Sam Lantinga
0bbf6cc379 Test text rendering APIs take floating point coordinates 2023-01-04 16:45:02 -08:00
Sam Lantinga
4f978456a8 Renamed SDL_GAMEPADDEVICEREMAPPED to SDL_GAMEPADREMAPPED 2023-01-04 14:32:37 -08:00
Deve
eddaf870f5 Avoid textinput events when pasting from clipboard on iOS.
I handle command+C and command+V shortcuts for copy/paste from clipboard using
SDL_GetClipboardText/SDL_SetClipboardText. But on iOS command+V shortcut is
also handled by system, so that I also get textinput event with that clipboard
text. And thus the application gets this clipboard text twice (from
SDL_GetClipboardText and from textinput event).

I assume that intended behavior is that command+V shouldn't generate textinput
events. At least as far as I know ctrl+V on other platforms does nothing. This
commit disables paste action for UITextField, so that textinput event isn't
generated anymore.
2023-01-04 13:52:15 -08:00
Sam Lantinga
c823f26f18 Revert "Removed public joystick locking API"
This reverts commit a515f51ac0.

We still need joystick locking to protect the gamepad mappings
2023-01-04 13:51:40 -08:00
Sylvain
6863f0b2d8 Add SDL_WindowID type for SDL_Window id 2023-01-04 09:21:52 -08:00
Sam Lantinga
86c6376140 Fixed integral constant overflow 2023-01-04 08:54:46 -08:00
Sam Lantinga
aaaf7423ac Fixed build 2023-01-03 16:17:10 -08:00
Sam Lantinga
32c077216c Fixed warnings 2023-01-03 15:59:35 -08:00
Sam Lantinga
49af0d1b89 Fixed build 2023-01-03 15:35:18 -08:00
Sam Lantinga
e85839cd56 Fixed line wrapping for HID packet dump 2023-01-03 15:12:47 -08:00
Sam Lantinga
dacdb1c310 Added support for the ThrustMaster eSwap PRO Controller Xbox 2023-01-03 15:12:18 -08:00
Sylvain
86658f2ca7 Wayland / Drag and Drop: find the current window 2023-01-03 08:18:08 -08:00