diff --git a/msg_hash.c b/msg_hash.c index a86b8238977..5c4a7756534 100644 --- a/msg_hash.c +++ b/msg_hash.c @@ -721,6 +721,8 @@ uint32_t msg_hash_calculate(const char *s) #define HASH_EXTENSION_ISO_UPPERCASE 0x0b87f470U #define HASH_EXTENSION_LUTRO 0x0fe37b7bU #define HASH_EXTENSION_CHD 0x0b8865d4U +#define HASH_EXTENSION_PBP 0x0b88b1d0U /* TODO(RobLoach): Is this the correct .pbp hash? */ +#define HASH_EXTENSION_PBP_UPPERCASE 0x0b882570U /* TODO(RobLoach): Is this the correct .PBP hash? */ enum msg_file_type msg_hash_to_file_type(uint32_t hash) { @@ -885,6 +887,9 @@ enum msg_file_type msg_hash_to_file_type(uint32_t hash) return FILE_TYPE_LUTRO; case HASH_EXTENSION_CHD: return FILE_TYPE_CHD; + case HASH_EXTENSION_PBP: + case HASH_EXTENSION_PBP_UPPERCASE: + return FILE_TYPE_PBP; default: break; } @@ -934,6 +939,6 @@ const char *msg_hash_get_wideglyph_str(void) break; } #endif - + return NULL; } diff --git a/msg_hash.h b/msg_hash.h index 57567e74505..a8d7e80369a 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -152,6 +152,7 @@ enum msg_file_type FILE_TYPE_WBFS, FILE_TYPE_RVZ, FILE_TYPE_WIA, + FILE_TYPE_PBP, FILE_TYPE_DIRECT_LOAD, diff --git a/tasks/task_database.c b/tasks/task_database.c index 32af0e81501..658c1b0b996 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -578,6 +578,10 @@ static enum msg_file_type extension_to_file_type(const char *ext) string_is_equal(ext_lower, "wia") ) return FILE_TYPE_WIA; + if ( + string_is_equal(ext_lower, "pbp") + ) + return FILE_TYPE_PBP; if ( string_is_equal(ext_lower, "lutro") ) @@ -627,6 +631,7 @@ static int task_database_iterate_playlist( case FILE_TYPE_RVZ: case FILE_TYPE_WIA: case FILE_TYPE_ISO: + case FILE_TYPE_PBP: db_state->serial[0] = '\0'; intfstream_file_get_serial(name, 0, SIZE_MAX, db_state->serial, sizeof(db_state->serial)); db->type = DATABASE_TYPE_SERIAL_LOOKUP;