Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 138b288

Browse files
committed
Merge commit '2eef7ca475decd2b864214cdbfe72b143b16d459'
2 parents a026a9c + 2eef7ca commit 138b288

34 files changed

+397
-177
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ endif()
8787
# See docs/release_checklist.md
8888
set(SDL_MAJOR_VERSION 2)
8989
set(SDL_MINOR_VERSION 30)
90-
set(SDL_MICRO_VERSION 4)
90+
set(SDL_MICRO_VERSION 5)
9191
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
9292

9393
# Set defaults preventing destination file conflicts
@@ -1674,7 +1674,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
16741674
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
16751675
CheckUSBHID()
16761676
endif()
1677-
if(LINUX AND HAVE_LINUX_INPUT_H AND NOT ANDROID)
1677+
if((LINUX OR FREEBSD) AND HAVE_LINUX_INPUT_H AND NOT ANDROID)
16781678
set(SDL_JOYSTICK_LINUX 1)
16791679
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
16801680
list(APPEND SOURCE_FILES ${JOYSTICK_SOURCES})

Makefile.os2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
LIBNAME = SDL2
1616
MAJOR_VERSION = 2
1717
MINOR_VERSION = 30
18-
MICRO_VERSION = 4
18+
MICRO_VERSION = 5
1919
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
2020
DESCRIPTION = Simple DirectMedia Layer 2
2121

Makefile.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
LIBNAME = SDL2
77
MAJOR_VERSION = 2
88
MINOR_VERSION = 30
9-
MICRO_VERSION = 4
9+
MICRO_VERSION = 5
1010
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
1111

1212
LIBHOME = .

Xcode/SDL/Info-Framework.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
<key>CFBundlePackageType</key>
2020
<string>FMWK</string>
2121
<key>CFBundleShortVersionString</key>
22-
<string>2.30.4</string>
22+
<string>2.30.5</string>
2323
<key>CFBundleSignature</key>
2424
<string>SDLX</string>
2525
<key>CFBundleVersion</key>
26-
<string>2.30.4</string>
26+
<string>2.30.5</string>
2727
</dict>
2828
</plist>

Xcode/SDL/SDL.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9729,7 +9729,7 @@
97299729
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
97309730
DEPLOYMENT_POSTPROCESSING = YES;
97319731
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
9732-
DYLIB_CURRENT_VERSION = 3001.4.0;
9732+
DYLIB_CURRENT_VERSION = 3001.5.0;
97339733
DYLIB_INSTALL_NAME_BASE = "@rpath";
97349734
ENABLE_STRICT_OBJC_MSGSEND = YES;
97359735
GCC_ALTIVEC_EXTENSIONS = YES;
@@ -9770,7 +9770,7 @@
97709770
isa = XCBuildConfiguration;
97719771
buildSettings = {
97729772
CLANG_LINK_OBJC_RUNTIME = NO;
9773-
MARKETING_VERSION = 2.30.4;
9773+
MARKETING_VERSION = 2.30.5;
97749774
OTHER_LDFLAGS = "-liconv";
97759775
};
97769776
name = Release;
@@ -9814,7 +9814,7 @@
98149814
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
98159815
DEBUG_INFORMATION_FORMAT = dwarf;
98169816
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
9817-
DYLIB_CURRENT_VERSION = 3001.4.0;
9817+
DYLIB_CURRENT_VERSION = 3001.5.0;
98189818
DYLIB_INSTALL_NAME_BASE = "@rpath";
98199819
ENABLE_STRICT_OBJC_MSGSEND = YES;
98209820
ENABLE_TESTABILITY = YES;
@@ -9856,7 +9856,7 @@
98569856
isa = XCBuildConfiguration;
98579857
buildSettings = {
98589858
CLANG_LINK_OBJC_RUNTIME = NO;
9859-
MARKETING_VERSION = 2.30.4;
9859+
MARKETING_VERSION = 2.30.5;
98609860
OTHER_LDFLAGS = "-liconv";
98619861
};
98629862
name = Debug;
@@ -10063,7 +10063,7 @@
1006310063
DEFINES_MODULE = YES;
1006410064
DEVELOPMENT_TEAM = "";
1006510065
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
10066-
DYLIB_CURRENT_VERSION = 3001.4.0;
10066+
DYLIB_CURRENT_VERSION = 3001.5.0;
1006710067
DYLIB_INSTALL_NAME_BASE = "@rpath";
1006810068
GCC_C_LANGUAGE_STANDARD = gnu11;
1006910069
GCC_DYNAMIC_NO_PIC = NO;
@@ -10115,7 +10115,7 @@
1011510115
DEFINES_MODULE = YES;
1011610116
DEVELOPMENT_TEAM = "";
1011710117
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
10118-
DYLIB_CURRENT_VERSION = 3001.4.0;
10118+
DYLIB_CURRENT_VERSION = 3001.5.0;
1011910119
DYLIB_INSTALL_NAME_BASE = "@rpath";
1012010120
ENABLE_NS_ASSERTIONS = NO;
1012110121
GCC_C_LANGUAGE_STANDARD = gnu11;

