mirror of
https://github.com/love2d/love-android.git
synced 2026-08-12 00:20:57 +02:00
Only launch LOVE if user actually select file in the file picker.
This commit is contained in:
@@ -34,9 +34,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
private final ActivityResultLauncher<String[]> openFileLauncher = registerForActivityResult(
|
||||
new ActivityResultContracts.OpenDocument(),
|
||||
(Uri result) -> {
|
||||
Intent intent = new Intent(this, GameActivity.class);
|
||||
intent.setData(result);
|
||||
startActivity(intent);
|
||||
if (result != null) {
|
||||
Intent intent = new Intent(this, GameActivity.class);
|
||||
intent.setData(result);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user