Android: Support PSFs in game list

This commit is contained in:
Connor McLaughlin 2021-01-24 17:51:13 +10:00
parent 4a60cc4c1e
commit a84bf0d8cf
5 changed files with 32 additions and 5 deletions

View File

@ -1,6 +1,5 @@
package com.github.stenzek.duckstation;
import android.net.Uri;
import android.os.AsyncTask;
import android.view.View;
import android.widget.ImageView;
@ -12,7 +11,8 @@ public class GameListEntry {
public enum EntryType {
Disc,
PSExe,
Playlist
Playlist,
PSF
}
public enum CompatibilityRating {
@ -122,6 +122,9 @@ public class GameListEntry {
case PAL:
regionDrawableId = R.drawable.flag_eu;
break;
case Other:
regionDrawableId = R.drawable.ic_baseline_help_24;
break;
case NTSC_U:
default:
regionDrawableId = R.drawable.flag_us;
@ -141,6 +144,10 @@ public class GameListEntry {
typeDrawableId = R.drawable.ic_baseline_playlist_play_24;
break;
case PSF:
typeDrawableId = R.drawable.ic_baseline_library_music_24;
break;
case Disc:
default:
typeDrawableId = R.drawable.ic_media_cdrom;

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,19h-2v-2h2v2zM15.07,11.25l-0.9,0.92C13.45,12.9 13,13.5 13,15h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,9c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88 -0.36,1.68 -0.93,2.25z"/>
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M20,2L8,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM18,7h-3v5.5c0,1.38 -1.12,2.5 -2.5,2.5S10,13.88 10,12.5s1.12,-2.5 2.5,-2.5c0.57,0 1.08,0.19 1.5,0.51L14,5h4v2zM4,6L2,6v14c0,1.1 0.9,2 2,2h14v-2L4,20L4,6z"/>
</vector>

View File

@ -107,7 +107,7 @@
<string name="menu_main_resume_last_session">Hervat Vorige Sessie</string>
<string name="menu_main_start_file">Start Bestand</string>
<string name="menu_main_start_bios">Start BIOS</string>
<string name="menu_main_add_game_directory">Voeg Game Folder Toe</string>
<string name="menu_main_edit_game_directories">Bewerk Gamemappen</string>
<string name="menu_main_scan_for_new_games">Scan Naar Nieuwe Spellen</string>
<string name="menu_main_rescan_all_games">Alle Spellen Opnieuw Scannen</string>
<string name="menu_main_import_bios">Importeer BIOS</string>

View File

@ -109,7 +109,7 @@
<string name="menu_main_resume_last_session">Resumir Jogo</string>
<string name="menu_main_start_file">Iniciar Arquivo</string>
<string name="menu_main_start_bios">Iniciar BIOS</string>
<string name="menu_main_add_game_directory">Adicionar Diretório de Jogo</string>
<string name="menu_main_edit_game_directories">Editar Diretórios de Jogos</string>
<string name="menu_main_scan_for_new_games">Escanear Jogos Novos</string>
<string name="menu_main_rescan_all_games">Rescanear Tudo</string>
<string name="menu_main_import_bios">Importar BIOS</string>