Commit Graph

11824 Commits (2afee88c81493c5b9fdaabca91ec7ed9f71b811f)

Author SHA1 Message Date
Sam Lantinga b6646f4de5 Use nanosecond timestamp for sensors (thanks @1bsyl!) 2023-01-23 05:34:24 -08:00
Frank Praznik 34bb0735d8 video: Don't resize moved fullscreen windows if the display mode switch failed
If an exclusive fullscreen window is moved between displays, SDL_UpdateFullscrrenMode can kick the window out of fullscreen if the display onto which it was moved doesn't have a matching video mode. Check the return code and clear the fullscreen flag and skip the resize if the window is no longer fullscreen.
2023-01-22 14:00:54 -08:00
Frank Praznik 8f8746cc1b video: Return an error on failure to set the video mode
If SDL_UpdateFullscreenMode() fails to find a matching mode for the window, it will restore the window to its previous state, but still returns a success code of 0. Return an error code of -1 if no matching display mode can be found.
2023-01-22 14:00:54 -08:00
David Carlier b379c910d4 SDL_CPUPauseInstruction RISCV-64 version proposal. 2023-01-22 13:58:59 -08:00
ds-sloth 38697e832a Support MIN/MAX blend on OpenGL + ES 2023-01-22 13:49:44 -08:00
Sylvain b1f365374b Add code snipped to migrate from AudioCVT interface 2023-01-22 22:22:50 +01:00
Sylvain cb01b35c4e testresample.c: use SDL_DestroyAudioStream() 2023-01-22 22:22:50 +01:00
Anonymous Maarten 0770c55e8d cocci: remove SDL_INIT_NOPARACHUTE 2023-01-22 20:14:35 +01:00
Anonymous Maarten 967ebd78e6 cocci: also fix up SDL_CreateRenderer calls with non-default render indices 2023-01-22 20:04:40 +01:00
Sam Lantinga 9c8642ded9 Removed SDL_INIT_NOPARACHUTE
Fixes https://github.com/libsdl-org/SDL/issues/7121
2023-01-22 09:14:12 -08:00
Sylvain e4fdf42097 Update README-migration.md 2023-01-22 11:31:30 -05:00
Sylvain bd793b6d75 Update testresample.c 2023-01-22 11:31:30 -05:00
Sylvain 6ad51558d4 Update testaudiostream_audio.c 2023-01-22 11:31:30 -05:00
Sylvain 64bc0a1612 Remove AudioCVT interface in favor of SDL_AudioStream 2023-01-22 11:31:30 -05:00
raphasamp 9211c0b639 Update SDL_vitagles_pvr.c
This was broken unintentionally during #6545.
2023-01-22 17:32:00 +03:00
PARTY MAN X fb11918758 Blacklist Konami Amusement Controllers From HIDAPI.
Fixes issue #7118 by adding all Konami Amusement controllers to the
blacklist.  Additionally, the blacklist is changed to exclude a whole
vendor when the PID 0x0000 is used.

(cherry picked from commit a44b6461050760a84cd4c0807aff78a363f9cec8)
2023-01-21 22:05:21 -08:00
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 4becca4fc9 Clarify that SDL_GetJoystickFromInstanceID() and SDL_GetGamepadFromInstanceID() return NULL if the associated device hasn't been opened yet.
Fixes https://github.com/libsdl-org/SDL/issues/7100
2023-01-19 07:42:04 -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 8efa1f8fc60e0a2961ce3bad9293c048301d25ba)
2023-01-16 23:49:26 -05:00
Sylvain 80f51eeb1f testautomation: add an option to list all test suites and tests 2023-01-16 11:07:09 +01:00
Sylvain 69253c542a SDL_test_harness: fix memory leak when generated seed 2023-01-16 10:41:43 +01:00
Sylvain 1a47cf5448
Revert "gen_audio_resampler_filter: Use SDL_PI_F"
This reverts commit 41221777ba.
2023-01-16 10:04:22 +01:00
Sylvain 41221777ba gen_audio_resampler_filter: Use SDL_PI_F 2023-01-16 09:24:27 +01:00
Sylvain 4156e6f52e SDL_CreateAudioStream: check for invalid parameters 2023-01-16 09:24:27 +01:00
Eric Wasylishen 08963dc183 testdrawchessboard.c: draw a diagonal line for visually checking highdpi functionality
Also enable dpi awareness
2023-01-15 12:57:42 -08: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 6d11515873 cmake: make sdl3.pc relocatable 2023-01-15 12:37:51 -08:00
Anonymous Maarten 0a1479d58c cmake: fix sdl3.pc for Nintendo 3DS + add to test matrix 2023-01-15 17:46:36 +01: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
Sam Lantinga 0ed4589ed2 Merge commit '0785f272fd9eb9c2cb366b074b09417aeea3f3c6' into main 2023-01-13 14:20:17 -08:00
Sam Lantinga 3db5ea6b80 Merge commit 'a3ae26ddd0a34ee3f5f39311dbdf420b24d95939' into main 2023-01-13 14:20:15 -08:00
Sam Lantinga e9406686ee Merge commit '67ddb4c5a21564edb228c51fc3c8d77aafdca618' into main 2023-01-13 14:20:12 -08:00
Sam Lantinga 0475d65635 Merge commit '40f0744b73603630d78a50c3c0026aa0aed64069' into main 2023-01-13 14:20:10 -08:00
Sam Lantinga 9a7d6b0e40 Merge commit '3d67b8d026f396af72dc0ac0d59e61449a8198c9' into main 2023-01-13 14:20:08 -08:00
Sam Lantinga f6d1fe9d0e Merge commit 'b60084eb0b8ca4e96d2c927e4667801236f14c74' into main 2023-01-13 14:20:06 -08:00
Sam Lantinga bfa3c0e972 Merge commit '180afcdf3998e5175b744d3f2d87147802809450' into main 2023-01-13 14:20:04 -08:00
Sam Lantinga 27059107c5 Merge commit 'c9647b4ad00ad01ba3262b74548d7e8be934ed15' into main 2023-01-13 14:20:02 -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
Anonymous Maarten a3ae26ddd0 cmake: convert spaces in PTHREAD_CFLAGS to ';' 2023-01-13 19:02:54 +01:00
Sam Lantinga 67ddb4c5a2 Fixed PS2 build 2023-01-13 10:00:16 -08:00