Improve file information screen (#112)

Adds extra emulator ROM extensions.
Adds Controller Pak extension used by ares.
This commit is contained in:
Robin Jones 2024-06-11 01:59:30 +01:00 committed by GitHub
parent 208527a9ac
commit 7a2833cf34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,8 +13,8 @@ static const char *patch_extensions[] = { "aps", "bps", "ips", "pps", "ups", "xd
static const char *archive_extensions[] = { "zip", "rar", "7z", "tar", "gz", NULL }; static const char *archive_extensions[] = { "zip", "rar", "7z", "tar", "gz", NULL };
static const char *image_extensions[] = { "png", "jpg", "gif", NULL }; static const char *image_extensions[] = { "png", "jpg", "gif", NULL };
static const char *music_extensions[] = { "mp3", "wav", "ogg", "wma", "flac", NULL }; static const char *music_extensions[] = { "mp3", "wav", "ogg", "wma", "flac", NULL };
static const char *dexdrive_extensions[] = { "mpk", NULL }; static const char *controller_pak_extensions[] = { "mpk", "pak", NULL };
static const char *emulator_extensions[] = { "emu", NULL }; static const char *emulator_extensions[] = { "nes", "smc", "gb", "gbc", "sms", "gg", NULL };
static struct stat st; static struct stat st;
@ -39,10 +39,10 @@ static char *format_file_type (char *name, bool is_directory) {
return " Type: Image file\n"; return " Type: Image file\n";
} else if (file_has_extensions(name, music_extensions)) { } else if (file_has_extensions(name, music_extensions)) {
return " Type: Music file\n"; return " Type: Music file\n";
} else if (file_has_extensions(name, dexdrive_extensions)) { } else if (file_has_extensions(name, controller_pak_extensions)) {
return " Type: DexDrive CPak backup file\n"; return " Type: Controller Pak file\n";
} else if (file_has_extensions(name, emulator_extensions)) { } else if (file_has_extensions(name, emulator_extensions)) {
return " Type: Emulator file\n"; return " Type: Emulator ROM file\n";
} }
return " Type: Unknown file\n"; return " Type: Unknown file\n";
} }