Skip to content

Commit

Permalink
printf
Browse files Browse the repository at this point in the history
  • Loading branch information
KrahJohlito committed Sep 18, 2024
1 parent b11c091 commit 9ffcd85
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions modules/iopcore/cdvdman/device-bdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void DeviceDeinit(void)

int DeviceReady(void)
{
// DPRINTF("%s\n", __func__);
DPRINTF("%s\n", __func__);

return (g_bd == NULL) ? SCECdNotReady : SCECdComplete;
}
Expand Down Expand Up @@ -115,7 +115,7 @@ int DeviceReadSectors(u32 lsn, void *buffer, unsigned int sectors)

// DPRINTF("%s(%u, 0x%p, %u)\n", __func__, (unsigned int)lsn, buffer, sectors);

if (g_bd == NULL)
if (g_bd == NULL || g_bd->devNr != cdvdman_settings.bdDeviceId)
return SCECdErTRMOPN;

WaitSema(bdm_io_sema);
Expand Down
6 changes: 3 additions & 3 deletions src/bdmsupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ static int bdmGetIconId(item_list_t *itemList)
static void bdmCleanUp(item_list_t *itemList, int exception)
{
if (itemList->enabled) {
LOG("BDMSUPPORT CleanUp\n");
printf("BDMSUPPORT CleanUp %d\n", itemList->mode);

bdm_device_data_t *pDeviceData = (bdm_device_data_t *)itemList->priv;
free(pDeviceData->bdmGames);
Expand All @@ -588,7 +588,7 @@ static void bdmShutdown(item_list_t *itemList)
{
char path[16];

LOG("BDMSUPPORT Shutdown\n");
printf("BDMSUPPORT Shutdown %d\n", itemList->mode);

// Format the device path.
// Getting the device number is only relevant per module ie usb0 and mx40 will result in both being massDeviceIndex = 0 or mass0, use mode to determine instead.
Expand All @@ -599,7 +599,7 @@ static void bdmShutdown(item_list_t *itemList)
fileXioDevctl(path, USBMASS_DEVCTL_STOP_ALL, NULL, 0, NULL, 0);

if (itemList->enabled) {
LOG("BDMSUPPORT Shutdown free data\n");
printf("BDMSUPPORT Shutdown free data %d\n", itemList->mode);

// Free device data.
free(pDeviceData->bdmGames);
Expand Down
1 change: 1 addition & 0 deletions src/opl.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ void initSupport(item_list_t *itemList, int mode, int force_reinit)
if (((force_reinit) && (mod->support->enabled)) || (startMode == START_MODE_AUTO && !mod->support->enabled)) {
mod->support->itemInit(mod->support);
moduleUpdateMenuInternal(mod, 0, 0);
printf("initSupport %d\n", mode);

ioPutRequest(IO_MENU_UPDATE_DEFFERED, &list_support[mode].support->mode); // can't use mode as the variable will die at end of execution
}
Expand Down

0 comments on commit 9ffcd85

Please sign in to comment.