From b7457ff61b0b520b9d94ef77fe6a410a6c8141f4 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 4 Aug 2024 15:52:16 +0200 Subject: [PATCH 01/18] cmake: SDL2 target is not always available (cherry picked from commit 7cf3234efeb7a68636bcfdfb3b1507b43fbb0845) --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 284c2a6f567a3..a214d734e2c03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3520,7 +3520,10 @@ if(SDL_TEST) endif() if(MSVC AND NOT SDL_LIBC) - set(targets SDL2) + set(targets ) + if(TARGET SDL2) + list(APPEND targets SDL2) + endif() if(TARGET SDL2-static) list(APPEND targets SDL2-static) endif() From 0b25cd2196d1f1764c4bc5d65ea66717b3d124e5 Mon Sep 17 00:00:00 2001 From: vanfanel Date: Thu, 18 Jul 2024 21:21:52 +0200 Subject: [PATCH 02/18] Fix KMSDRM double buffering. (cherry picked from commit 5ab1151508ef514b9c5f944da8fc1f3dd6ea0558) --- src/video/kmsdrm/SDL_kmsdrmopengles.c | 2 +- src/video/kmsdrm/SDL_kmsdrmvideo.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/video/kmsdrm/SDL_kmsdrmopengles.c b/src/video/kmsdrm/SDL_kmsdrmopengles.c index 9b34d68961527..cbf86c9498c54 100644 --- a/src/video/kmsdrm/SDL_kmsdrmopengles.c +++ b/src/video/kmsdrm/SDL_kmsdrmopengles.c @@ -194,7 +194,7 @@ int KMSDRM_GLES_SwapWindow(_THIS, SDL_Window *window) we have waited here, there won't be a pending pageflip so the WaitPageflip at the beginning of this function will be a no-op. Just leave it here and don't worry. - Run your SDL2 program with "SDL_KMSDRM_DOUBLE_BUFFER=1 " + Run your SDL2 program with "SDL_VIDEO_DOUBLE_BUFFER=1 " to enable this. */ if (windata->double_buffer) { if (!KMSDRM_WaitPageflip(_this, windata)) { diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c index e4457921c46ae..307b4b67c2f59 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -1478,6 +1478,12 @@ int KMSDRM_CreateWindow(_THIS, SDL_Window *window) windata->viddata = viddata; window->driverdata = windata; + /* Do we want a double buffering scheme to get low video lag? */ + windata->double_buffer = SDL_FALSE; + if (SDL_GetHintBoolean(SDL_HINT_VIDEO_DOUBLE_BUFFER, SDL_FALSE)) { + windata->double_buffer = SDL_TRUE; + } + if (!is_vulkan && !vulkan_mode) { /* NON-Vulkan block. */ /* Maybe you didn't ask for an OPENGL window, but that's what you will get. From 1e2aa2363b261513d2fa553a223f442270d0e716 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 4 Aug 2024 19:21:06 -0700 Subject: [PATCH 03/18] Implemented left-justification in SDL_PrintString() Fixes https://github.com/libsdl-org/SDL/issues/10310 (cherry picked from commit f59d66f4b1f99ae61a3e776933eda7ccdbc1ab0a) (cherry picked from commit 2efbe7fa3fc8c320a62c66bdb6604951e3f35abd) --- src/stdlib/SDL_string.c | 26 +++++++++++++++++--------- test/testautomation_stdlib.c | 12 ++++++++++++ 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c index b66163ce6eff5..3f26e8d903686 100644 --- a/src/stdlib/SDL_string.c +++ b/src/stdlib/SDL_string.c @@ -1529,7 +1529,7 @@ typedef enum typedef struct { - SDL_bool left_justify; /* for now: ignored. */ + SDL_bool left_justify; SDL_bool force_sign; SDL_bool force_type; /* for now: used only by float printer, ignored otherwise. */ SDL_bool pad_zeroes; @@ -1541,6 +1541,9 @@ typedef struct static size_t SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, const char *string) { + const char fill = (info && info->pad_zeroes) ? '0' : ' '; + size_t width = 0; + size_t filllen = 0; size_t length = 0; size_t slen, sz; @@ -1550,24 +1553,29 @@ static size_t SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, c sz = SDL_strlen(string); if (info && info->width > 0 && (size_t)info->width > sz) { - const char fill = info->pad_zeroes ? '0' : ' '; - size_t width = info->width - sz; - size_t filllen; - + width = info->width - sz; if (info->precision >= 0 && (size_t)info->precision < sz) { width += sz - (size_t)info->precision; } filllen = SDL_min(width, maxlen); - SDL_memset(text, fill, filllen); - text += filllen; - maxlen -= filllen; - length += width; + if (!info->left_justify) { + SDL_memset(text, fill, filllen); + text += filllen; + maxlen -= filllen; + length += width; + filllen = 0; + } } SDL_strlcpy(text, string, maxlen); length += sz; + if (filllen > 0) { + SDL_memset(text + sz, fill, filllen); + length += width; + } + if (info) { if (info->precision >= 0 && (size_t)info->precision < sz) { slen = (size_t)info->precision; diff --git a/test/testautomation_stdlib.c b/test/testautomation_stdlib.c index ed9f13ea35d98..969dd39b4810e 100644 --- a/test/testautomation_stdlib.c +++ b/test/testautomation_stdlib.c @@ -62,6 +62,18 @@ int stdlib_snprintf(void *arg) SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", (int)SDL_strlen(text), result); + result = SDL_snprintf(text, sizeof(text), "%10sA", "foo"); + expected = " fooA"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%10sA\", \"foo\")"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", (int)SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%-10sA", "foo"); + expected = "foo A"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%-10sA\", \"foo\")"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", (int)SDL_strlen(text), result); + result = SDL_snprintf(text, sizeof(text), "%S", L"foo"); expected = "foo"; SDLTest_AssertPass("Call to SDL_snprintf(\"%%S\", \"foo\")"); From 4222cebef697cc6f3e0759b05585c4b00d5df65e Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 16 May 2024 17:54:13 +0200 Subject: [PATCH 04/18] Use SDL_test + don't use macros The structure of the existing loop makes the inner loop of the previous commit unnecessary. Manual backport of 558630d59c2db73ac7c0c0cae000e4bee6ef42cf (cherry picked from commit 62f35ab1b6fe482d74b9d7f791acbed363dc500b) --- src/sensor/android/SDL_androidsensor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sensor/android/SDL_androidsensor.c b/src/sensor/android/SDL_androidsensor.c index 3f57253cd1932..c06faf2ee4289 100644 --- a/src/sensor/android/SDL_androidsensor.c +++ b/src/sensor/android/SDL_androidsensor.c @@ -161,7 +161,7 @@ static void SDL_ANDROID_SensorUpdate(SDL_Sensor *sensor) ASensorEvent event; struct android_poll_source *source; - if (ALooper_pollAll(0, NULL, &events, (void **)&source) == LOOPER_ID_USER) { + if (ALooper_pollOnce(0, NULL, &events, (void **)&source) == LOOPER_ID_USER) { SDL_zero(event); while (ASensorEventQueue_getEvents(sensor->hwdata->eventqueue, &event, 1) > 0) { SDL_PrivateSensorUpdate(sensor, 0, event.data, SDL_arraysize(event.data)); From 07cfc34a2ead14a461ce36a5d7fb570b1291d359 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 6 Aug 2024 05:45:48 -0700 Subject: [PATCH 05/18] Added detail about why a file couldn't be opened (thanks mgerhardy!) Fixes https://github.com/libsdl-org/SDL/issues/10484 (cherry picked from commit 15120133202da5980c17b4bf363b5fdb6f32de6b) --- src/file/SDL_rwops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/file/SDL_rwops.c b/src/file/SDL_rwops.c index bf47ba7110b4d..444bf4af3d5c5 100644 --- a/src/file/SDL_rwops.c +++ b/src/file/SDL_rwops.c @@ -36,6 +36,7 @@ #ifdef HAVE_STDIO_H #include +#include #include #endif #ifdef HAVE_LIMITS_H @@ -632,7 +633,7 @@ SDL_RWops *SDL_RWFromFile(const char *file, const char *mode) FILE *fp = fopen(file, mode); #endif if (!fp) { - SDL_SetError("Couldn't open %s", file); + SDL_SetError("Couldn't open %s: %s", file, strerror(errno)); } else if (!IsRegularFileOrPipe(fp)) { fclose(fp); fp = NULL; From 403f87340fe4464ff7d194e641bc36de02b627b8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 7 Aug 2024 12:15:00 -0700 Subject: [PATCH 06/18] Fixed crash when the current mouse capture window is destroyed Fixes https://github.com/libsdl-org/SDL/issues/10494 (cherry picked from commit 91d97a367e9e15bb2067ed0594798dc54c862bb1) (cherry picked from commit 5ca0639a42c25f3c282b9704da4bf28028ea0ae7) --- src/video/SDL_video.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 1df2359ea7feb..04a1fdf652456 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -3303,6 +3303,9 @@ void SDL_DestroyWindow(SDL_Window *window) if (SDL_GetKeyboardFocus() == window) { SDL_SetKeyboardFocus(NULL); } + if ((window->flags & SDL_WINDOW_MOUSE_CAPTURE)) { + SDL_UpdateMouseCapture(SDL_TRUE); + } if (SDL_GetMouseFocus() == window) { SDL_SetMouseFocus(NULL); } From f75b0aa814ed46a1ea7cf3f2f99c33429db9466d Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 7 Aug 2024 18:13:00 -0700 Subject: [PATCH 07/18] kmsdrm: free the connector when looking for available devices Fixes https://github.com/libsdl-org/SDL/issues/10499 (cherry picked from commit 1a57ea7fba9eda1e57f19f174f35201840234553) (cherry picked from commit a5bff78d812f8387474fe5e824a49b48312598eb) --- src/video/kmsdrm/SDL_kmsdrmvideo.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c index 307b4b67c2f59..5510a4cb550b7 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -97,7 +97,7 @@ static int get_driindex(void) SDL_strlcpy(device + kmsdrm_dri_pathsize, kmsdrm_dri_devname, sizeof(device) - kmsdrm_dri_devnamesize); - while((res = readdir(folder)) != NULL) { + while((res = readdir(folder)) != NULL && available < 0) { if (SDL_memcmp(res->d_name, kmsdrm_dri_devname, kmsdrm_dri_devnamesize) == 0) { SDL_strlcpy(device + kmsdrm_dri_pathsize + kmsdrm_dri_devnamesize, @@ -123,7 +123,7 @@ static int get_driindex(void) resources->count_encoders > 0 && resources->count_crtcs > 0) { available = -ENOENT; - for (i = 0; i < resources->count_connectors; i++) { + for (i = 0; i < resources->count_connectors && available < 0; i++) { drmModeConnector *conn = KMSDRM_drmModeGetConnector( drm_fd, resources->connectors[i]); @@ -134,20 +134,21 @@ static int get_driindex(void) if (conn->connection == DRM_MODE_CONNECTED && conn->count_modes) { + SDL_bool access_denied = SDL_FALSE; if (SDL_GetHintBoolean( SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER, SDL_TRUE)) { /* Skip this device if we can't obtain * DRM master */ KMSDRM_drmSetMaster(drm_fd); - if (KMSDRM_drmAuthMagic(drm_fd, 0) == - -EACCES) { - continue; + if (KMSDRM_drmAuthMagic(drm_fd, 0) == -EACCES) { + access_denied = SDL_TRUE; } } - available = devindex; - break; + if (!access_denied) { + available = devindex; + } } KMSDRM_drmModeFreeConnector(conn); @@ -158,11 +159,10 @@ static int get_driindex(void) SDL_KMSDRM_UnloadSymbols(); } close(drm_fd); + } else { + SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, + "Failed to open KMSDRM device %s, errno: %d\n", device, errno); } - - SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, - "Failed to open KMSDRM device %s, errno: %d\n", device, - errno); } } From 0cdfdb9970205a889388e2a95ddec5ef691b15b6 Mon Sep 17 00:00:00 2001 From: KaJe Date: Fri, 9 Aug 2024 01:46:12 -0700 Subject: [PATCH 08/18] Add Cammus C12 VID & PID to wheel device list. Add Cammus C12 in the SDL wheel list to enable wheel detection for them. (cherry picked from commit e1571d704deffa8b0be640da5068bab51a0ac420) (cherry picked from commit 5ecbc00f367b4ac420fadf569e2d33325a7c2413) --- src/joystick/SDL_joystick.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index 4e461e6d20546..dff447bd217ee 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -395,6 +395,7 @@ static Uint32 initial_wheel_devices[] = { MAKE_VIDPID(0x2433, 0xf303), /* Asetek SimSports La Prima Wheelbase */ MAKE_VIDPID(0x2433, 0xf306), /* Asetek SimSports Tony Kannan Wheelbase */ MAKE_VIDPID(0x3416, 0x0301), /* Cammus C5 Wheelbase */ + MAKE_VIDPID(0x3416, 0x0302), /* Cammus C12 Wheelbase */ MAKE_VIDPID(0x346e, 0x0000), /* Moza R16/R21 Wheelbase */ MAKE_VIDPID(0x346e, 0x0002), /* Moza R9 Wheelbase */ MAKE_VIDPID(0x346e, 0x0004), /* Moza R5 Wheelbase */ From 21e0382edd52584996d2eff77de5b841cb7d33e4 Mon Sep 17 00:00:00 2001 From: Ilya Mizus Date: Tue, 13 Aug 2024 17:15:12 +0300 Subject: [PATCH 09/18] Fixed secondary screens on KMSDRM (#10535) * Removed window movement to left top corner that breaks secondary screens on KMSDRM (cherry picked from commit ce98550cbb282baa9aed293703f042a980a2de81) (cherry picked from commit 586a2dc721266e105bcd18e690d613ccb71d956b) --- src/video/kmsdrm/SDL_kmsdrmvideo.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c index 5510a4cb550b7..003b3fb085141 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -1589,7 +1589,11 @@ int KMSDRM_CreateWindow(_THIS, SDL_Window *window) SDL_SetKeyboardFocus(window); /* Tell the app that the window has moved to top-left. */ - SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, 0, 0); + { + SDL_Rect display_bounds; + SDL_GetDisplayBounds(SDL_GetDisplayForWindow(window), &display_bounds); + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, display_bounds.x, display_bounds.y); + } /* Allocated windata will be freed in KMSDRM_DestroyWindow, and KMSDRM_DestroyWindow() will be called by SDL_CreateWindow() From 95aed34a69632a516fd1e569736edf1ee927e9de Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 13 Aug 2024 07:39:43 -0700 Subject: [PATCH 10/18] Fixed build (cherry picked from commit 70890b175ebfb1850b6bdb0bc8afc9dea948baa7) --- src/video/kmsdrm/SDL_kmsdrmvideo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c index 003b3fb085141..35005b9086353 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -1591,7 +1591,8 @@ int KMSDRM_CreateWindow(_THIS, SDL_Window *window) /* Tell the app that the window has moved to top-left. */ { SDL_Rect display_bounds; - SDL_GetDisplayBounds(SDL_GetDisplayForWindow(window), &display_bounds); + SDL_zero(display_bounds); + SDL_GetDisplayBounds(SDL_GetWindowDisplayIndex(window), &display_bounds); SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, display_bounds.x, display_bounds.y); } From 847a6cce964fff7fe59c028a8ee49e35529175a2 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Wed, 14 Aug 2024 03:22:13 +0300 Subject: [PATCH 11/18] SDL_vitatouch.c: Fixed the incorrect touch device IDs - Begining of device ID with 0 violates the SDL's specification that means the 0 is an error, invalid, failure, etc. But on Vita here it's an actual device... - Replacing 0 and 1 with 1 and 2 to resolve this violation. (cherry picked from commit dd6c663918a5fc8426fe2ea6ed7cc115a6f7f7de) --- src/video/vita/SDL_vitatouch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/vita/SDL_vitatouch.c b/src/video/vita/SDL_vitatouch.c index 07cbedebec2d4..3587822d58798 100644 --- a/src/video/vita/SDL_vitatouch.c +++ b/src/video/vita/SDL_vitatouch.c @@ -70,8 +70,8 @@ void VITA_InitTouch(void) } // Support passing both front and back touch devices in events - SDL_AddTouch((SDL_TouchID)0, SDL_TOUCH_DEVICE_DIRECT, "Front"); - SDL_AddTouch((SDL_TouchID)1, SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, "Back"); + SDL_AddTouch((SDL_TouchID)1, SDL_TOUCH_DEVICE_DIRECT, "Front"); + SDL_AddTouch((SDL_TouchID)2, SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, "Back"); } void VITA_QuitTouch(void) From 6f7aa1e755c581ce88f8bda6a3601367f84b2ce5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 15 Aug 2024 11:51:46 -0700 Subject: [PATCH 12/18] Use drmModeAddFB() if drmModeAddFB2WithModifiers() fails Fixes https://github.com/libsdl-org/SDL/issues/10276 (cherry picked from commit 8e99ec34bba27f239b3446abcad42783225404cf) (cherry picked from commit b36021495014c9ca9eeaef2d233ac6af6ec6045b) --- src/video/kmsdrm/SDL_kmsdrmvideo.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c index 35005b9086353..b7abb4fc785f5 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -380,15 +380,9 @@ KMSDRM_FBInfo *KMSDRM_FBFromBO(_THIS, struct gbm_bo *bo) ret = KMSDRM_drmModeAddFB2WithModifiers(viddata->drm_fd, w, h, format, handles, strides, offsets, modifiers, &fb_info->fb_id, flags); if (ret) { - handles[0] = KMSDRM_gbm_bo_get_handle(bo).u32; strides[0] = KMSDRM_gbm_bo_get_stride(bo); - offsets[0] = 0; - for (int i = 1; i<4; i++) { - handles[i] = 0; - strides[i] = 0; - offsets[i] = 0; - } - ret = KMSDRM_drmModeAddFB2(viddata->drm_fd, w, h, format, handles, strides, offsets, &fb_info->fb_id, 0); + handles[0] = KMSDRM_gbm_bo_get_handle(bo).u32; + ret = KMSDRM_drmModeAddFB(viddata->drm_fd, w, h, 24, 32, strides[0], handles[0], &fb_info->fb_id); } if (ret) { From 74a005f73f530044847aac5565be73fa88605982 Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Mon, 22 Jul 2024 11:59:01 -0400 Subject: [PATCH 13/18] x11: Track cursor visibility internally Cursor visibility in the SDL input layer only reflects whether ShowCursor/HideCursor was called. In the case of relative mode, the cursor can be hidden, but the SDL_Mouse visibility flag will be true. Track cursor visibility separately in the X11 driver. Fixes the cursor becoming visible when using the warping relative mode with XWayland. (cherry picked from commit b0713a7d3047ca121c4257337da48cafbcbc44d4) (cherry picked from commit 5b57573439774f9c55967438c71707aa311259da) --- src/video/x11/SDL_x11mouse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/video/x11/SDL_x11mouse.c b/src/video/x11/SDL_x11mouse.c index 0938de99f8233..f7cdb80300b7b 100644 --- a/src/video/x11/SDL_x11mouse.c +++ b/src/video/x11/SDL_x11mouse.c @@ -30,6 +30,7 @@ /* FIXME: Find a better place to put this... */ static Cursor x11_empty_cursor = None; +static SDL_bool x11_cursor_visible = SDL_TRUE; static Display *GetDisplay(void) { @@ -298,6 +299,8 @@ static int X11_ShowCursor(SDL_Cursor *cursor) Display *display = GetDisplay(); SDL_Window *window; + x11_cursor_visible = !!cursor; + for (window = video->windows; window; window = window->next) { SDL_WindowData *data = (SDL_WindowData *)window->driverdata; if (data) { @@ -317,12 +320,11 @@ static void WarpMouseInternal(Window xwindow, const int x, const int y) { SDL_VideoData *videodata = (SDL_VideoData *)SDL_GetVideoDevice()->driverdata; Display *display = videodata->display; - SDL_Mouse *mouse = SDL_GetMouse(); int deviceid = 0; SDL_bool warp_hack = SDL_FALSE; /* XWayland will only warp the cursor if it is hidden, so this workaround is required. */ - if (videodata->is_xwayland && mouse && mouse->cursor_shown) { + if (videodata->is_xwayland && x11_cursor_visible) { warp_hack = SDL_TRUE; } From f79d28085d07e087bf8fbbc85f94b9004db0de4b Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Fri, 16 Aug 2024 11:12:10 -0400 Subject: [PATCH 14/18] wayland: Send fake warp coordinates when emulating warps with relative mode Send the fake warp coordinates when emulating warps with relative mode to ensure that it appears that the cursor is always reset to where the application expects it to be. Fixes cases where games can continue moving the camera if the mouse is lifted during motion. (cherry picked from commit 8fcbf972c6960fb8882adfb4244e598cffacad6f) --- src/video/wayland/SDL_waylandmouse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/wayland/SDL_waylandmouse.c b/src/video/wayland/SDL_waylandmouse.c index 18550171dcddd..278daabc3596e 100644 --- a/src/video/wayland/SDL_waylandmouse.c +++ b/src/video/wayland/SDL_waylandmouse.c @@ -595,6 +595,7 @@ static void Wayland_WarpMouse(SDL_Window *window, int x, int y) Wayland_input_lock_pointer(input); input->relative_mode_override = SDL_TRUE; } + SDL_SendMouseMotion(window, 0, 0, x, y); } } From 7ca3d26e7aa0ff1f7ba48eee2f35ac5fb4de0057 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sat, 17 Aug 2024 11:23:32 +0300 Subject: [PATCH 15/18] SDL_x11mouse.c: avoid -Wunused-variable if xinput2 is not available (cherry picked from commit 30972d7e7fce4430bdc911926811d968eec7af57) --- src/video/x11/SDL_x11mouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/x11/SDL_x11mouse.c b/src/video/x11/SDL_x11mouse.c index f7cdb80300b7b..5048cd01bbbe2 100644 --- a/src/video/x11/SDL_x11mouse.c +++ b/src/video/x11/SDL_x11mouse.c @@ -320,7 +320,9 @@ static void WarpMouseInternal(Window xwindow, const int x, const int y) { SDL_VideoData *videodata = (SDL_VideoData *)SDL_GetVideoDevice()->driverdata; Display *display = videodata->display; +#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2 int deviceid = 0; +#endif SDL_bool warp_hack = SDL_FALSE; /* XWayland will only warp the cursor if it is hidden, so this workaround is required. */ @@ -492,5 +494,3 @@ void X11_QuitMouse(_THIS) } #endif /* SDL_VIDEO_DRIVER_X11 */ - -/* vi: set ts=4 sw=4 expandtab: */ From 948196448fced68629eca0f134516df00d185934 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 19 Aug 2024 16:30:04 -0700 Subject: [PATCH 16/18] Added support for the Retro-bit Controller in PS3 mode Fixes https://github.com/libsdl-org/SDL/issues/10557 (cherry picked from commit e75175129f83c3d1e85572d03ec070177de8abc4) (cherry picked from commit 0de601dc64d28d8e00b0bf98f1b198058386fc25) --- src/joystick/controller_list.h | 2 +- src/joystick/hidapi/SDL_hidapi_ps3.c | 43 ++++++++++++++++++++++------ src/joystick/usb_ids.h | 2 ++ 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/src/joystick/controller_list.h b/src/joystick/controller_list.h index fd77b2a9d5a1d..79446c5cae7b5 100644 --- a/src/joystick/controller_list.h +++ b/src/joystick/controller_list.h @@ -69,7 +69,7 @@ static const ControllerDescription_t arrControllers[] = { { MAKE_CONTROLLER_ID( 0x20d6, 0x576d ), k_eControllerType_PS3Controller, NULL }, // Power A PS3 { MAKE_CONTROLLER_ID( 0x20d6, 0xca6d ), k_eControllerType_PS3Controller, NULL }, // From SDL { MAKE_CONTROLLER_ID( 0x2563, 0x0523 ), k_eControllerType_PS3Controller, NULL }, // Digiflip GP006 - { MAKE_CONTROLLER_ID( 0x2563, 0x0575 ), k_eControllerType_PS3Controller, NULL }, // From SDL + { MAKE_CONTROLLER_ID( 0x2563, 0x0575 ), k_eControllerType_PS3Controller, "Retro-bit Controller" }, // SWITCH CO., LTD. Retro-bit Controller { MAKE_CONTROLLER_ID( 0x25f0, 0x83c3 ), k_eControllerType_PS3Controller, NULL }, // gioteck vx2 { MAKE_CONTROLLER_ID( 0x25f0, 0xc121 ), k_eControllerType_PS3Controller, NULL }, // { MAKE_CONTROLLER_ID( 0x2c22, 0x2003 ), k_eControllerType_PS3Controller, NULL }, // Qanba Drone diff --git a/src/joystick/hidapi/SDL_hidapi_ps3.c b/src/joystick/hidapi/SDL_hidapi_ps3.c index 1b10e9ffbad8a..fdc21bb9e24d0 100644 --- a/src/joystick/hidapi/SDL_hidapi_ps3.c +++ b/src/joystick/hidapi/SDL_hidapi_ps3.c @@ -50,6 +50,7 @@ typedef struct SDL_HIDAPI_Device *device; SDL_Joystick *joystick; SDL_bool is_shanwan; + SDL_bool has_analog_buttons; SDL_bool report_sensors; SDL_bool effects_updated; int player_index; @@ -145,6 +146,7 @@ static SDL_bool HIDAPI_DriverPS3_InitDevice(SDL_HIDAPI_Device *device) } ctx->device = device; ctx->is_shanwan = is_shanwan; + ctx->has_analog_buttons = SDL_TRUE; device->context = ctx; @@ -247,7 +249,10 @@ static SDL_bool HIDAPI_DriverPS3_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joy /* Initialize the joystick capabilities */ joystick->nbuttons = 15; - joystick->naxes = 16; + joystick->naxes = 6; + if (ctx->has_analog_buttons) { + joystick->naxes += 10; + } joystick->epowerlevel = SDL_JOYSTICK_POWER_WIRED; SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_ACCEL, 100.0f); @@ -432,7 +437,7 @@ static void HIDAPI_DriverPS3_HandleStatePacket(SDL_Joystick *joystick, SDL_Drive SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, axis); /* Buttons are mapped as axes in the order they appear in the button enumeration */ - { + if (ctx->has_analog_buttons) { static int button_axis_offsets[] = { 24, /* SDL_CONTROLLER_BUTTON_A */ 23, /* SDL_CONTROLLER_BUTTON_B */ @@ -617,6 +622,11 @@ static SDL_bool HIDAPI_DriverPS3ThirdParty_InitDevice(SDL_HIDAPI_Device *device) return SDL_FALSE; } ctx->device = device; + if (device->vendor_id == USB_VENDOR_SWITCH && device->product_id == USB_PRODUCT_SWITCH_RETROBIT_CONTROLLER) { + ctx->has_analog_buttons = SDL_FALSE; + } else { + ctx->has_analog_buttons = SDL_TRUE; + } device->context = ctx; @@ -650,8 +660,17 @@ static SDL_bool HIDAPI_DriverPS3ThirdParty_OpenJoystick(SDL_HIDAPI_Device *devic /* Initialize the joystick capabilities */ joystick->nbuttons = 15; - joystick->naxes = 16; - joystick->epowerlevel = SDL_JOYSTICK_POWER_WIRED; + joystick->naxes = 6; + if (ctx->has_analog_buttons) { + joystick->naxes += 10; + } + + if (device->vendor_id == USB_VENDOR_SWITCH && device->product_id == USB_PRODUCT_SWITCH_RETROBIT_CONTROLLER) { + // This is a wireless controller using a USB dongle + joystick->epowerlevel = SDL_JOYSTICK_POWER_UNKNOWN; + } else { + joystick->epowerlevel = SDL_JOYSTICK_POWER_WIRED; + } return SDL_TRUE; } @@ -762,7 +781,7 @@ static void HIDAPI_DriverPS3ThirdParty_HandleStatePacket18(SDL_Joystick *joystic SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, axis); /* Buttons are mapped as axes in the order they appear in the button enumeration */ - { + if (ctx->has_analog_buttons) { static int button_axis_offsets[] = { 12, /* SDL_GAMEPAD_BUTTON_A */ 11, /* SDL_GAMEPAD_BUTTON_B */ @@ -871,9 +890,17 @@ static void HIDAPI_DriverPS3ThirdParty_HandleStatePacket19(SDL_Joystick *joystic } } - axis = ((int)data[17] * 257) - 32768; + if (data[0] & 0x40) { + axis = 32767; + } else { + axis = ((int)data[17] * 257) - 32768; + } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERLEFT, axis); - axis = ((int)data[18] * 257) - 32768; + if (data[0] & 0x80) { + axis = 32767; + } else { + axis = ((int)data[18] * 257) - 32768; + } SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, axis); axis = ((int)data[3] * 257) - 32768; SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); @@ -885,7 +912,7 @@ static void HIDAPI_DriverPS3ThirdParty_HandleStatePacket19(SDL_Joystick *joystic SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, axis); /* Buttons are mapped as axes in the order they appear in the button enumeration */ - { + if (ctx->has_analog_buttons) { static int button_axis_offsets[] = { 13, /* SDL_CONTROLLER_BUTTON_A */ 12, /* SDL_CONTROLLER_BUTTON_B */ diff --git a/src/joystick/usb_ids.h b/src/joystick/usb_ids.h index d16605751b47d..8e7a4d63f75e9 100644 --- a/src/joystick/usb_ids.h +++ b/src/joystick/usb_ids.h @@ -54,6 +54,7 @@ #define USB_VENDOR_SONY 0x054c #define USB_VENDOR_THRUSTMASTER 0x044f #define USB_VENDOR_TURTLE_BEACH 0x10f5 +#define USB_VENDOR_SWITCH 0x2563 #define USB_VENDOR_VALVE 0x28de #define USB_VENDOR_ZEROPLUS 0x0c12 @@ -116,6 +117,7 @@ #define USB_PRODUCT_SONY_DS4_STRIKEPAD 0x05c5 #define USB_PRODUCT_SONY_DS5 0x0ce6 #define USB_PRODUCT_SONY_DS5_EDGE 0x0df2 +#define USB_PRODUCT_SWITCH_RETROBIT_CONTROLLER 0x0575 #define USB_PRODUCT_THRUSTMASTER_ESWAPX_PRO 0xd012 #define USB_PRODUCT_TURTLE_BEACH_SERIES_X_REACT_R 0x7013 #define USB_PRODUCT_TURTLE_BEACH_SERIES_X_RECON 0x7009 From 00494df2f1038bb8a9f395b12abd35cb254c5c5b Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sun, 25 Aug 2024 11:05:56 +0300 Subject: [PATCH 17/18] RAWINPUT_JoystickOpen: add missing SDL_stack_free() calls. Fixes https://github.com/libsdl-org/SDL/issues/10574. (cherry picked from commit 845212388e74ebfaf28ac1728cd182bfa6010e05) (cherry picked from commit 4eac44bed446f1ce9083b765dd9744b8ca81497e) --- src/joystick/windows/SDL_rawinputjoystick.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/joystick/windows/SDL_rawinputjoystick.c b/src/joystick/windows/SDL_rawinputjoystick.c index 2e107082b8704..68627326fd038 100644 --- a/src/joystick/windows/SDL_rawinputjoystick.c +++ b/src/joystick/windows/SDL_rawinputjoystick.c @@ -1290,6 +1290,7 @@ static int RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index) value_caps = SDL_stack_alloc(HIDP_VALUE_CAPS, caps.NumberInputValueCaps); if (SDL_HidP_GetValueCaps(HidP_Input, value_caps, &caps.NumberInputValueCaps, ctx->preparsed_data) != HIDP_STATUS_SUCCESS) { RAWINPUT_JoystickClose(joystick); + SDL_stack_free(button_caps); return SDL_SetError("Couldn't get device value capabilities"); } @@ -1318,6 +1319,8 @@ static int RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index) ctx->button_indices = (USHORT *)SDL_malloc(joystick->nbuttons * sizeof(*ctx->button_indices)); if (!ctx->button_indices) { RAWINPUT_JoystickClose(joystick); + SDL_stack_free(value_caps); + SDL_stack_free(button_caps); return SDL_OutOfMemory(); } @@ -1342,6 +1345,8 @@ static int RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index) joystick->nbuttons += 1; } + SDL_stack_free(button_caps); + for (i = 0; i < caps.NumberInputValueCaps; ++i) { HIDP_VALUE_CAPS *cap = &value_caps[i]; @@ -1371,6 +1376,7 @@ static int RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index) ctx->axis_indices = (USHORT *)SDL_malloc(joystick->naxes * sizeof(*ctx->axis_indices)); if (!ctx->axis_indices) { RAWINPUT_JoystickClose(joystick); + SDL_stack_free(value_caps); return SDL_OutOfMemory(); } @@ -1404,6 +1410,7 @@ static int RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index) ctx->hat_indices = (USHORT *)SDL_malloc(joystick->nhats * sizeof(*ctx->hat_indices)); if (!ctx->hat_indices) { RAWINPUT_JoystickClose(joystick); + SDL_stack_free(value_caps); return SDL_OutOfMemory(); } @@ -1422,6 +1429,8 @@ static int RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index) } } + SDL_stack_free(value_caps); + joystick->epowerlevel = SDL_JOYSTICK_POWER_UNKNOWN; return 0; From 9519b9916cd29a14587af0507292f2bd31dd5752 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 1 Sep 2024 08:11:12 -0700 Subject: [PATCH 18/18] Updated to version 2.30.7 for release --- CMakeLists.txt | 2 +- Makefile.os2 | 2 +- Makefile.w32 | 2 +- Xcode/SDL/Info-Framework.plist | 4 ++-- Xcode/SDL/SDL.xcodeproj/project.pbxproj | 12 ++++++------ Xcode/SDL/pkg-support/SDL.info | 2 +- .../src/main/java/org/libsdl/app/SDLActivity.java | 2 +- configure | 2 +- configure.ac | 2 +- include/SDL_version.h | 2 +- src/main/windows/version.rc | 8 ++++---- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a214d734e2c03..7e135490ac1f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,7 @@ endif() # See docs/release_checklist.md set(SDL_MAJOR_VERSION 2) set(SDL_MINOR_VERSION 30) -set(SDL_MICRO_VERSION 6) +set(SDL_MICRO_VERSION 7) set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}") # Set defaults preventing destination file conflicts diff --git a/Makefile.os2 b/Makefile.os2 index b99d0f599aa26..ff95021bbd2a2 100644 --- a/Makefile.os2 +++ b/Makefile.os2 @@ -15,7 +15,7 @@ LIBNAME = SDL2 MAJOR_VERSION = 2 MINOR_VERSION = 30 -MICRO_VERSION = 6 +MICRO_VERSION = 7 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION) DESCRIPTION = Simple DirectMedia Layer 2 diff --git a/Makefile.w32 b/Makefile.w32 index 31e3438b471cd..076f7954cbeb5 100644 --- a/Makefile.w32 +++ b/Makefile.w32 @@ -6,7 +6,7 @@ LIBNAME = SDL2 MAJOR_VERSION = 2 MINOR_VERSION = 30 -MICRO_VERSION = 6 +MICRO_VERSION = 7 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION) LIBHOME = . diff --git a/Xcode/SDL/Info-Framework.plist b/Xcode/SDL/Info-Framework.plist index 20b5c0ebbb20b..342da0ec7c101 100644 --- a/Xcode/SDL/Info-Framework.plist +++ b/Xcode/SDL/Info-Framework.plist @@ -19,10 +19,10 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.30.6 + 2.30.7 CFBundleSignature SDLX CFBundleVersion - 2.30.6 + 2.30.7 diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj index ce34a86ed5f86..217add597ca59 100644 --- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj +++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj @@ -9729,7 +9729,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEPLOYMENT_POSTPROCESSING = YES; DYLIB_COMPATIBILITY_VERSION = 3001.0.0; - DYLIB_CURRENT_VERSION = 3001.6.0; + DYLIB_CURRENT_VERSION = 3001.7.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_ALTIVEC_EXTENSIONS = YES; @@ -9770,7 +9770,7 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_LINK_OBJC_RUNTIME = NO; - MARKETING_VERSION = 2.30.6; + MARKETING_VERSION = 2.30.7; OTHER_LDFLAGS = "-liconv"; }; name = Release; @@ -9814,7 +9814,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 3001.0.0; - DYLIB_CURRENT_VERSION = 3001.6.0; + DYLIB_CURRENT_VERSION = 3001.7.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -9856,7 +9856,7 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_LINK_OBJC_RUNTIME = NO; - MARKETING_VERSION = 2.30.6; + MARKETING_VERSION = 2.30.7; OTHER_LDFLAGS = "-liconv"; }; name = Debug; @@ -10063,7 +10063,7 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 3001.0.0; - DYLIB_CURRENT_VERSION = 3001.6.0; + DYLIB_CURRENT_VERSION = 3001.7.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; @@ -10115,7 +10115,7 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 3001.0.0; - DYLIB_CURRENT_VERSION = 3001.6.0; + DYLIB_CURRENT_VERSION = 3001.7.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu11; diff --git a/Xcode/SDL/pkg-support/SDL.info b/Xcode/SDL/pkg-support/SDL.info index 9a3789b678e24..0e289444dc1fe 100644 --- a/Xcode/SDL/pkg-support/SDL.info +++ b/Xcode/SDL/pkg-support/SDL.info @@ -1,4 +1,4 @@ -Title SDL 2.30.6 +Title SDL 2.30.7 Version 1 Description SDL Library for Mac OS X (http://www.libsdl.org) DefaultLocation /Library/Frameworks diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java index 976b1c39621d6..2114311f1ff7d 100644 --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java @@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh private static final String TAG = "SDL"; private static final int SDL_MAJOR_VERSION = 2; private static final int SDL_MINOR_VERSION = 30; - private static final int SDL_MICRO_VERSION = 6; + private static final int SDL_MICRO_VERSION = 7; /* // Display InputType.SOURCE/CLASS of events and devices // diff --git a/configure b/configure index 12713bf9385cc..6d39b056a8869 100755 --- a/configure +++ b/configure @@ -3508,7 +3508,7 @@ orig_CFLAGS="$CFLAGS" # See docs/release_checklist.md SDL_MAJOR_VERSION=2 SDL_MINOR_VERSION=30 -SDL_MICRO_VERSION=6 +SDL_MICRO_VERSION=7 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION` diff --git a/configure.ac b/configure.ac index 9ffae908396d4..7be3b5c3f9499 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ dnl Set various version strings - taken gratefully from the GTk sources # See docs/release_checklist.md SDL_MAJOR_VERSION=2 SDL_MINOR_VERSION=30 -SDL_MICRO_VERSION=6 +SDL_MICRO_VERSION=7 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION` diff --git a/include/SDL_version.h b/include/SDL_version.h index 759ce4e95227e..517811f32e3e6 100644 --- a/include/SDL_version.h +++ b/include/SDL_version.h @@ -59,7 +59,7 @@ typedef struct SDL_version */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 30 -#define SDL_PATCHLEVEL 6 +#define SDL_PATCHLEVEL 7 /** * Macro to determine SDL version program was compiled against. diff --git a/src/main/windows/version.rc b/src/main/windows/version.rc index bd4ee89ade669..455c254f62fab 100644 --- a/src/main/windows/version.rc +++ b/src/main/windows/version.rc @@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,30,6,0 - PRODUCTVERSION 2,30,6,0 + FILEVERSION 2,30,7,0 + PRODUCTVERSION 2,30,7,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L @@ -23,12 +23,12 @@ BEGIN BEGIN VALUE "CompanyName", "\0" VALUE "FileDescription", "SDL\0" - VALUE "FileVersion", "2, 30, 6, 0\0" + VALUE "FileVersion", "2, 30, 7, 0\0" VALUE "InternalName", "SDL\0" VALUE "LegalCopyright", "Copyright (C) 2024 Sam Lantinga\0" VALUE "OriginalFilename", "SDL2.dll\0" VALUE "ProductName", "Simple DirectMedia Layer\0" - VALUE "ProductVersion", "2, 30, 6, 0\0" + VALUE "ProductVersion", "2, 30, 7, 0\0" END END BLOCK "VarFileInfo"