Make gamecart handling a little less annoying

This commit is contained in:
d0k3 2019-10-15 23:08:06 +02:00
parent c847618048
commit 9e72c098b9
2 changed files with 3 additions and 2 deletions

View File

@ -2606,7 +2606,8 @@ u32 GodMode(int entrypoint) {
break;
}
} else if (pad_state & (CART_INSERT|CART_EJECT)) {
if (!InitVCartDrive() && (pad_state & CART_INSERT)) // reinit virtual cart drive
if (!InitVCartDrive() && (pad_state & CART_INSERT) &&
(curr_drvtype & DRV_CART)) // reinit virtual cart drive
ShowPrompt(false, "Cart init failed!");
if (!(*current_path) || (curr_drvtype & DRV_CART))
GetDirContents(current_dir, current_path); // refresh dir contents

View File

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