kc3-lang/SDL/src

Branch :


Log

Author Commit Date CI Message
cfab203f 2022-09-29 07:36:14 emscripten: Remove use of EM_ASM from SDL_timer code. Instead use the native emscripten timer API. See https://github.com/emscripten-core/emscripten/issues/17941
40893821 2022-09-29 10:33:07 coreaudio: Add support for SDL_GetDefaultAudioInfo (#6277) Co-authored-by: Ethan Lee <flibitijibibo@gmail.com> Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
69bbe4ce 2022-09-29 15:50:50 Fix memory leak in VITA_GXM_CreateRenderer
e17f0c28 2022-09-27 10:59:28 wayland: Call the Wayland hide/show functions directly when changing decoration modes Calling SDL_HideWindow() to destroy the window is a NOP if the SDL_WINDOW_SHOWN flag was never set. Bypass it and call the Wayland-specific function directly to ensure that the window is always destroyed before switching from server-side to client-side decorations, even if it hasn't been shown yet. Likewise, call Wayland_ShowWindow() directly when the window isn't explicitly hidden to ensure that it is always recreated since the SDL_WINDOW_SHOWN flag won't be cleared, which, when set, renders SDL_ShowWindow() a NOP.
8bcbdc70 2022-09-28 17:40:10 hidapi, libusb: backport read_thread indefinite loop fix from mainstream Mainstream commit: https://github.com/libusb/hidapi/commit/5ce9051e2f2e65013485bc4c83897610df82f3c9
379d4780 2022-09-28 10:25:24 dbus: guard against uninitialized D-Bus Before calling any D-Bus related methods we should first ensure that they were correctly loaded. In the event where `LoadDBUSLibrary()` was not able to load the D-Bus library, we should just return early, signalling with SDL_FALSE that we were unable to inhibit the Screensaver. Helps: https://github.com/ValveSoftware/steam-for-linux/issues/8815 Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
57b5c910 2022-09-28 12:38:32 kmsdrm: only negative devindex's are not allowed ad874536 removed an unnecessary limit as we *can* have a devindex greater than 99, this error message does not reflect the support for values greater than 99.
f6565c32 2022-09-28 09:27:45 coreaudio: Remove redundant variable.
411582c7 2022-09-28 09:22:17 coreaudio: Don't crash on shutdown in a race condition. Fixed #6159.
bb74af1e 2022-09-28 00:01:54 Allow including SDL_uikit_main.c in Apple multi-platform builds This file just won't do anything on macOS
a2c57573 2022-09-01 10:47:24 video: check for "software" with SDL_HINT_FRAMEBUFFER_ACCELERATION. We check for this value elsewhere but not in SDL_CreateWindowFramebuffer.
7becbd7d 2022-09-27 12:58:16 Add joystick locking for controller notifications on iOS/tvOS Fixes https://github.com/libsdl-org/SDL/issues/6288
18eb319a 2022-09-27 12:34:03 Added sensor timestamp for Nintendo Switch controllers
5e3a4030 2022-09-27 11:36:01 Added sensor timestamp for Steam Controllers
57b20e7b 2022-09-27 14:23:42 cocoa: Fix new windows setting SDL_WINDOW_BORDERLESS flag incorrectly. Fixes #6172.
77c7836c 2022-09-27 20:21:24 fix vita build failure after commit 2c518747b
2c518747 2022-09-27 09:56:02 Added microsecond timestamp to sensor values for PS4 and PS5 controllers using the HIDAPI driver
d71df644 2022-09-27 10:21:15 Fixed bug #6287 - SDL_FillRect failed for SDL_Surface with BitsPerPixel == 4
1e1be0b9 2022-09-26 23:00:58 Updated logic to match between PS4/PS5/Switch controllers
8c40a6b0 2022-09-26 22:47:21 Drop PS5 Bluetooth reports that fail CRC check
db075ff3 2022-09-26 22:45:01 Removed unused variable
2ccdd066 2022-09-26 22:32:57 Handle DS4 dongle controller connection and disconnection We also drop Bluetooth packets that fail the CRC check, as recommended by Sony
18046b9a 2022-09-26 20:53:50 Fixed crash with a NULL serial number
67fa6a93 2022-09-26 20:49:26 Don't wait a long time for zombie Bluetooth controllers If a Nintendo Switch Pro controller is turned off, it will leave the controller connected in Windows, but not responding to reports. Don't wait a really long time trying to get information from a controller in this state.
67db8a91 2022-09-26 20:41:51 Wait for input before reconnecting a Bluetooth device On Windows, the Bluetooth device can remain in a connected state if the controller just shut down. It won't return any errors, but it also won't generate any input reports in this state, so wait until we know for sure that the Bluetooth controller is sending data before letting the application know it's available.
71fb91f7 2022-09-26 21:38:09 evdev: Fix build with libudev and joystick subsystem disabled
2cc91761 2022-09-26 18:52:26 Removed debug logging
2c98c8af 2022-09-26 18:39:18 Use better default values for Switch controller calibration
a205c5e2 2022-09-26 18:18:16 Use separate extents for simple and advanced reports
4e375996 2022-09-26 17:06:18 Added a hint to return the version in the old format Workaround for https://github.com/libsdl-org/SDL/issues/6177 for games that can't be updated.
b7fddb4c 2022-09-26 14:39:51 Minor tweaks
39adcc0a 2022-09-26 14:20:34 Prefer USB input over Bluetooth for PS5/PS5/Switch controllers Nintendo Switch controllers will automatically turn off Bluetooth when connected over USB, but this takes care of that a little more quickly. PS4 and PS5 controllers will happily send reports over both Bluetooth and USB, so we'll prefer USB if connected and switch back to Bluetooth if USB is disconnected.
17d7d03a 2022-09-26 08:12:35 Added detection of the joystick type for third party PS4 and PS5 controllers
8d2cb155 2022-09-23 16:56:24 Added an entry for the ZEROPLUS P4 Wired Gamepad
cb063db6 2022-09-23 16:52:37 Moved XInputPS4 controllers into the PS4 controller section
5b3b7e6e 2022-09-23 16:46:36 Separated PS4/PS5 effects support into individual capabilities
33619aa2 2022-09-23 16:38:15 Added support for the ZEROPLUS P4 Wired Gamepad to the HIDAPI driver
e888c99f 2022-09-23 16:26:41 Fixed the entry for the Nacon PS4 Compact Controller
56b91ea7 2022-09-23 15:27:40 Fixed feature detection for the Razer Raiju Tournament Edition controller
4ea64fee 2022-09-23 15:28:32 Fixed manufacturer/product name deduplication for the Razer Raiju Tournament Edition controller
4a06cc0f 2022-09-22 13:03:09 wayland: Apply modifier changes to the text of repeated keys The text component of a repeated keystroke is initially set when a key is first pressed and the cached value remains static until the repeated key is released and another repeatable key is pressed. If the state of a modifier such as shift or capslock is changed while a key is being repeated, the text emitted will not have the modifier applied to it until the repeated key is released and pressed again. Update the text to be repeated by a key if a modifier is changed while a key is actively being repeated.
467c82c7 2022-09-23 12:31:40 wayland: Add mappings for the Escape and NumLock keys The XKB keysym to SDL keycode mappings were missing for the Escape and NumLock keys, which prevented them from being remapped. Add them to the table so that the remapping of these keys will work.
34f928ab 2022-09-23 09:26:18 Generate the correct name for ASTRO Gaming controllers Manufacturer "ASTRO Gaming" and product "ASTRO C40" turns into "ASTRO C40"
6ddef7c2 2022-09-23 09:20:27 Generate the correct name for Qanba and Mad Catz controllers
c2ae2ccc 2022-09-23 09:10:51 Added feature support for the Razer Raiju to the HIDAPI driver
5ea9886b 2022-09-23 13:19:22 haiku: Fix when screen color depth was 24 bits, SDL_GetWindowSurface would always fail with 'Unknown pixel format' error Note that returning SDL_PIXELFORMAT_BGR24 instead of SDL_PIXELFORMAT_RGB24 seems necessary, otherwise when running with SDL_ACCELERATION=0, the red and blue channels of the window appeared swapped. Note that when running with acceleration enabled, red and blue channel swapping does not happen regardless of whether SDL_PIXEL_FORMAT_RGB24 or SDL_PIXEL_FORMAT_BGR24 is returned. For good measure, I also tested running with acceleration disabled in both 15 and 16 bit color depths, but red and blue channel swapping did not occur
51fefd1c 2022-09-23 02:39:35 Added support for third party PS3 controllers to the HIDAPI driver
5b4c10fc 2022-09-23 02:36:53 Return true from IsSupportedDevice if it's a device that we _might_ support This forces an update of the device list so we have the correct state when we check to see whether a device is being handled by HIDAPI
1d34a524 2022-09-23 00:38:23 Fixed shadowed variable warning
010d3e64 2022-09-23 00:36:46 Fixed function prototype mismatch
b7940c29 2022-09-23 00:15:40 Allow HIDAPI controllers to override the default joystick type
899a1e7c 2022-09-22 23:54:26 Skip PS4/PS5 probe message if we already know it's a supported controller
fa2063fb 2022-09-22 23:42:25 Improved detection of third party PS4 and PS5 controllers
aa2e2f48 2022-09-22 18:22:17 Make sure HID devices can be opened before making them available to the application This prevents a number of issues where devices are enumerated but not actually able to be opened, like https://github.com/libsdl-org/SDL/issues/5781. We currently leave the devices open, allowing us to more easily do controller feature detection, protocol negotiation, detect dropped Bluetooth connections, etc. with the expectation that the application is likely to open the controllers shortly.
2857e3c7 2022-09-22 15:53:32 Added an entry for the Mad Catz FightStick TE 2+ PS3
6812f1b5 2022-09-22 15:16:34 Fixed the entry for the HORI Fighting Commander 4 in PS4 mode
99e85cc2 2022-09-22 10:10:20 Accidentally reverted https://github.com/libsdl-org/SDL/commit/172865ff137532123ec06177119be163ba1811f5
6cbdc666 2022-09-22 09:05:06 Fixed use of uninitialized 'size' variable (thanks @ozkan!)
0c4594ac 2022-09-22 06:45:46 Improved PS4 and PS5 third-party controller feature detection
399cb2f0 2022-09-21 13:20:39 wayland: Only clear the key repeat flag when the repeated key is released If multiple keys were simultaneously depressed and one was being repeated, the repeat flag was being cleared when any of the pressed keys were released, even if the released key wasn't the one being repeated. This tracks the key currently being repeated and only clears the repeat flag when the particular key being repeated is released.
eb25f6c9 2022-09-21 14:22:38 Fixed Xbox platform name, courtesy of @walbourn
00b67f55 2022-09-21 10:30:38 Fix potential memory leak in GLES_CreateTexture
301912a5 2022-09-18 21:25:55 Fix: Use WIN_ClientPointToSDL for converting additional mouse coordinates
08a33184 2022-09-18 21:40:15 Vita: fix controls on PSTV with opened IME
dc2a682a 2022-09-20 09:22:43 Use the right kind of 0
24619306 2022-09-20 09:16:10 Fixed build on RISC OS
887ae0c6 2022-09-20 18:20:00 fix build failure after commit 2a8d00634ddf if strtod isn't available.
2a8d0063 2022-09-20 07:25:49 Fixed scanning a negative number as an unsigned value e.g. sscanf("-1", "%zu", &v) Thanks to @sezero for the test case
3f5c4666 2022-09-20 11:56:40 SDL_vsscanf: fix an uninitialized warning
216e3f10 2022-09-19 15:42:11 Implemented size_t format specifiers for SDL_snprintf() and SDL_sscanf() Fixes https://github.com/libsdl-org/SDL/issues/6264
101306ed 2022-09-19 14:37:10 Do case insensitive matching on test cases
8598f05b 2022-09-17 21:45:08 Support loading 2bpp .bmp files
1f7a7fd9 2022-09-17 21:30:40 haiku: Combine HAIKU_ColorSpaceToBitsPerPixel and HAIKU_BPPToSDLPxFormat
43fc6d59 2022-09-08 15:53:54 Fix incorrect return value in X11_GetPixelFormatFromVisualInfo
7115ceb7 2022-09-17 11:52:19 Vita: restore sceClibMemcmp
2e9f5b59 2022-09-16 15:41:35 Added support for the HORI Fighting Commander OCTA (Xbox Series X and PS versions)
5fba31f6 2022-09-17 00:51:00 SDL_HasPrimarySelectionText: fix -Wunreachable-code-return warning.
efe01faa 2022-09-16 10:08:31 Replaced Blit4to4CopyAlpha() with optimized SDL_BlitCopy() Fixes https://github.com/libsdl-org/SDL/issues/6241
c0baa6bf 2022-09-16 20:03:50 move SDL_windowstaskdialog.h contents into SDL_windowsmessagebox.c Silences clang -Wpragma warnings: D:/a/SDL/SDL/src/video/windows/SDL_windowstaskdialog.h:21:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack] #include <pshpack1.h> ^ D:/a/_temp/msys64/clang64/include/pshpack1.h:7:9: note: previous '#pragma pack' directive that modifies alignment is here #pragma pack(push,1) ^ In file included from D:/a/SDL/SDL/src/video/windows/SDL_windowsmessagebox.c:35: D:/a/SDL/SDL/src/video/windows/SDL_windowstaskdialog.h:156:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack] #include <poppack.h> ^ note: previous '#pragma pack' directive that modifies alignment is here 2 warnings generated. Closes: https://github.com/libsdl-org/SDL/issues/6240
82b40f09 2022-09-16 09:55:20 Fixed runaway CPU usage in the metal renderer when the window is minimized
5892ed43 2022-09-16 09:44:39 Fixed Xcode warnings on macOS
910d499c 2022-09-16 09:19:20 Fixed comment typo
172865ff 2022-09-16 09:16:18 Don't enumerate HID devices on macOS if we don't have input monitoring permissions Unfortunately the only way to detect this is to actually try opening a device, so we wait until the application tries, and then stop enumerating afterwards. Fixes https://github.com/libsdl-org/SDL/issues/5781
eb046958 2022-09-16 08:19:45 Fixed build warning
e2753e19 2022-09-15 08:02:14 Calculate simulated vsync interval based on display refresh rate
208964f0 2022-09-15 07:05:55 Reset the simulated vsync presentation timeline if it's been too long since the last present
1663cb41 2022-09-15 06:30:19 Reset simulated presentation timeline when vsync status changes
d744aafb 2022-09-15 01:00:12 Added support for simulated vsync in the renderer This kicks in if the platform doesn't support vsync directly, or if the present fails for some reason (e.g. minimized on some platforms) Fixes https://github.com/libsdl-org/SDL/issues/5134
339f7a2f 2022-09-16 17:28:20 SDL_windows.h: guard WIN32_LEAN_AND_MEAN and STRICT macro defines. also define them as 1, instead of empty. Reference issue: https://github.com/libsdl-org/SDL/issues/6239
c23fb235 2022-09-16 17:20:56 SDL_render_d3d12.c: Fix uninitialized warning for CreateEventExFunc
d86cb8ec 2022-09-16 17:05:02 SDL_offscreenwindow.c: swap include order of SDL_egl_c.h/SDL_sysvideo.h Fixes redefinition warnings from windows builds. Reference issue: https://github.com/libsdl-org/SDL/issues/6239
5bc85d67 2022-09-16 06:15:45 Only advertise the SDL_PIXELFORMAT_EXTERNAL_OES format if we can build the shader for it
6de15ffc 2022-09-15 12:04:08 Fixed building offscreen video driver without EGL support Also did miscellaneous style cleanup for consistency with other code
2970710b 2022-09-15 07:41:29 Pretty print shaders for debugging purposes
bc57d3e3 2022-09-15 06:57:41 Fixed OpenGL ES shader compilation on Linux
8a15a738 2022-09-15 06:21:19 Fixed uninitialized variable warning
ac5b9bc4 2022-09-14 18:28:35 Add support for X11 primary selection (#6132) X11 has a so-called primary selection, which you can use by marking text and middle-clicking elsewhere to copy the marked text. There are 3 new API functions in `SDL_clipboard.h`, which work exactly like their clipboard equivalents. ## Test Instructions * Run the tests (just a copy of the clipboard tests): `$ ./test/testautomation --filter Clipboard` * Build and run this small application: <details> ```C #include <SDL.h> #include <unistd.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <time.h> void print_error(const char *where) { const char *errstr = SDL_GetError(); if (errstr == NULL || errstr[0] == '\0') return; fprintf(stderr, "SDL Error after '%s': %s\n", where, errstr); SDL_ClearError(); } int main() { char text_buf[256]; srand(time(NULL)); SDL_Init(SDL_INIT_VIDEO); print_error("SDL_INIT()"); SDL_Window *window = SDL_CreateWindow("Primary Selection Test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 400, 400, SDL_WINDOW_SHOWN); print_error("SDL_CreateWindow()"); SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); print_error("SDL_CreateRenderer()"); bool quit = false; unsigned int do_render = 0; while (!quit) { SDL_Event event; while (SDL_PollEvent(&event)) { print_error("SDL_PollEvent()"); switch (event.type) { case SDL_QUIT: { quit = true; break; } case SDL_KEYDOWN: { switch (event.key.keysym.sym) { case SDLK_ESCAPE: case SDLK_q: quit = true; break; case SDLK_c: snprintf(text_buf, sizeof(text_buf), "foo%d", rand()); SDL_SetClipboardText(text_buf); print_error("SDL_SetClipboardText()"); printf("clipboard: set_to=\"%s\"\n", text_buf); break; case SDLK_v: { printf("clipboard: has=%d, ", SDL_HasClipboardText()); print_error("SDL_HasClipboardText()"); char *text = SDL_GetClipboardText(); print_error("SDL_GetClipboardText()"); printf("text=\"%s\"\n", text); SDL_free(text); break; } case SDLK_d: snprintf(text_buf, sizeof(text_buf), "bar%d", rand()); SDL_SetPrimarySelectionText(text_buf); print_error("SDL_SetPrimarySelectionText()"); printf("primselec: set_to=\"%s\"\n", text_buf); break; case SDLK_f: { printf("primselec: has=%d, ", SDL_HasPrimarySelectionText()); print_error("SDL_HasPrimarySelectionText()"); char *text = SDL_GetPrimarySelectionText(); print_error("SDL_GetPrimarySelectionText()"); printf("text=\"%s\"\n", text); SDL_free(text); break; } default: break; } break; } default: { break; }} } // create less noise with WAYLAND_DEBUG=1 if (do_render == 0) { SDL_RenderPresent(renderer); print_error("SDL_RenderPresent()"); } do_render += 1; usleep(12000); } SDL_DestroyRenderer(renderer); SDL_DestroyWindow(window); SDL_Quit(); print_error("quit"); return 0; } ``` </details> * Use c,v,d,f to get and set the clipboard and primary selection. * Mark text and middle-click also in other applications. * For wayland under x: * `$ mutter --wayland --no-x11 --nested` * `$ XDG_SESSION_TYPE=wayland SDL_VIDEODRIVER=wayland ./<path_to_test_appl_binary>`
72fe6cc8 2022-09-14 09:14:47 Updated to the latest version of OpenGL and Vulkan headers from the Khronos registry Fixes https://github.com/libsdl-org/SDL/issues/6193
b5102a55 2022-09-14 08:03:46 Fixed OpenGLES shaders failing after renderer has been created Cache all the shaders up front, so we can verify that they won't silently fail at runtime. If compiling the fragment shaders with the precision hint fails, try again without specifying precision. Fixes https://github.com/libsdl-org/SDL/issues/6166 Fixes https://github.com/libsdl-org/SDL/issues/6174
228b9fb5 2022-09-14 03:43:16 Update SDL_windowswindow.c (#6225) Clip rectangle set to int(left+width/2) , int(top+height/2) , int(left+width/2)+1 , int(top+height/2)+1 a 1x1 box On even-valued resolution, cursor is stable at bottom-right central pixel On odd-valued resolution, cursor is stable at exact central pixel. this is the desired behaviour