Commit Graph

12272 Commits (a06046c55ce69370b585109f39e8295d73ae855e)

Author SHA1 Message Date
Frank Praznik 77dc1a929a cocoa: Implement popup windows 2023-03-10 15:51:13 -08:00
Frank Praznik f41d3933e6 X11: Implement popup windows 2023-03-10 15:51:13 -08:00
Frank Praznik 68d2d9f76d wayland: Implement popup windows 2023-03-10 15:51:13 -08:00
Frank Praznik e987c4a463 video: Add the concept of child popup windows
Add the CreatePopupWindow function to allow the creation of child tooltip and menu popup windows. Popup windows must be created as either a tooltip or popup menu and cannot be minimized, maximized, made fullscreen, or grab the mouse.

Child popup windows are tracked and will be recursively hidden, shown, or destroyed in tandem with the parent window.
2023-03-10 15:51:13 -08:00
Sam Lantinga fc1af1dfde Added support for the trigger buttons on the Victrix Pro FS for PS5 2023-03-10 15:40:09 -08:00
Sam Lantinga 06183989e1 Removed space between sizeof and parentheses 2023-03-10 08:12:58 -08:00
Sam Lantinga dfa832c5de Make sure our pixel size is up to date at window creation
This guarantees that the application will always get SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED when a window is created.

Fixes https://github.com/libsdl-org/SDL/issues/7441
2023-03-10 08:11:16 -08:00
Sam Lantinga 2af6f4a3e4 Fixed build warning on Android 2023-03-10 08:11:16 -08:00
Stephen Kitt bbfd5b3fb2 Specify bash for androidbuildlibs.sh
This script relies on string indexes in parameter expansions, which
aren't suppored by /bin/sh (e.g. dash).

Based on a patch by Roflcopter4:
https://github.com/joncampbell123/dosbox-x/pull/3850

Signed-off-by: Stephen Kitt <steve@sk2.org>
2023-03-10 07:26:37 -08:00
Qrox 71c80c478a Uses integer arithmetics in SDL_ResampleAudio
- Revert resampler workaround
- Avoids precision loss caused by large floating point numbers
- Adds unit test to test the signal-to-noise ratio and maximum error of resampler
- Code cleanup
2023-03-09 22:12:03 -08:00
Sam Lantinga 926db1bd54 Removed a duplicate delay accidentally added during code refactor 2023-03-09 16:12:49 -08:00
Sam Lantinga 645823fc90 Wait for the GCController framework to see IOKit devices
It occasionally takes a few millseconds for the GCController framework to handle the device notification and set up the device

Fixes the duplicate controller issue in https://github.com/libsdl-org/SDL/issues/6686
2023-03-09 16:12:49 -08:00
Sam Lantinga 21e444b2e7 Fixed a few additional sizeof locations 2023-03-09 15:25:48 -08:00
Sam Lantinga c6443d86c9 Code style: changed "sizeof foo" to "sizeof(foo)" (thanks @sezero!) 2023-03-09 15:10:44 -08:00
Guldoman ad95c93bf4 Add portal interface to support `SDL_GetSystemTheme` in linux 2023-03-09 15:05:16 -08:00
Anonymous Maarten c304fbded6 cmake: disable ccache by default 2023-03-09 20:24:03 +01:00
Sam Lantinga 2ca727aec6 If the client rect is empty, use the last known window size
This happens on Windows 11 with fullscreen desktop windows when the desktop is brought up with the Windows+D shortcut.

Fixes https://github.com/libsdl-org/SDL/issues/7419
2023-03-09 10:31:39 -08:00
Ozkan Sezer bb59f46cbe Removed guard around the enabled assertions support code
Otherwise, SDL_assert_always() wouldn't work.

Fixes https://github.com/libsdl-org/SDL/issues/7433
2023-03-09 20:51:50 +03:00
Ozkan Sezer 34d13cd0a9 made IsModifierKeyPressed() helper static 2023-03-09 20:28:05 +03:00
Deve 4de6ddd07f Fixed incorrect modifier keys handling on macOS 2023-03-09 09:00:53 -08:00
David Demelier d0c4849d0b Rename SDL_atomic_t to SDL_AtomicInt 2023-03-09 09:00:09 -08:00
Sam Lantinga 8994878767 Added SDL_GetSystemTheme() to return whether the system is using a dark or light color theme, and SDL_EVENT_SYSTEM_THEME_CHANGED is sent when this changes
Fixes https://github.com/libsdl-org/SDL/issues/5334
Fixes https://github.com/libsdl-org/SDL/issues/6958
Closes https://github.com/libsdl-org/SDL/pull/6440
2023-03-09 03:25:20 -08:00
Sam Lantinga fb0c3197e0 Fixed the documentation for SDL_SetRelativeMouseMode() 2023-03-08 22:32:54 -08:00
Sam Lantinga cabedee4a1 Fixed constraining the mouse to the window in relative mode 2023-03-08 22:29:45 -08:00
Ryan C. Gordon d898dbfe50
render: Make sure logical_target is bound when presenting.
Fixes black screen on macOS.

