diff --git a/msg_hash.h b/msg_hash.h index 6db6443f29..5742d514be 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -136,6 +136,7 @@ enum msg_file_type FILE_TYPE_ISO, FILE_TYPE_LUTRO, FILE_TYPE_CHD, + FILE_TYPE_WBFS, FILE_TYPE_DIRECT_LOAD, @@ -665,7 +666,7 @@ enum msg_hash_enums MENU_LABEL(INPUT_UNIFIED_MENU_CONTROLS), /* Video */ - MENU_LABEL(CRT_SWITCH_RESOLUTION), + MENU_LABEL(CRT_SWITCH_RESOLUTION), MENU_LABEL(CRT_SWITCH_RESOLUTION_SUPER), MENU_LABEL(VIDEO_FONT_ENABLE), MENU_LABEL(VIDEO_FONT_PATH), diff --git a/tasks/task_database.c b/tasks/task_database.c index 2bbe1c4591..5e9fbdec46 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -595,6 +595,11 @@ static enum msg_file_type extension_to_file_type(const char *ext) string_is_equal(ext, "CHD") ) return FILE_TYPE_CHD; + if ( + string_is_equal(ext, "wbfs") || + string_is_equal(ext, "WBFS") + ) + return FILE_TYPE_WBFS; if ( string_is_equal(ext, "lutro") || string_is_equal(ext, "LUTRO") @@ -642,6 +647,8 @@ static int task_database_iterate_playlist( return task_database_gdi_get_crc(name, &db_state->crc); } break; + /* Consider Wii WBFS files similar to ISO files. */ + case FILE_TYPE_WBFS: case FILE_TYPE_ISO: db_state->serial[0] = '\0'; intfstream_file_get_serial(name, 0, SIZE_MAX, db_state->serial); @@ -1301,7 +1308,7 @@ bool task_push_dbscan( const char *playlist_directory, const char *content_database, const char *fullpath, - bool directory, + bool directory, bool show_hidden_files, retro_task_callback_t cb) { diff --git a/tasks/task_database_cue.c b/tasks/task_database_cue.c index b36cb4421c..ce05c62f8e 100644 --- a/tasks/task_database_cue.c +++ b/tasks/task_database_cue.c @@ -333,6 +333,11 @@ int detect_serial_ascii_game(intfstream_t *fd, char *game_id) game_id[15] = '\0'; numberOfAscii = 0; + /* When scanning WBFS files, "WBFS" is discovered as the first serial. Ignore it. */ + if (string_is_equal(game_id, "WBFS")) { + continue; + } + /* Loop through until we run out of ASCII characters. */ for (i = 0; i < 15; i++) {