Skip to content

Commit 9e72c09

Browse files
committed
Make gamecart handling a little less annoying
1 parent c847618 commit 9e72c09

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

arm9/source/godmode.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2606,7 +2606,8 @@ u32 GodMode(int entrypoint) {
26062606
break;
26072607
}
26082608
} else if (pad_state & (CART_INSERT|CART_EJECT)) {
2609-
if (!InitVCartDrive() && (pad_state & CART_INSERT)) // reinit virtual cart drive
2609+
if (!InitVCartDrive() && (pad_state & CART_INSERT) &&
2610+
(curr_drvtype & DRV_CART)) // reinit virtual cart drive
26102611
ShowPrompt(false, "Cart init failed!");
26112612
if (!(*current_path) || (curr_drvtype & DRV_CART))
26122613
GetDirContents(current_dir, current_path); // refresh dir contents

arm9/source/virtual/vcart.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ u64 GetVCartDriveSize(void) {
9999

100100
void GetVCartTypeString(char* typestr) {
101101
// typestr needs to be at least 11 + 1 chars big
102-
if (!cart_init || !cdata) sprintf(typestr, cart_checked ? "EMPTY" : "INIT");
102+
if (!cart_init || !cdata) sprintf(typestr, cart_checked ? "EMPTY" : "");
103103
else sprintf(typestr, "%s%08lX",
104104
(cdata->cart_type & CART_CTR) ? "CTR" :
105105
(cdata->cart_type & CART_TWL) ? "TWL" :

0 commit comments

Comments
 (0)