From 034a6d6361bd8bc1258200a52d1c2d799b63d11e Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 9 Dec 2023 12:29:23 +0000 Subject: [PATCH 1/2] initialise needToCopyGameInArchive inside onCreate based on the value of embed --- love/src/main/java/org/love2d/android/GameActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/love/src/main/java/org/love2d/android/GameActivity.java b/love/src/main/java/org/love2d/android/GameActivity.java index 1f1871ee..b79e43b7 100644 --- a/love/src/main/java/org/love2d/android/GameActivity.java +++ b/love/src/main/java/org/love2d/android/GameActivity.java @@ -114,6 +114,7 @@ protected void onCreate(Bundle savedInstanceState) { gamePath = ""; storagePermissionUnnecessary = false; embed = getResources().getBoolean(R.bool.embed); + needToCopyGameInArchive = embed; if (!embed) { handleIntent(getIntent()); From 7a0068535b498506f267303f327a617474ed576e Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 9 Dec 2023 14:52:26 +0000 Subject: [PATCH 2/2] Remove unreachable code --- love/src/main/java/org/love2d/android/GameActivity.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/love/src/main/java/org/love2d/android/GameActivity.java b/love/src/main/java/org/love2d/android/GameActivity.java index b79e43b7..b8ec2296 100644 --- a/love/src/main/java/org/love2d/android/GameActivity.java +++ b/love/src/main/java/org/love2d/android/GameActivity.java @@ -201,11 +201,6 @@ public void onClick(DialogInterface dialog, int id) { 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);