Xcode/SDL/pkg-support/SDL.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Title SDL 2.30.4
1+
Title SDL 2.30.5
22
Version 1
33
Description SDL Library for Mac OS X (http://www.libsdl.org)
44
DefaultLocation /Library/Frameworks

android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ private boolean isXboxOneController(UsbDevice usbDevice, UsbInterface usbInterfa
277277
0x044f, // Thrustmaster
278278
0x045e, // Microsoft
279279
0x0738, // Mad Catz
280+
0x0b05, // ASUS
280281
0x0e6f, // PDP
281282
0x0f0d, // Hori
282283
0x10f5, // Turtle Beach
@@ -590,7 +591,13 @@ public boolean openDevice(int deviceID) {
590591
} else {
591592
flags = 0;
592593
}
593-
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags));
594+
if (Build.VERSION.SDK_INT >= 33 /* Android 14.0 (U) */) {
595+
Intent intent = new Intent(HIDDeviceManager.ACTION_USB_PERMISSION);
596+
intent.setPackage(mContext.getPackageName());
597+
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, intent, flags));
598+
} else {
599+
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags));
600+
}
594601
} catch (Exception e) {
595602
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
596603
HIDDeviceOpenResult(deviceID, false);

android-project/app/src/main/java/org/libsdl/app/SDL.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ public static Context getContext() {
3838
}
3939

4040
public static void loadLibrary(String libraryName) throws UnsatisfiedLinkError, SecurityException, NullPointerException {
41+
loadLibrary(libraryName, mContext);
42+
}
43+
44+
public static void loadLibrary(String libraryName, Context context) throws UnsatisfiedLinkError, SecurityException, NullPointerException {
4145

4246
if (libraryName == null) {
4347
throw new NullPointerException("No library name provided.");
@@ -53,10 +57,10 @@ public static void loadLibrary(String libraryName) throws UnsatisfiedLinkError,
5357
// To use ReLinker, just add it as a dependency. For more information, see
5458
// https://github.com/KeepSafe/ReLinker for ReLinker's repository.
5559
//
56-
Class<?> relinkClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
57-
Class<?> relinkListenerClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
58-
Class<?> contextClass = mContext.getClassLoader().loadClass("android.content.Context");
59-
Class<?> stringClass = mContext.getClassLoader().loadClass("java.lang.String");
60+
Class<?> relinkClass = context.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
61+
Class<?> relinkListenerClass = context.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
62+
Class<?> contextClass = context.getClassLoader().loadClass("android.content.Context");
63+
Class<?> stringClass = context.getClassLoader().loadClass("java.lang.String");
6064

6165
// Get a 'force' instance of the ReLinker, so we can ensure libraries are reinstalled if
6266
// they've changed during updates.
@@ -66,7 +70,7 @@ public static void loadLibrary(String libraryName) throws UnsatisfiedLinkError,
6670

6771
// Actually load the library!
6872
Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass);
69-
loadMethod.invoke(relinkInstance, mContext, libraryName, null, null);
73+
loadMethod.invoke(relinkInstance, context, libraryName, null, null);
7074
}
7175
catch (final Throwable e) {
7276
// Fall back

android-project/app/src/main/java/org/libsdl/app/SDLActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
6161
private static final String TAG = "SDL";
6262
private static final int SDL_MAJOR_VERSION = 2;
6363
private static final int SDL_MINOR_VERSION = 30;
64-
private static final int SDL_MICRO_VERSION = 4;
64+
private static final int SDL_MICRO_VERSION = 5;
6565
/*
6666
// Display InputType.SOURCE/CLASS of events and devices
6767
//
@@ -281,7 +281,7 @@ protected String[] getLibraries() {
281281
// Load the .so
282282
public void loadLibraries() {
283283
for (String lib : getLibraries()) {
284-
SDL.loadLibrary(lib);
284+
SDL.loadLibrary(lib, this);
285285
}
286286
}
287287

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3508,7 +3508,7 @@ orig_CFLAGS="$CFLAGS"
35083508
# See docs/release_checklist.md
35093509
SDL_MAJOR_VERSION=2
35103510
SDL_MINOR_VERSION=30
3511-
SDL_MICRO_VERSION=4
3511+
SDL_MICRO_VERSION=5
35123512
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
35133513

35143514
SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`

0 commit comments

Comments
 (0)