Skip to content

Commit 1d4c1aa

Browse files
authored
Merge pull request #145 from OpenBrickProtocolFoundation/update-sdl
Update sdl to 2.30.3
2 parents 5665a48 + ac0c00e commit 1d4c1aa

File tree

18 files changed

+1809
-84
lines changed

18 files changed

+1809
-84
lines changed

.github/workflows/android.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ jobs:
4646

4747
- name: Setup NDK
4848
run: |
49-
sdkmanager --install "ndk;26.3.11579264"
49+
sdkmanager --install "ndk;27.0.11718014"
5050
51-
- name: Build natibe libraries
51+
52+
- name: Build native libraries
5253
run: |
5354
bash ./platforms/build-android.sh ${{ matrix.config.arch }} complete_rebuild release
5455
cp -r ./assets/ platforms/android/app/src/main

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ project(
1111
'b_ndebug': 'if-release',
1212

1313
},
14-
version: '0.5.4',
14+
version: '0.5.5',
1515
)
1616

1717
subdir('tools/options')

platforms/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,14 @@ android {
212212
}
213213

214214
compileSdkVersion 34
215-
ndkVersion "26.3.11579264"
215+
ndkVersion "27.0.11718014-rc1"
216216
defaultConfig {
217217
if (buildAsApplication) {
218218
applicationId "com.github.oopetris"
219219
}
220220
minSdkVersion 21
221221
targetSdkVersion 34
222-
versionCode 5
222+
versionCode 6
223223
versionName(versionString)
224224
}
225225
buildTypes {

platforms/android/app/jni/Android.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SUBPROJECTS_PATH :=$(BUILD_PATH)/subprojects
66

77
include $(CLEAR_VARS)
88
LOCAL_MODULE := SDL2
9-
LIB_PATH := $(SUBPROJECTS_PATH)/SDL2-2.28.5
9+
LIB_PATH := $(SUBPROJECTS_PATH)/SDL2-2.30.3
1010
LOCAL_C_INCLUDES := $(LIB_PATH)/include
1111
LOCAL_SRC_FILES := $(LIB_PATH)/libsdl2.so
1212
include $(PREBUILT_SHARED_LIBRARY)

platforms/android/app/src/main/AndroidManifest.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
android:required="false" /> -->
3939

4040
<!-- Allow downloading to the external storage on Android 5.1 and older -->
41-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="22" />
41+
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="22" /> -->
4242

4343
<!-- Allow access to Bluetooth devices -->
4444
<!-- Currently this is just for Steam Controller support and requires setting SDL_HINT_JOYSTICK_HIDAPI_STEAM -->
@@ -51,6 +51,14 @@
5151
<!-- if you want to capture audio, uncomment this. -->
5252
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
5353

54+
<!-- Create a Java class extending SDLActivity and place it in a
55+
directory under app/src/main/java matching the package, e.g. app/src/main/java/com/gamemaker/game/MyGame.java
56+
57+
then replace "SDLActivity" with the name of your class (e.g. "MyGame")
58+
in the XML below.
59+
60+
An example Java class can be found in README-android.md
61+
-->
5462
<application android:label="@string/app_name"
5563
android:icon="@mipmap/ic_launcher"
5664
android:allowBackup="true"
@@ -68,7 +76,6 @@
6876
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
6977
android:preferMinimalPostProcessing="true"
7078
android:exported="true"
71-
android:screenOrientation="portrait"
7279
>
7380
<intent-filter>
7481
<action android:name="android.intent.action.MAIN" />
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package org.libsdl.app;
2+
3+
import android.hardware.usb.UsbDevice;
4+
5+
interface HIDDevice
6+
{
7+
public int getId();
8+
public int getVendorId();
9+
public int getProductId();
10+
public String getSerialNumber();
11+
public int getVersion();
12+
public String getManufacturerName();
13+
public String getProductName();
14+
public UsbDevice getDevice();
15+
public boolean open();
16+
public int sendFeatureReport(byte[] report);
17+
public int sendOutputReport(byte[] report);
18+
public boolean getFeatureReport(byte[] report);
19+
public void setFrozen(boolean frozen);
20+
public void close();
21+
public void shutdown();
22+
}

0 commit comments

Comments
 (0)