Fixes #7320.
2023-03-08 22:57:29 -05:00
Lokathor b8bc4a234b Make mappings for "Retrolink SNES Controller" with `SDL_GAMECONTROLLER_USE_BUTTON_LABELS` both on and off
I've only tested this on windows, but I went ahead and made the same changes for linux and mac because I assumed it's the same there and that we'd want to keep the three platforms in sync.
2023-03-08 16:43:12 -08:00
Sylvain 4053876bf6 Fix warning drop const qualifier 2023-03-08 22:22:34 +01:00
Sam Lantinga ba87b96cea Fixed signed/unsigned warnings
Fixes https://github.com/libsdl-org/SDL/issues/7424
2023-03-08 12:36:44 -08:00
Ozkan Sezer 53bde3abee fix SDL_FindFreePlayerIndex so it can really return -1. 2023-03-08 20:00:00 +03:00
Sam Lantinga 91b328c2c6 Fixed emscripten build 2023-03-08 08:58:26 -08:00
Sam Lantinga dd7cf12206 Fixed instances of SDL_joystick_players being set to -1 (thanks @AntTheAlchemist!)
Fixes https://github.com/libsdl-org/SDL/issues/7426
2023-03-08 08:38:59 -08:00
Sylvain d78817703e Fix build 2023-03-08 16:42:10 +01:00
Sylvain c963f02571 More fix warnings about static function and prototype 2023-03-08 16:14:09 +01:00
Sylvain 16bb6a0b3d Fix warnings about static function and prototype 2023-03-08 11:41:18 +01:00
Sam Lantinga 61309b4382 Disassociate the SDLOpenGLContext from the view before deleting it
If we don't do this, the view will be blanked even if another context is current and rendering from that context won't be visible.

Fixes https://github.com/libsdl-org/SDL/issues/4986
2023-03-08 01:35:21 -08:00
Sam Lantinga 04a03a3eec Use SDL_GL_DeleteContext instead of Cocoa_GL_DeleteContext for context cleanup
That will make the current context NULL before deleting the context.
2023-03-08 01:33:28 -08:00
Sam Lantinga d08338ddc5 Added mapping for the Xbox Elite Core controller connected via Bluetooth on Android 2023-03-06 15:36:49 -08:00
divVerent 6f1f586086
Fix Xbox One gamepad axis assignment on SDL_JOYSTICK_ANDROID API (#7405) 2023-03-06 15:33:18 -08:00
Sam Lantinga f8106d4f30 Fixed build warning
format '%x' expects argument of type 'unsigned int', but argument 2 has type 'Uint32' {aka 'long unsigned int'}
2023-03-06 13:33:52 -08:00
Sam Lantinga c0e7845874 Be more clear about what flags conflicted 2023-03-06 11:43:28 -08:00
Sam Lantinga c69aea887a Fixed permissions for src/video/x11/SDL_x11modes.c 2023-03-06 11:39:21 -08:00
Sam Lantinga 698dbd8464 SDL_CreateWindow() has been simplified and no longer takes a window position. 2023-03-06 09:50:12 -08:00
Sam Lantinga 7905254087 Updated debug print with new SDL_DisplayMode fields 2023-03-06 09:50:12 -08:00
Sylvain a946a34452 Add Drag and drop position, for x11, wayland and MACOSX 2023-03-06 08:44:05 -08:00
Sylvain 813c586edb Change local (void*) to SDL_FunctionPointer 2023-03-06 12:38:38 +01:00
Sylvain 9b065bf54b Fix various warnings: static /void / comma 2023-03-06 12:37:37 +01:00
Sam Lantinga c9aec268fa SDL_GetJoystickIDForPlayerIndex() should return 0 for invalid ID (thanks @AntTheAlchemist!) 2023-03-03 16:15:28 -08:00
Anonymous Maarten 103fbcfc05 cmake: use compatible interface properties to disallow linking to a different version of SDL 2023-03-03 23:40:57 +01:00
Michal Suchanek 987b748067 evdev_kbd: Use current keymap
keymap can change over time, caching the keymap causes wrong keys
returned when user changes keymap during runtime

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
(cherry picked from commit 96a2a6b94515c5a0c920d5ffd64bf83acb74d7a8)
2023-03-03 14:31:20 -08:00
Sam Lantinga 6b87d1938f Added SDL_EVENT_DISPLAY_SCALE_CHANGED 2023-03-03 11:16:31 -08:00