diff --git a/Windows/SDL2/bin/sdl2-config b/Windows/SDL2/bin/sdl2-config index 164914a27..aafd9e7e0 100755 --- a/Windows/SDL2/bin/sdl2-config +++ b/Windows/SDL2/bin/sdl2-config @@ -40,7 +40,7 @@ while test $# -gt 0; do lib_suffix=$optarg ;; --version) - echo 2.30.4 + echo 2.30.6 ;; --cflags) echo -I${prefix}/include -Dmain=SDL_main diff --git a/Windows/SDL2/include/SDL_hints.h b/Windows/SDL2/include/SDL_hints.h index e775a6509..a26ab60e8 100644 --- a/Windows/SDL2/include/SDL_hints.h +++ b/Windows/SDL2/include/SDL_hints.h @@ -1424,7 +1424,19 @@ extern "C" { #define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION" /** - * \brief A variable controlling whether mouse events should generate synthetic touch events + * \brief A variable controlling whether the hardware cursor stays visible when relative mode is active. + * + * This variable can be set to the following values: + * "0" - The cursor will be hidden while relative mode is active (default) + * "1" - The cursor will remain visible while relative mode is active + * + * Note that for systems without raw hardware inputs, relative mode is implemented using warping, so the hardware cursor will visibly warp between frames if this is enabled on those systems. + */ +#define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE" + +/** + * A variable controlling whether mouse events should generate synthetic touch + * events * * This variable can be set to the following values: * "0" - Mouse events will not generate touch events (default for desktop platforms) diff --git a/Windows/SDL2/include/SDL_joystick.h b/Windows/SDL2/include/SDL_joystick.h index 561e01099..7a3faf841 100644 --- a/Windows/SDL2/include/SDL_joystick.h +++ b/Windows/SDL2/include/SDL_joystick.h @@ -790,12 +790,17 @@ extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void); * **WARNING**: Calling this function may delete all events currently in SDL's * event queue. * - * \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE` - * \returns 1 if enabled, 0 if disabled, or a negative error code on failure; - * call SDL_GetError() for more information. + * While `param` is meant to be one of `SDL_QUERY`, `SDL_IGNORE`, or + * `SDL_ENABLE`, this function accepts any value, with any non-zero value that + * isn't `SDL_QUERY` being treated as `SDL_ENABLE`. * - * If `state` is `SDL_QUERY` then the current state is returned, - * otherwise the new processing state is returned. + * If SDL was built with events disabled (extremely uncommon!), this will + * do nothing and always return `SDL_IGNORE`. + * + * \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE` + * \returns If `state` is `SDL_QUERY` then the current state is returned, + * otherwise `state` is returned (even if it was not one of the + * allowed values). * * \since This function is available since SDL 2.0.0. * diff --git a/Windows/SDL2/include/SDL_revision.h b/Windows/SDL2/include/SDL_revision.h index 2e71f9d95..88fe824e3 100644 --- a/Windows/SDL2/include/SDL_revision.h +++ b/Windows/SDL2/include/SDL_revision.h @@ -1,7 +1,7 @@ /* Generated by updaterev.sh, do not edit */ #ifdef SDL_VENDOR_INFO -#define SDL_REVISION "SDL-release-2.30.4-0-g92fe3b19c (" SDL_VENDOR_INFO ")" +#define SDL_REVISION "SDL-release-2.30.6-0-gba2f78a00 (" SDL_VENDOR_INFO ")" #else -#define SDL_REVISION "SDL-release-2.30.4-0-g92fe3b19c" +#define SDL_REVISION "SDL-release-2.30.6-0-gba2f78a00" #endif #define SDL_REVISION_NUMBER 0 diff --git a/Windows/SDL2/include/SDL_version.h b/Windows/SDL2/include/SDL_version.h index d05fed77c..759ce4e95 100644 --- a/Windows/SDL2/include/SDL_version.h +++ b/Windows/SDL2/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 4 +#define SDL_PATCHLEVEL 6 /** * Macro to determine SDL version program was compiled against. diff --git a/Windows/SDL2/lib/SDL2.dll b/Windows/SDL2/lib/SDL2.dll index 40ce1fb5b..71f9b4065 100644 Binary files a/Windows/SDL2/lib/SDL2.dll and b/Windows/SDL2/lib/SDL2.dll differ diff --git a/Windows/SDL2/lib64/SDL2.dll b/Windows/SDL2/lib64/SDL2.dll index ed97b8fc4..a26adda9a 100644 Binary files a/Windows/SDL2/lib64/SDL2.dll and b/Windows/SDL2/lib64/SDL2.dll differ diff --git a/Windows/SDL2/main/SDL_windows.h b/Windows/SDL2/main/SDL_windows.h index 3842e082b..2bd6257d1 100644 --- a/Windows/SDL2/main/SDL_windows.h +++ b/Windows/SDL2/main/SDL_windows.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2023 Sam Lantinga + Copyright (C) 1997-2024 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -36,7 +36,7 @@ #endif #undef WINVER #undef _WIN32_WINNT -#if defined(SDL_VIDEO_RENDER_D3D12) +#if SDL_VIDEO_RENDER_D3D12 #define _WIN32_WINNT 0xA00 /* For D3D12, 0xA00 is required */ #elif defined(HAVE_SHELLSCALINGAPI_H) #define _WIN32_WINNT 0x603 /* For DPI support */ @@ -92,16 +92,6 @@ #include #include /* for REFIID with broken mingw.org headers */ -/* Older Visual C++ headers don't have the Win64-compatible typedefs... */ -#if defined(_MSC_VER) && (_MSC_VER <= 1200) -#ifndef DWORD_PTR -#define DWORD_PTR DWORD -#endif -#ifndef LONG_PTR -#define LONG_PTR LONG -#endif -#endif - #include "SDL_rect.h" /* Routines to convert from UTF8 to native Windows text */ diff --git a/Windows/SDL2/main/SDL_windows_main.c b/Windows/SDL2/main/SDL_windows_main.c index 0ce41a20d..146c174f2 100644 --- a/Windows/SDL2/main/SDL_windows_main.c +++ b/Windows/SDL2/main/SDL_windows_main.c @@ -43,7 +43,7 @@ static int main_getcmdline(void) int i, argc, result; argvw = CommandLineToArgvW(GetCommandLineW(), &argc); - if (argvw == NULL) { + if (!argvw) { return OutOfMemory(); } @@ -54,13 +54,13 @@ static int main_getcmdline(void) /* Parse it into argv and argc */ argv = (char **)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (argc + 1) * sizeof(*argv)); - if (argv == NULL) { + if (!argv) { return OutOfMemory(); } for (i = 0; i < argc; ++i) { DWORD len; char *arg = WIN_StringToUTF8W(argvw[i]); - if (arg == NULL) { + if (!arg) { return OutOfMemory(); } len = (DWORD)SDL_strlen(arg);