Skip to content

Commit

Permalink
Add prints to cdStreamOpen
Browse files Browse the repository at this point in the history
  • Loading branch information
CasualPokePlayer committed Oct 6, 2024
1 parent c4a92bd commit 5c3ae64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Binary file modified Assets/dll/gpgx.wbx.zst
Binary file not shown.
5 changes: 5 additions & 0 deletions waterbox/gpgx/cinterface/cdStreamImpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ cdStream* cdStreamOpen(const char* fname)
if (load_archive("PRIMARY_CD", (unsigned char*)&pending_toc, sizeof(toc_t), NULL))
{
cd_index = 0;
fprintf(stderr, "Initing primary CD\n");
cdStreamInit(&cd_streams[0], &pending_toc, 0);
return &cd_streams[0];
}
}
else if (!strcmp(fname, "HOTSWAP_CD"))
{
fprintf(stderr, "Initing hotswap CD\n");
cdStreamInit(&cd_streams[cd_index], &pending_toc, 0);
return &cd_streams[cd_index];
}
Expand All @@ -77,6 +79,7 @@ cdStream* cdStreamOpen(const char* fname)
if (load_archive("SECONDARY_CD", (unsigned char*)&pending_toc, sizeof(toc_t), NULL))
{
cd_index = 0;
fprintf(stderr, "Initing secondary CD\n");
cdStreamInit(&cd_streams[0], &pending_toc, 0);
return &cd_streams[0];
}
Expand All @@ -86,12 +89,14 @@ cdStream* cdStreamOpen(const char* fname)
// .cue file will attempt to be loaded for parsing
// we use this to know when to load in the TOC
// (can't do it when PRIMARY_CD/HOTSWAP_CD/SECONDARY_CD is opened, due to GPGX assuming those are a single track)
fprintf(stderr, "Copying TOC, TOC CRC32: %08lX\n", crc32(0, (unsigned char*)&pending_toc, sizeof(toc_t)));
memcpy(&cdd.toc, &pending_toc, sizeof(toc_t));
return NULL;
}
else if (!strcmp(fext, ".sub"))
{
// separate stream for subcode
fprintf(stderr, "Initing subcode CD stream\n");
cdStreamInit(&subcode_streams[cd_index], &cdd.toc, 1);
return &subcode_streams[cd_index];
}
Expand Down

0 comments on commit 5c3ae64

Please sign in to comment.