mirror of
https://github.com/libretro/RetroArch
synced 2025-03-20 19:21:27 +00:00
(Database) Serial scanning for Wii now includes WBFS (#13816)
* Update task_database.c
This commit is contained in:
parent
acf21260e7
commit
686628b8ad
@ -616,6 +616,10 @@ static int task_database_iterate_playlist(
|
||||
break;
|
||||
/* Consider Wii WBFS files similar to ISO files. */
|
||||
case FILE_TYPE_WBFS:
|
||||
db_state->serial[0] = '\0';
|
||||
intfstream_file_get_serial(name, 0, SIZE_MAX, db_state->serial);
|
||||
db->type = DATABASE_TYPE_SERIAL_LOOKUP;
|
||||
break;
|
||||
case FILE_TYPE_ISO:
|
||||
db_state->serial[0] = '\0';
|
||||
intfstream_file_get_serial(name, 0, SIZE_MAX, db_state->serial);
|
||||
|
@ -66,6 +66,7 @@ static struct magic_entry MAGIC_NUMBERS[] = {
|
||||
{ 0x000010, "Sega - Saturn", "\x53\x45\x47\x41\x20\x53\x45\x47\x41\x53\x41\x54\x55\x52\x4e", 15},
|
||||
{ 0x000010, "Sega - Dreamcast", "\x53\x45\x47\x41\x20\x53\x45\x47\x41\x4b\x41\x54\x41\x4e\x41", 15},
|
||||
{ 0x000018, "Nintendo - Wii", "\x5d\x1c\x9e\xa3", 4},
|
||||
{ 0x000218, "Nintendo - Wii", "\x5d\x1c\x9e\xa3", 4},
|
||||
{ 0x00001c, "Nintendo - GameCube", "\xc2\x33\x9f\x3d", 4},
|
||||
{ 0x008008, "Sony - PlayStation Portable", "\x50\x53\x50\x20\x47\x41\x4d\x45", 8},
|
||||
{ 0x008008, "Sony - PlayStation", "\x50\x4c\x41\x59\x53\x54\x41\x54\x49\x4f\x4e", 11},
|
||||
@ -868,6 +869,13 @@ int detect_wii_game(intfstream_t *fd, char *game_id, const char *filename)
|
||||
if (intfstream_read(fd, raw_game_id, 6) <= 0)
|
||||
return false;
|
||||
|
||||
if (string_is_equal_fast(raw_game_id, "WBFS", 4))
|
||||
{
|
||||
if (intfstream_seek(fd, 0x0200, SEEK_SET) < 0)
|
||||
return false;
|
||||
if (intfstream_read(fd, raw_game_id, 6) <= 0)
|
||||
return false;
|
||||
}
|
||||
raw_game_id[6] = '\0';
|
||||
|
||||
/** Scrub files with bad data and log **/
|
||||
|
Loading…
x
Reference in New Issue
Block a user