Android: Don't consider .dff files valid for game list

This commit is contained in:
JosJuice 2020-11-08 23:50:30 +01:00
parent 73855168f3
commit 01b964b01a
3 changed files with 12 additions and 3 deletions

View File

@ -206,7 +206,8 @@ public final class MainActivity extends AppCompatActivity implements MainView
break; break;
case MainPresenter.REQUEST_GAME_FILE: 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())); () -> EmulationActivity.launch(this, result.getData().toString()));
break; break;

View File

@ -230,7 +230,8 @@ public final class TvMainActivity extends FragmentActivity implements MainView
break; break;
case MainPresenter.REQUEST_GAME_FILE: 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())); () -> EmulationActivity.launch(this, result.getData().toString()));
break; break;

View File

@ -28,7 +28,14 @@ import java.util.Set;
public final class FileBrowserHelper public final class FileBrowserHelper
{ {
public static final HashSet<String> GAME_EXTENSIONS = new HashSet<>(Arrays.asList( public static final HashSet<String> 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<String> GAME_LIKE_EXTENSIONS = new HashSet<>(GAME_EXTENSIONS);
static
{
GAME_LIKE_EXTENSIONS.add("dff");
}
public static final HashSet<String> RAW_EXTENSION = new HashSet<>(Collections.singletonList( public static final HashSet<String> RAW_EXTENSION = new HashSet<>(Collections.singletonList(
"raw")); "raw"));