Skip to content

Commit

Permalink
SDL2, windows: update to latest official 2.30.6 version.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Aug 1, 2024
1 parent cc32abe commit 30163d0
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Windows/SDL2/bin/sdl2-config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 13 additions & 1 deletion Windows/SDL2/include/SDL_hints.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 10 additions & 5 deletions Windows/SDL2/include/SDL_joystick.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions Windows/SDL2/include/SDL_revision.h
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion Windows/SDL2/include/SDL_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Binary file modified Windows/SDL2/lib/SDL2.dll
Binary file not shown.
Binary file modified Windows/SDL2/lib64/SDL2.dll
Binary file not shown.
14 changes: 2 additions & 12 deletions Windows/SDL2/main/SDL_windows.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -92,16 +92,6 @@
#include <windows.h>
#include <basetyps.h> /* 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 */
Expand Down
6 changes: 3 additions & 3 deletions Windows/SDL2/main/SDL_windows_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static int main_getcmdline(void)
int i, argc, result;

argvw = CommandLineToArgvW(GetCommandLineW(), &argc);
if (argvw == NULL) {
if (!argvw) {
return OutOfMemory();
}

Expand All @@ -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);
Expand Down

0 comments on commit 30163d0

Please sign in to comment.