Skip to content

Commit

Permalink
SDL2: Update to 2.30.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
madewokherd committed Mar 7, 2024
1 parent 6254053 commit 825ccc9
Show file tree
Hide file tree
Showing 80 changed files with 525 additions and 330 deletions.
2 changes: 1 addition & 1 deletion SDL2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ endif()
# See docs/release_checklist.md
set(SDL_MAJOR_VERSION 2)
set(SDL_MINOR_VERSION 30)
set(SDL_MICRO_VERSION 0)
set(SDL_MICRO_VERSION 1)
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")

# Set defaults preventing destination file conflicts
Expand Down
2 changes: 1 addition & 1 deletion SDL2/Makefile.os2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
LIBNAME = SDL2
MAJOR_VERSION = 2
MINOR_VERSION = 30
MICRO_VERSION = 0
MICRO_VERSION = 1
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
DESCRIPTION = Simple DirectMedia Layer 2

Expand Down
2 changes: 1 addition & 1 deletion SDL2/Makefile.w32
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
LIBNAME = SDL2
MAJOR_VERSION = 2
MINOR_VERSION = 30
MICRO_VERSION = 0
MICRO_VERSION = 1
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)

LIBHOME = .
Expand Down
2 changes: 1 addition & 1 deletion SDL2/SDL2.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: Simple DirectMedia Layer
Name: SDL2
Version: 2.30.0
Version: 2.30.1
Release: 2
Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
URL: http://www.libsdl.org/
Expand Down
2 changes: 1 addition & 1 deletion SDL2/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
release-2.30.0-0-g859844eae
release-2.30.1-0-g5adbf3765
4 changes: 2 additions & 2 deletions SDL2/Xcode/SDL/Info-Framework.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.30.0</string>
<string>2.30.1</string>
<key>CFBundleSignature</key>
<string>SDLX</string>
<key>CFBundleVersion</key>
<string>2.30.0</string>
<string>2.30.1</string>
</dict>
</plist>
12 changes: 6 additions & 6 deletions SDL2/Xcode/SDL/SDL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9769,7 +9769,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_POSTPROCESSING = YES;
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
DYLIB_CURRENT_VERSION = 3001.0.0;
DYLIB_CURRENT_VERSION = 3001.1.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_ALTIVEC_EXTENSIONS = YES;
Expand Down Expand Up @@ -9810,7 +9810,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_LINK_OBJC_RUNTIME = NO;
MARKETING_VERSION = 2.30.0;
MARKETING_VERSION = 2.30.1;
OTHER_LDFLAGS = "-liconv";
};
name = Release;
Expand Down Expand Up @@ -9854,7 +9854,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
DYLIB_CURRENT_VERSION = 3001.0.0;
DYLIB_CURRENT_VERSION = 3001.1.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -9896,7 +9896,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_LINK_OBJC_RUNTIME = NO;
MARKETING_VERSION = 2.30.0;
MARKETING_VERSION = 2.30.1;
OTHER_LDFLAGS = "-liconv";
};
name = Debug;
Expand Down Expand Up @@ -10103,7 +10103,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
DYLIB_CURRENT_VERSION = 3001.0.0;
DYLIB_CURRENT_VERSION = 3001.1.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
Expand Down Expand Up @@ -10155,7 +10155,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
DYLIB_CURRENT_VERSION = 3001.0.0;
DYLIB_CURRENT_VERSION = 3001.1.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down
2 changes: 1 addition & 1 deletion SDL2/Xcode/SDL/pkg-support/SDL.info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Title SDL 2.30.0
Title SDL 2.30.1
Version 1
Description SDL Library for Mac OS X (http://www.libsdl.org)
DefaultLocation /Library/Frameworks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 0;
private static final int SDL_MICRO_VERSION = 1;
/*
// Display InputType.SOURCE/CLASS of events and devices
//
Expand Down
2 changes: 1 addition & 1 deletion SDL2/configure
Original file line number Diff line number Diff line change
Expand Up @@ -3510,7 +3510,7 @@ orig_CFLAGS="$CFLAGS"
# See docs/release_checklist.md
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=30
SDL_MICRO_VERSION=0
SDL_MICRO_VERSION=1
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION

SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
Expand Down
2 changes: 1 addition & 1 deletion SDL2/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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=0
SDL_MICRO_VERSION=1
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION

SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
Expand Down
4 changes: 2 additions & 2 deletions 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.0-0-g859844eae (" SDL_VENDOR_INFO ")"
#define SDL_REVISION "SDL-release-2.30.1-0-g5adbf3765 (" SDL_VENDOR_INFO ")"
#else
#define SDL_REVISION "SDL-release-2.30.0-0-g859844eae"
#define SDL_REVISION "SDL-release-2.30.1-0-g5adbf3765"
#endif
#define SDL_REVISION_NUMBER 0
2 changes: 1 addition & 1 deletion 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 0
#define SDL_PATCHLEVEL 1

/**
* Macro to determine SDL version program was compiled against.
Expand Down
80 changes: 80 additions & 0 deletions SDL2/src/SDL_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,86 @@
#define SDL_HAVE_YUV !SDL_LEAN_AND_MEAN
#endif

#ifndef SDL_RENDER_DISABLED
/* define the not defined ones as 0 */
#ifndef SDL_VIDEO_RENDER_D3D
#define SDL_VIDEO_RENDER_D3D 0
#endif
#ifndef SDL_VIDEO_RENDER_D3D11
#define SDL_VIDEO_RENDER_D3D11 0
#endif
#ifndef SDL_VIDEO_RENDER_D3D12
#define SDL_VIDEO_RENDER_D3D12 0
#endif
#ifndef SDL_VIDEO_RENDER_METAL
#define SDL_VIDEO_RENDER_METAL 0
#endif
#ifndef SDL_VIDEO_RENDER_OGL
#define SDL_VIDEO_RENDER_OGL 0
#endif
#ifndef SDL_VIDEO_RENDER_OGL_ES
#define SDL_VIDEO_RENDER_OGL_ES 0
#endif
#ifndef SDL_VIDEO_RENDER_OGL_ES2
#define SDL_VIDEO_RENDER_OGL_ES2 0
#endif
#ifndef SDL_VIDEO_RENDER_DIRECTFB
#define SDL_VIDEO_RENDER_DIRECTFB 0
#endif
#ifndef SDL_VIDEO_RENDER_PS2
#define SDL_VIDEO_RENDER_PS2 0
#endif
#ifndef SDL_VIDEO_RENDER_PSP
#define SDL_VIDEO_RENDER_PSP 0
#endif
#ifndef SDL_VIDEO_RENDER_VITA_GXM
#define SDL_VIDEO_RENDER_VITA_GXM 0
#endif
#else /* define all as 0 */
#undef SDL_VIDEO_RENDER_SW
#define SDL_VIDEO_RENDER_SW 0
#undef SDL_VIDEO_RENDER_D3D
#define SDL_VIDEO_RENDER_D3D 0
#undef SDL_VIDEO_RENDER_D3D11
#define SDL_VIDEO_RENDER_D3D11 0
#undef SDL_VIDEO_RENDER_D3D12
#define SDL_VIDEO_RENDER_D3D12 0
#undef SDL_VIDEO_RENDER_METAL
#define SDL_VIDEO_RENDER_METAL 0
#undef SDL_VIDEO_RENDER_OGL
#define SDL_VIDEO_RENDER_OGL 0
#undef SDL_VIDEO_RENDER_OGL_ES
#define SDL_VIDEO_RENDER_OGL_ES 0
#undef SDL_VIDEO_RENDER_OGL_ES2
#define SDL_VIDEO_RENDER_OGL_ES2 0
#undef SDL_VIDEO_RENDER_DIRECTFB
#define SDL_VIDEO_RENDER_DIRECTFB 0
#undef SDL_VIDEO_RENDER_PS2
#define SDL_VIDEO_RENDER_PS2 0
#undef SDL_VIDEO_RENDER_PSP
#define SDL_VIDEO_RENDER_PSP 0
#undef SDL_VIDEO_RENDER_VITA_GXM
#define SDL_VIDEO_RENDER_VITA_GXM 0
#endif /* SDL_RENDER_DISABLED */

#define SDL_HAS_RENDER_DRIVER \
(SDL_VIDEO_RENDER_SW | \
SDL_VIDEO_RENDER_D3D | \
SDL_VIDEO_RENDER_D3D11 | \
SDL_VIDEO_RENDER_D3D12 | \
SDL_VIDEO_RENDER_METAL | \
SDL_VIDEO_RENDER_OGL | \
SDL_VIDEO_RENDER_OGL_ES | \
SDL_VIDEO_RENDER_OGL_ES2 | \
SDL_VIDEO_RENDER_DIRECTFB | \
SDL_VIDEO_RENDER_PS2 | \
SDL_VIDEO_RENDER_PSP | \
SDL_VIDEO_RENDER_VITA_GXM)

#if !defined(SDL_RENDER_DISABLED) && !SDL_HAS_RENDER_DRIVER
#error SDL_RENDER enabled without any backend drivers.
#endif

#include "SDL_assert.h"
#include "SDL_log.h"

Expand Down
4 changes: 2 additions & 2 deletions SDL2/src/audio/SDL_audiotypecvt.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static void SDLCALL SDL_Convert_U8_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFor

static void SDLCALL SDL_Convert_S16_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format)
{
const int num_samples = cvt->len_cvt;
const int num_samples = cvt->len_cvt / sizeof(Sint16);
const Sint16 *src = (const Sint16 *)cvt->buf;
float *dst = (float *)cvt->buf;
int i;
Expand Down Expand Up @@ -350,7 +350,7 @@ static void SDLCALL SDL_Convert_S8_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioForma
i -= 16;

{
const __m128i bytes = _mm_xor_si128(_mm_loadu_si128((const __m128i *)&src[i-16]), flipper);
const __m128i bytes = _mm_xor_si128(_mm_loadu_si128((const __m128i *)&src[i]), flipper);

const __m128i shorts1 = _mm_unpacklo_epi8(bytes, zero);
const __m128i shorts2 = _mm_unpackhi_epi8(bytes, zero);
Expand Down
12 changes: 1 addition & 11 deletions SDL2/src/core/windows/SDL_windows.h
Original file line number Diff line number Diff line change
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 SDL2/src/core/windows/SDL_xinput.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,15 @@ typedef struct
#endif /* HAVE_XINPUT_H */

/* This struct is not defined in XInput headers. */
typedef struct _XINPUT_CAPABILITIES_EX
typedef struct
{
XINPUT_CAPABILITIES Capabilities;
WORD VendorId;
WORD ProductId;
WORD ProductVersion;
WORD unk1;
DWORD unk2;
} XINPUT_CAPABILITIES_EX, *PXINPUT_CAPABILITIES_EX;
} SDL_XINPUT_CAPABILITIES_EX;

/* Forward decl's for XInput API's we load dynamically and use if available */
typedef DWORD(WINAPI *XInputGetState_t)(
Expand All @@ -244,7 +244,7 @@ typedef DWORD(WINAPI *XInputGetCapabilitiesEx_t)(
DWORD dwReserved, /* [in] Must be 1 */
DWORD dwUserIndex, /* [in] Index of the gamer associated with the device */
DWORD dwFlags, /* [in] Input flags that identify the device type */
XINPUT_CAPABILITIES_EX *pCapabilitiesEx /* [out] Receives the capabilities */
SDL_XINPUT_CAPABILITIES_EX *pCapabilitiesEx /* [out] Receives the capabilities */
);

typedef DWORD(WINAPI *XInputGetBatteryInformation_t)(
Expand Down
4 changes: 2 additions & 2 deletions SDL2/src/core/winrt/SDL_winrtapp_direct3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extern "C" {
#include "SDL_winrtapp_common.h"
#include "SDL_winrtapp_direct3d.h"

#if defined(SDL_VIDEO_RENDER_D3D11) && !defined(SDL_RENDER_DISABLED)
#if SDL_VIDEO_RENDER_D3D11
/* Calling IDXGIDevice3::Trim on the active Direct3D 11.x device is necessary
* when Windows 8.1 apps are about to get suspended.
*/
Expand Down Expand Up @@ -622,7 +622,7 @@ void SDL_WinRTApp::OnSuspending(Platform::Object ^ sender, SuspendingEventArgs ^
// Let the Direct3D 11 renderer prepare for the app to be backgrounded.
// This is necessary for Windows 8.1, possibly elsewhere in the future.
// More details at: http://msdn.microsoft.com/en-us/library/windows/apps/Hh994929.aspx
#if defined(SDL_VIDEO_RENDER_D3D11) && !defined(SDL_RENDER_DISABLED)
#if SDL_VIDEO_RENDER_D3D11
if (WINRT_GlobalSDLWindow) {
SDL_Renderer *renderer = SDL_GetRenderer(WINRT_GlobalSDLWindow);
if (renderer && (SDL_strcmp(renderer->info.name, "direct3d11") == 0)) {
Expand Down
14 changes: 8 additions & 6 deletions SDL2/src/joystick/SDL_gamecontroller.c
Original file line number Diff line number Diff line change
Expand Up @@ -3259,10 +3259,11 @@ const char *SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController
}
SDL_UnlockJoysticks();

return retval;
#else
return NULL;
if (retval && *retval) {
return retval;
}
#endif
return NULL;
}

const char *SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)
Expand All @@ -3279,10 +3280,11 @@ const char *SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *g
}
SDL_UnlockJoysticks();

return retval;
#else
return NULL;
if (retval && *retval) {
return retval;
}
#endif
return NULL;
}

/* vi: set ts=4 sw=4 expandtab: */
1 change: 1 addition & 0 deletions SDL2/src/joystick/SDL_gamecontrollerdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ static const char *s_ControllerMappings[] = {
"03000000a30600002106000000000000,Saitek PS1000,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,",
"03000000a306000020f6000000000000,Saitek PS2700,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,",
"03000000300f00001101000000000000,Saitek Rumble Pad,a:b2,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,",
"03000000790000000600000000000000,Sanwa Supply JY-P76USV,crc:20f0,+leftx:+a0,+rightx:+a2,+righty:a4,-leftx:-a0,-lefty:-a1,-rightx:-a2,-righty:-a4,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,lefty:+a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b2,y:b3,",
"0300000000050000289b000000000000,Saturn_Adapter_2.0,a:b1,b:b2,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,",
"030000009b2800000500000000000000,Saturn_Adapter_2.0,a:b1,b:b2,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,",
"030000008f0e00000800000000000000,SpeedLink Strike FX,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,",
Expand Down
1 change: 1 addition & 0 deletions SDL2/src/joystick/SDL_joystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ static Uint32 initial_wheel_devices[] = {
MAKE_VIDPID(0x0eb7, 0x038e), /* Fanatec ClubSport Wheel Base V1 */
MAKE_VIDPID(0x0eb7, 0x0e03), /* Fanatec CSL Elite Wheel Base */
MAKE_VIDPID(0x11ff, 0x0511), /* DragonRise Inc. Wired Wheel (initial mode) (also known as PXN V900 (PS3), Superdrive SV-750, or a Genesis Seaborg 400) */
MAKE_VIDPID(0x1209, 0xffb0), /* Generic FFBoard OpenFFBoard universal forcefeedback wheel */
MAKE_VIDPID(0x2433, 0xf300), /* Asetek SimSports Invicta Wheelbase */
MAKE_VIDPID(0x2433, 0xf301), /* Asetek SimSports Forte Wheelbase */
MAKE_VIDPID(0x2433, 0xf303), /* Asetek SimSports La Prima Wheelbase */
Expand Down
1 change: 1 addition & 0 deletions SDL2/src/joystick/SDL_steam_virtual_gamepad.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ SDL_bool SDL_UpdateSteamVirtualGamepadInfo(void)
if (slot >= 0) {
AddVirtualGamepadInfo(slot, &info);
}
SDL_free(info.name);
SDL_free(data);

SDL_steam_virtual_gamepad_info_file_mtime = mtime;
Expand Down
Loading

0 comments on commit 825ccc9

Please sign in to comment.