Compare commits

...

8 Commits

Author SHA1 Message Date
Miku AuahDark 55feb38fa1 Release 11.5 hotfix 1. 2023-12-29 13:51:37 +08:00
Miku AuahDark 6811eca7d2 Artifact unstripped .so files. 2023-12-29 13:32:16 +08:00
Miku AuahDark d1f74df686 Don't set the intent to null, only set the intent data to null.
Issue #260.
2023-12-25 12:23:18 +08:00
Miku AuahDark c3ed3b454b Sanitize destination filename from content URI.
Fixes #257.
2023-12-23 13:08:00 +08:00
Miku AuahDark 8a3d635cdb LOVE Loader: Add missing FLAG_GRANT_READ_URI_PERMISSION flag. 2023-12-23 12:58:55 +08:00
Miku AuahDark a81931be2c Merge pull request #259 from marclurr/fix-embedding
Fix embedding
2023-12-10 17:57:26 +08:00
Mark 7a0068535b Remove unreachable code 2023-12-09 14:52:26 +00:00
Mark 034a6d6361 initialise needToCopyGameInArchive inside onCreate based on the value
of embed
2023-12-09 12:29:23 +00:00
4 changed files with 16 additions and 9 deletions
+5
View File
@@ -43,3 +43,8 @@ jobs:
with:
name: love-android-embed.aab
path: app/build/outputs/bundle/embedNoRecordRelease/app-embed-noRecord-release.aab
- name: Artifact (Debug symbols)
uses: actions/upload-artifact@v3
with:
name: love-android-unstripped-debugsyms
path: love/build/intermediates/library_jni
+2 -2
View File
@@ -8,8 +8,8 @@ app.name_byte_array=76,195,150,86,69,32,102,111,114,32,65,110,100,114,111,105,10
app.application_id=org.love2d.android
app.orientation=landscape
app.version_code=31
app.version_name=11.5
app.version_code=32
app.version_name=11.5a
# No need to modify anything past this line!
android.enableJetifier=false
@@ -114,10 +114,12 @@ public class GameActivity extends SDLActivity {
gamePath = "";
storagePermissionUnnecessary = false;
embed = getResources().getBoolean(R.bool.embed);
needToCopyGameInArchive = embed;
if (!embed) {
handleIntent(getIntent());
setIntent(null);
Intent intent = getIntent();
handleIntent(intent);
intent.setData(null);
}
super.onCreate(savedInstanceState);
@@ -171,6 +173,9 @@ public class GameActivity extends SDLActivity {
filename = pathSegments[pathSegments.length - 1];
}
// Sanitize filename to prevent PhysFS complaining later.
filename = filename.replaceAll("[^a-zA-Z0-9_\\\\-\\\\.]", "_");
String destination_file = this.getCacheDir().getPath() + "/" + filename;
InputStream data = getContentResolver().openInputStream(game);
@@ -200,11 +205,6 @@ public class GameActivity extends SDLActivity {
alert_dialog.setCancelable(false);
alert_dialog.create().show();
}
} else {
// No game specified via the intent data or embed build is used.
// Load game archive only when needed.
needToCopyGameInArchive = embed;
gamePath = "";
}
Log.d("GameActivity", "new gamePath: " + gamePath);
@@ -48,8 +48,10 @@ public class SelectorActivity extends AppCompatActivity {
new ActivityResultContracts.OpenDocument(),
(Uri result) -> {
if (result != null) {
Intent intent = new Intent(SelectorActivity.this, GameActivity.class);
intent.setData(result);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(intent);
}