Skip to content

Commit

Permalink
Revert "Add prints to gpgx_swap_disc" and "Add prints to cdStreamOpen"
Browse files Browse the repository at this point in the history
This reverts commit 9e0cfb1 and 5c3ae64.
  • Loading branch information
CasualPokePlayer committed Oct 6, 2024
1 parent c644ed1 commit 6c2661f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
Binary file modified Assets/dll/gpgx.wbx.zst
Binary file not shown.
5 changes: 0 additions & 5 deletions waterbox/gpgx/cinterface/cdStreamImpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,12 @@ 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 @@ -79,7 +77,6 @@ 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 @@ -89,14 +86,12 @@ 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
2 changes: 0 additions & 2 deletions waterbox/gpgx/cinterface/cinterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,13 @@ GPGX_EX void gpgx_swap_disc(const toc_t* toc, int8 index)
{
if (toc)
{
fprintf(stderr, "Hotswapping CD index %d, TOC CRC32: %08lX\n", index, crc32(0, (const unsigned char*)toc, sizeof(toc_t)));
char header[0x210];
cd_index = index;
memcpy(&pending_toc, toc, sizeof(toc_t));
cdd_load("HOTSWAP_CD", header);
}
else
{
fprintf(stderr, "Removing CD with index %d (NULL TOC), setting index to -1\n", index);
cd_index = -1;
cdd_unload();
}
Expand Down

0 comments on commit 6c2661f

Please sign in to comment.