Log

Author Commit Date CI Message
Sam Lantinga 6ddef7c2 2022-09-23T09:20:27 Generate the correct name for Qanba and Mad Catz controllers
Sam Lantinga c2ae2ccc 2022-09-23T09:10:51 Added feature support for the Razer Raiju to the HIDAPI driver
UnknownShadow200 5ea9886b 2022-09-23T13: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
Sam Lantinga 51fefd1c 2022-09-23T02:39:35 Added support for third party PS3 controllers to the HIDAPI driver
Sam Lantinga 5b4c10fc 2022-09-23T02: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
Sam Lantinga 1d34a524 2022-09-23T00:38:23 Fixed shadowed variable warning
Sam Lantinga 010d3e64 2022-09-23T00:36:46 Fixed function prototype mismatch
Sam Lantinga b7940c29 2022-09-23T00:15:40 Allow HIDAPI controllers to override the default joystick type
Sam Lantinga 899a1e7c 2022-09-22T23:54:26 Skip PS4/PS5 probe message if we already know it's a supported controller
Sam Lantinga fa2063fb 2022-09-22T23:42:25 Improved detection of third party PS4 and PS5 controllers
Sam Lantinga 7312b93d 2022-09-22T22:50:28 Fixed crash if a game controller is disconnected while the connect message is in flight
Sam Lantinga aa2e2f48 2022-09-22T18: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.
Sam Lantinga 2857e3c7 2022-09-22T15:53:32 Added an entry for the Mad Catz FightStick TE 2+ PS3
Sam Lantinga 6812f1b5 2022-09-22T15:16:34 Fixed the entry for the HORI Fighting Commander 4 in PS4 mode
Sam Lantinga 99e85cc2 2022-09-22T10:10:20 Accidentally reverted https://github.com/libsdl-org/SDL/commit/172865ff137532123ec06177119be163ba1811f5
Sam Lantinga 6cbdc666 2022-09-22T09:05:06 Fixed use of uninitialized 'size' variable (thanks @ozkan!)
Sam Lantinga 0c4594ac 2022-09-22T06:45:46 Improved PS4 and PS5 third-party controller feature detection
Frank Praznik 399cb2f0 2022-09-21T13: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.
Sam Lantinga eb25f6c9 2022-09-21T14:22:38 Fixed Xbox platform name, courtesy of @walbourn
Ozkan Sezer 098a7a04 2022-09-21T10:37:02 add missing quotes to the fallback CHECK_OBJC_SOURCE_COMPILES macro Closes: https://github.com/libsdl-org/SDL/issues/6268 .
zhailiangliang 00b67f55 2022-09-21T10:30:38 Fix potential memory leak in GLES_CreateTexture
past-due 301912a5 2022-09-18T21:25:55 Fix: Use WIN_ClientPointToSDL for converting additional mouse coordinates
Ivan Epifanov 08a33184 2022-09-18T21:40:15 Vita: fix controls on PSTV with opened IME
Ozkan Sezer db225dec 2022-09-20T20:03:20 autotools: stop using AC_FUNC_MEMCMP and AC_FUNC_STRTOD Closes: https://github.com/libsdl-org/SDL/issues/6266 .
Sam Lantinga dc2a682a 2022-09-20T09:22:43 Use the right kind of 0
Sam Lantinga 24619306 2022-09-20T09:16:10 Fixed build on RISC OS
Ozkan Sezer 887ae0c6 2022-09-20T18:20:00 fix build failure after commit 2a8d00634ddf if strtod isn't available.
Sam Lantinga 2a8d0063 2022-09-20T07:25:49 Fixed scanning a negative number as an unsigned value e.g. sscanf("-1", "%zu", &v) Thanks to @sezero for the test case
Ozkan Sezer 3f5c4666 2022-09-20T11:56:40 SDL_vsscanf: fix an uninitialized warning
Sam Lantinga 216e3f10 2022-09-19T15:42:11 Implemented size_t format specifiers for SDL_snprintf() and SDL_sscanf() Fixes https://github.com/libsdl-org/SDL/issues/6264
Sam Lantinga c70ffc2a 2022-09-19T15:34:17 Added size_t format specifier test coverage for SDL_snprintf and SDL_sscanf
Sam Lantinga 101306ed 2022-09-19T14:37:10 Do case insensitive matching on test cases
Anonymous Maarten 3b20e0ec 2022-09-19T02:38:36 cmake: only add -Wl,--undefined=WinMain when building an executable
Ozkan Sezer c8332948 2022-09-18T17:33:04 tests, watcom: silence lots of W202 warnings from new vulkan headers.
Cameron Cawley 8598f05b 2022-09-17T21:45:08 Support loading 2bpp .bmp files
Cameron Cawley 1f7a7fd9 2022-09-17T21:30:40 haiku: Combine HAIKU_ColorSpaceToBitsPerPixel and HAIKU_BPPToSDLPxFormat
Cameron Cawley dd51787e 2022-09-08T15:53:25 Fix SDL_PIXELFORMAT_INDEX1LSB test case
Cameron Cawley 43fc6d59 2022-09-08T15:53:54 Fix incorrect return value in X11_GetPixelFormatFromVisualInfo
Ivan Epifanov 202dfea5 2022-09-17T14:12:13 Vita: drop memory defines
Ivan Epifanov 7115ceb7 2022-09-17T11:52:19 Vita: restore sceClibMemcmp
Sam Lantinga 2e9f5b59 2022-09-16T15:41:35 Added support for the HORI Fighting Commander OCTA (Xbox Series X and PS versions)
Ozkan Sezer 5fba31f6 2022-09-17T00:51:00 SDL_HasPrimarySelectionText: fix -Wunreachable-code-return warning.
Sam Lantinga efe01faa 2022-09-16T10:08:31 Replaced Blit4to4CopyAlpha() with optimized SDL_BlitCopy() Fixes https://github.com/libsdl-org/SDL/issues/6241
Ozkan Sezer c0baa6bf 2022-09-16T20: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
Sam Lantinga 82b40f09 2022-09-16T09:55:20 Fixed runaway CPU usage in the metal renderer when the window is minimized
Sam Lantinga 5892ed43 2022-09-16T09:44:39 Fixed Xcode warnings on macOS
Sam Lantinga 910d499c 2022-09-16T09:19:20 Fixed comment typo
Sam Lantinga 172865ff 2022-09-16T09: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
Sam Lantinga eb046958 2022-09-16T08:19:45 Fixed build warning
Sam Lantinga 8fc133ac 2022-09-16T08:18:42 Updated Xcode project with new offscreen video driver files
Sam Lantinga e2753e19 2022-09-15T08:02:14 Calculate simulated vsync interval based on display refresh rate
Sam Lantinga 208964f0 2022-09-15T07:05:55 Reset the simulated vsync presentation timeline if it's been too long since the last present
Sam Lantinga 1663cb41 2022-09-15T06:30:19 Reset simulated presentation timeline when vsync status changes
Sam Lantinga d744aafb 2022-09-15T01: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
Ozkan Sezer 339f7a2f 2022-09-16T17: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
Ozkan Sezer c23fb235 2022-09-16T17:20:56 SDL_render_d3d12.c: Fix uninitialized warning for CreateEventExFunc
Ozkan Sezer d86cb8ec 2022-09-16T17: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
Sam Lantinga 5bc85d67 2022-09-16T06:15:45 Only advertise the SDL_PIXELFORMAT_EXTERNAL_OES format if we can build the shader for it
Sam Lantinga 6de15ffc 2022-09-15T12:04:08 Fixed building offscreen video driver without EGL support Also did miscellaneous style cleanup for consistency with other code
Sam Lantinga cc9638f2 2022-09-15T11:08:00 Regenerated configure
quyykk 37effc77 2022-09-15T19:39:35 Build the offscreen video driver by default.
Sam Lantinga 2970710b 2022-09-15T07:41:29 Pretty print shaders for debugging purposes
Sam Lantinga bc57d3e3 2022-09-15T06:57:41 Fixed OpenGL ES shader compilation on Linux
Sam Lantinga 8a15a738 2022-09-15T06:21:19 Fixed uninitialized variable warning
Sam Lantinga 61201e06 2022-09-15T06:17:49 Removed obsolete extension definitions Fixes https://github.com/libsdl-org/SDL/issues/6231
Ozkan Sezer 6dec78ed 2022-09-15T11:55:04 fix permissions of SDL_opengl_glext.h
Ozkan Sezer 2e24708a 2022-09-15T11:23:50 Makefile.w32: silence lots of W202 warnings from new vulkan headers
SDL Wiki Bot c49faabb 2022-09-14T16:29:16 Sync SDL wiki -> header
DS ac5b9bc4 2022-09-14T18: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>`
Sam Lantinga 72fe6cc8 2022-09-14T09: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
Sam Lantinga b5102a55 2022-09-14T08: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
xeonmc 228b9fb5 2022-09-14T03: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
Frank Praznik 929d5b80 2022-09-12T22:39:44 wayland: Use the backbuffer size for determining if a resize event is required In some cases, a backbuffer size update may not be accompanied by a resize event if the window size and/or scale were updated before the new backbuffer size was recomputed. Instead of the scale, use the old/new backbuffer sizes to determine if a resize event is required so that a backbuffer size change will always be followed by a resize event.
Sam Lantinga 4f1b408a 2022-09-12T18:19:02 Fixed button mapping for PS5 controllers
Rinnegatamante eb0bf2c2 2022-09-12T21:52:39 vita: Drop memcmp redirect to sceClibMemcmp.
Ozkan Sezer 5b2884cb 2022-09-12T20:28:00 apply commit d0a3570300812bc81888e7a7eadb9311621dc9a7 to cmake side too.
Ozkan Sezer d9364996 2022-09-12T20:20:04 regenerated configure script.
Sam James d0a35703 2022-09-12T18:02:21 configure.ac: fix configure tests broken with Clang 15 (implicit function declarations) Clang 15 makes implicit function declarations fatal by default which leads to some configure tests silently failing/returning the wrong result. Signed-off-by: Sam James <sam@gentoo.org>
Amir 7f415ce5 2022-09-12T20:09:00 android: fix some compiler warnings
Anonymous Maarten 6dfd7a17 2022-09-10T15:53:11 cmake: forward HAVE_LIBUSB to HAVE_HIDAPI_LIBUSB
Anonymous Maarten c3495ec6 2022-09-10T14:11:19 Fix value of SDL_HIDAPI_DISABLED
Anonymous Maarten 19b13aab 2022-09-10T13:41:29 cmake: mark hidapi as disabled when not found
Frank Praznik edfb00c2 2022-09-09T14:26:44 wayland: Only commit on move if the display was changed Only commit on a move event if the display was changed for a fullscreen window and the compositor has returned bad dimensions.
Frank Praznik 97a5e744 2022-09-06T17:08:27 wayland: Remove duplicate code Wayland_SetWindowSize() can be simplified with the common CommitWindowGeometry() function.
Frank Praznik 78f843f7 2022-09-06T13:19:23 wayland: Remove unnecessary function parameter SetFullscreen() is never called in a case where the commit parameter is false anymore, so the parameter is unnecessary.
Frank Praznik 69e4c770 2022-09-04T12:18:38 video: Make the mode switching function a NOP if mode switching is disabled Instead of wrapping individual calls to SDL_SetDisplayModeForDisplay(), just check the flag in the function itself and make it a NOP that cannot fail if the flag is set. Silences some errant "SDL video driver doesn't support changing display mode" log errors.
Frank Praznik 768b6728 2022-09-04T23:39:05 wayland: Compare against the old scale when resizing Compare against the old scale instead of the new or the conditional will always be true.
Frank Praznik 07aea476 2022-09-03T13:30:49 wayland: Ignore content sizes from libdecor when hiding a window When hiding a window, libdecor can report bogus content region sizes that are +/- the height of the title bar. Ignore any size values from libdecor when hiding a window, or the size may be incorrect when restored.
Frank Praznik 6de12b4a 2022-09-06T13:30:19 wayland: Update the internal state when the compositor moves a fullscreen window The compositor can arbitrarily move windows between displays, including fullscreen windows. Update the internal state when a fullscreen window is moved so the internal SDL state accurately reflects the window location, and resize the window to fit the new display. This also fixes an edge case where the compositor can make a window fullscreen on a different display than SDL thinks it will be on (usually when a window is made fullscreen by the compositor while straddling multiple displays), which can result in the window being incorrectly sized.
Frank Praznik a7d34595 2022-09-03T13:11:29 wayland: Trigger a commit on fullscreen update If additional fullscreen requests are received when the window is already fullscreen, it is typically due to the fullscreen flags or emulated video mode being changed. A commit must be explicitly triggered or the requested changes won't take effect until some other event, such as a resize or focus change, causes the changes to be committed.
Frank Praznik 707b561f 2022-09-03T12:37:02 wayland: Enable compositor fullscreen toggling The compositor can toggle the fullscreen state (via a hotkey or otherwise), so the internal SDL state must be updated accordingly when it does. When toggling fullscreen via the compositor, SDL will attempt to use the last fullscreen flag explicitly set. If no flag was previously set, SDL_WINDOW_FULLSCREEN will be used if a window video mode was set, otherwise SDL_WINDOW_FULLSCREEN_DESKTOP will be used. If the previous flag was SDL_WINDOW_FULLSCREEN and the window video mode was cleared, it will revert to SDL_WINDOW_FULLSCREEN_DESKTOP.
Frank Praznik 31979e2d 2022-09-02T18:41:21 wayland: Add missing static qualifiers
Taiko2k 1c88a052 2022-09-09T16:03:17 Update Wayland cursors to match X11 cursors
Sam Lantinga 9f4baeea 2022-09-08T20:08:20 Clean up thread local storage when quitting SDL SDL_Quit() should be the last SDL API that you call before exiting your application, and is intended to clean up all internal state. If real-life applications are relying on thread-local storage after SDL_Quit() we could potentially add a hint to control this behavior. Fixes https://github.com/libsdl-org/SDL/issues/6200
Sam Lantinga a3900a75 2022-09-08T13:59:25 Lock joysticks when removing a controller on the WGI thread
Sam Lantinga 12413ab3 2022-09-08T13:33:04 Lock joysticks while attaching a virtual one
Ozkan Sezer 787cd580 2022-09-08T23:00:04 silence unused function warning for SDL_endswith() on non-linux.
Sam Lantinga 40715732 2022-09-08T11:50:56 Don't try to second guess DS4Windows, let it remap things as expected. DS4Windows can create both emulated Xbox and emulated PS4 controllers, and we don't know which the user has it doing, so don't try to second guess it, just let it do it's thing. Users should follow the remapping software recommendations on when to enable/disable it for various situations. Fixes https://github.com/libsdl-org/SDL/issues/6167
Sam Lantinga a0f16960 2022-09-08T09:53:24 Fixed the CRC in the mappings for PS2, PSP, and Vita controllers
Sylvain 90a480a1 2022-09-08T05:44:39 Fixed bug #6199 - Broken clip behaviour on a render target (metal)