From 01b964b01aad3f46611e5fec8c44b60ed04a9b3f Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 8 Nov 2020 23:50:30 +0100 Subject: [PATCH] Android: Don't consider .dff files valid for game list --- .../org/dolphinemu/dolphinemu/ui/main/MainActivity.java | 3 ++- .../dolphinemu/dolphinemu/ui/main/TvMainActivity.java | 3 ++- .../dolphinemu/dolphinemu/utils/FileBrowserHelper.java | 9 ++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java index f09668713f..f68e5e19af 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java @@ -206,7 +206,8 @@ public final class MainActivity extends AppCompatActivity implements MainView break; case MainPresenter.REQUEST_GAME_FILE: - FileBrowserHelper.runAfterExtensionCheck(this, uri, FileBrowserHelper.GAME_EXTENSIONS, + FileBrowserHelper.runAfterExtensionCheck(this, uri, + FileBrowserHelper.GAME_LIKE_EXTENSIONS, () -> EmulationActivity.launch(this, result.getData().toString())); break; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/TvMainActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/TvMainActivity.java index 262cff6c00..90529d21cf 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/TvMainActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/TvMainActivity.java @@ -230,7 +230,8 @@ public final class TvMainActivity extends FragmentActivity implements MainView break; case MainPresenter.REQUEST_GAME_FILE: - FileBrowserHelper.runAfterExtensionCheck(this, uri, FileBrowserHelper.GAME_EXTENSIONS, + FileBrowserHelper.runAfterExtensionCheck(this, uri, + FileBrowserHelper.GAME_LIKE_EXTENSIONS, () -> EmulationActivity.launch(this, result.getData().toString())); break; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/FileBrowserHelper.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/FileBrowserHelper.java index f3735eabea..82f16519fa 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/FileBrowserHelper.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/FileBrowserHelper.java @@ -28,7 +28,14 @@ import java.util.Set; public final class FileBrowserHelper { public static final HashSet GAME_EXTENSIONS = new HashSet<>(Arrays.asList( - "gcm", "tgc", "iso", "ciso", "gcz", "wbfs", "wia", "rvz", "wad", "dol", "elf", "dff")); + "gcm", "tgc", "iso", "ciso", "gcz", "wbfs", "wia", "rvz", "wad", "dol", "elf")); + + public static final HashSet GAME_LIKE_EXTENSIONS = new HashSet<>(GAME_EXTENSIONS); + + static + { + GAME_LIKE_EXTENSIONS.add("dff"); + } public static final HashSet RAW_EXTENSION = new HashSet<>(Collections.singletonList( "raw"));