Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scanner: Initial work on PBP scanning #16420

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion msg_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -934,6 +939,6 @@ const char *msg_hash_get_wideglyph_str(void)
break;
}
#endif

return NULL;
}
1 change: 1 addition & 0 deletions msg_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ enum msg_file_type
FILE_TYPE_WBFS,
FILE_TYPE_RVZ,
FILE_TYPE_WIA,
FILE_TYPE_PBP,

FILE_TYPE_DIRECT_LOAD,

Expand Down
5 changes: 5 additions & 0 deletions tasks/task_database.c
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)
Expand Down Expand Up @@ -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;
Expand Down
Loading