Sam Lantinga
bd1115fa33
Make sure subsystems are noted as initialized during initialization
...
This fixes issues with SDL_WasInit(X) returning false if called from an event filter during initialization
2023-01-20 17:06:49 -08:00
Sam Lantinga
c4db0725e4
Enable paddles on the Xbox Elite controller when connected over USB
2023-01-20 09:31:22 -08:00
Frank Praznik
5d5d39b190
video: Don't resize moved, fullscreen windows when mode switching is being emulated
...
When a driver is emulating mode changes, the display bounds are always the native desktop size, not those of the video mode being emulated. This can result in incorrectly setting the size of fullscreen Wayland windows. Don't resize fullscreen windows to the display dimensions when mode switching is emulated.
Renames the quirk flag from VIDEO_DEVICE_QUIRK_DISABLE_DISPLAY_MODE_SWITCHING to VIDEO_DEVICE_QUIRK_MODE_SWITCHING_EMULATED to better reflect its purpose.
2023-01-19 15:07:29 -08:00
Frank Praznik
5ba9e07366
wayland: Remove fullscreen window moving code
...
SDL now handles moving fullscreen windows on move events in the video core, so Wayland doesn't have to do it manually anymore.
2023-01-19 15:07:29 -08:00
Guldoman
6c06f5ce93
wayland: Set APPLICATION
scancode name to Menu
...
This mimics the behavior of the other platforms.
2023-01-19 15:05:41 -08:00
Sam Lantinga
14695a714f
Set the default priority level of SDL_LOG_CATEGORY_ERROR to SDL_LOG_PRIORITY_ERROR
...
This way SDL_LogError() will show errors by default.
Fixes https://github.com/libsdl-org/SDL/issues/7105
2023-01-19 08:04:40 -08:00
Sam Lantinga
c8dfc6b475
Fixing window being incorrect size when using win+shift+arrow to move new big picture mode between displays
...
*When changing the display of a window, if it's a fullscreen window, resize it to the size of the new display
CR: @saml
2023-01-19 07:43:01 -08:00
Frank Praznik
423a82cd4b
wayland: Enforce or override libdecor minimum window size
...
libdecor plugins can change the min/max window size values internally to enforce a minimum window size, and errors and crashes can result if the window size is below the internal limit.
On versions of libdecor >= 0.1.1, the minimum width and height can be queried and the minimum required window size will be enforced. The application requested window size is still respected, however, the actual window may be slightly larger than the drawable area to accommodate the required libdecor minimum size.
On version 0.1.0 of libdecor, which lacks the function to retrieve the minimum size, the internal limits are overridden before committing a frame, so that the internal limits always match the window size as a workaround, even if the window is technically smaller than the plugin would normally allow.
2023-01-18 10:28:01 -08:00
Fabian Greffrath
9b861d2ea4
add support for libsamplerate's "linear" resampling mode
...
Fixes #6998
(cherry picked from commit 8efa1f8fc6
)
2023-01-16 23:49:26 -05:00
Sylvain
69253c542a
SDL_test_harness: fix memory leak when generated seed
2023-01-16 10:41:43 +01:00
Sylvain
4156e6f52e
SDL_CreateAudioStream: check for invalid parameters
2023-01-16 09:24:27 +01:00
Eric Wasylishen
67c91353e0
Handle DPI scaling in SDL_GetWindowSurface
...
Fixes DPI awareness of testdrawchessboard (previously, the surface was
being created in points instead of pixels, resulting in the demo app
only drawing in a corner of the screen on High-DPI displays)
*_CreateWindowFramebuffer()/*_UpdateWindowFramebuffer(): are updated
to use SDL_GetWindowSizeInPixels instead of SDL_GetWindowSize() or
window->w/window->h.
Most of the _CreateWindowFramebuffer backends are untested except
for Windows.
Fixes #7047
2023-01-15 12:57:42 -08:00
Anonymous Maarten
fc72ee5775
haiku: cast pointer to SDL_FunctionPointer
2023-01-14 15:25:22 +01:00
Sam Lantinga
8238a128c3
Fixed build on Steam Link hardware
2023-01-13 16:37:56 -08:00
Sam Lantinga
decbbb0499
Updated API for SDL_JoystickID sign change
2023-01-13 14:20:59 -08:00
Sam Lantinga
bf53183c8b
Fixed building on Raspberry Pi
2023-01-13 14:20:57 -08:00
Anonymous Maarten
0785f272fd
Add type argument to non-dynamic LOAD_LIBUSB_SYMBOL macro
...
It should not need a cast.
2023-01-13 19:31:18 +01:00
Sam Lantinga
67ddb4c5a2
Fixed PS2 build
2023-01-13 10:00:16 -08:00
Francisco Javier Trujillo Mata
40f0744b73
Use filesystem drivers
2023-01-13 09:59:46 -08:00
Frank Praznik
180afcdf39
Revert "wayland: Don't try to restore non-resizable windows"
...
This reverts commit e35c3872dc
.
2023-01-12 17:59:50 -08:00
Sam Lantinga
c9647b4ad0
Use the symbolic names of the audio and video driver hints
2023-01-12 17:25:15 -08:00
Sam Lantinga
23beef4fc7
We no longer need explicit SDL_ENABLE_SYSWM_* while building SDL
2023-01-12 16:17:00 -08:00
Sam Lantinga
7516bd349c
Move SDL_internal.h to be first in the file, after the copyright
2023-01-12 16:17:00 -08:00
Sam Lantinga
0da24479da
Fixed building Vivante video driver
2023-01-12 16:17:00 -08:00
Sam Lantinga
99ec05e2b8
Cast the return value of SDL_LoadFunction() to the type of the function being loaded
2023-01-12 16:17:00 -08:00
Frank Praznik
e35c3872dc
wayland: Don't try to restore non-resizable windows
...
Libdecor can crash if attempting to un-maximize a window that was not set as resizable.
2023-01-12 13:34:36 -08:00
Frank Praznik
50f2eb7d41
wayland: Perform a round trip when maximizing and restoring windows
...
Perform a round trip when maximizing and restoring windows so the changes have already taken effect when the associated functions return.
2023-01-12 13:34:36 -08:00
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