Skip to content

Commit 6bfc84c

Browse files
author
github-actions[bot]
committed
Update android-project
1 parent 33a3ebc commit 6bfc84c

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

app/proguard-rules.pro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
void manualBackButton();
3636
int messageboxShowMessageBox(int, java.lang.String, java.lang.String, int[], int[], java.lang.String[], int[]);
3737
void minimizeWindow();
38-
int openURL(java.lang.String);
38+
boolean openURL(java.lang.String);
3939
void requestPermission(java.lang.String, int);
40-
int showToast(java.lang.String, int, int, int, int);
40+
boolean showToast(java.lang.String, int, int, int, int);
4141
boolean sendMessage(int, int);
4242
boolean setActivityTitle(java.lang.String);
4343
boolean setCustomCursor(int);

app/src/main/AndroidManifest.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
<!-- Audio recording support -->
3535
<!-- if you want to record audio, uncomment this. -->
36+
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
3637
<!-- <uses-feature
3738
android:name="android.hardware.microphone"
3839
android:required="false" /> -->
@@ -55,8 +56,11 @@
5556
<!-- Allow access to the vibrator -->
5657
<uses-permission android:name="android.permission.VIBRATE" />
5758

58-
<!-- if you want to record audio, uncomment this. -->
59-
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
59+
<!-- Allow access to Internet -->
60+
<!-- if you want to connect to the network or internet, uncomment this. -->
61+
<!--
62+
<uses-permission android:name="android.permission.INTERNET" />
63+
-->
6064

6165
<!-- Create a Java class extending SDLActivity and place it in a
6266
directory under app/src/main/java matching the package, e.g. app/src/main/java/com/gamemaker/game/MyGame.java
@@ -80,7 +84,7 @@
8084
android:label="@string/app_name"
8185
android:alwaysRetainTaskState="true"
8286
android:launchMode="singleInstance"
83-
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
87+
android:configChanges="layoutDirection|locale|grammaticalGender|fontScale|fontWeightAdjustment|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
8488
android:preferMinimalPostProcessing="true"
8589
android:exported="true"
8690
>

app/src/main/java/org/libsdl/app/HIDDeviceUSB.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ public boolean open() {
154154

155155
@Override
156156
public int writeReport(byte[] report, boolean feature) {
157+
if (mConnection == null) {
158+
Log.w(TAG, "writeReport() called with no device connection");
159+
return -1;
160+
}
161+
157162
if (feature) {
158163
int res = -1;
159164
int offset = 0;
@@ -201,6 +206,11 @@ public boolean readReport(byte[] report, boolean feature) {
201206
boolean skipped_report_id = false;
202207
byte report_number = report[0];
203208

209+
if (mConnection == null) {
210+
Log.w(TAG, "readReport() called with no device connection");
211+
return false;
212+
}
213+
204214
if (report_number == 0x0) {
205215
/* Offset the return buffer by 1, so that the report ID
206216
will remain in byte 0. */

app/src/main/java/org/libsdl/app/SDLActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
6060
private static final String TAG = "SDL";
6161
private static final int SDL_MAJOR_VERSION = 3;
6262
private static final int SDL_MINOR_VERSION = 1;
63-
private static final int SDL_MICRO_VERSION = 2;
63+
private static final int SDL_MICRO_VERSION = 7;
6464
/*
6565
// Display InputType.SOURCE/CLASS of events and devices
6666
//
@@ -88,7 +88,7 @@ public static void debugSource(int sources, String prefix) {
8888
| InputDevice.SOURCE_CLASS_POSITION
8989
| InputDevice.SOURCE_CLASS_TRACKBALL);
9090
91-
if (s2 != 0) cls += "Some_Unkown";
91+
if (s2 != 0) cls += "Some_Unknown";
9292
9393
s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class;
9494
@@ -162,7 +162,7 @@ public static void debugSource(int sources, String prefix) {
162162
if (s == FLAG_TAINTED) src += " FLAG_TAINTED";
163163
s2 &= ~FLAG_TAINTED;
164164
165-
if (s2 != 0) src += " Some_Unkown";
165+
if (s2 != 0) src += " Some_Unknown";
166166
167167
Log.v(TAG, prefix + "int=" + s_copy + " CLASS={" + cls + " } source(s):" + src);
168168
}

0 commit comments

Comments
 (0)