mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
gamecart.c: fix indentation, a small merging mistake
This commit is contained in:
parent
9f52deedad
commit
0bbbc7c324
@ -73,8 +73,7 @@ u32 GetCartInfoString(char* info, size_t info_size, CartData* cdata) {
|
|||||||
"Product Code : %.10s\n"
|
"Product Code : %.10s\n"
|
||||||
"Revision : %lu\n"
|
"Revision : %lu\n"
|
||||||
"Cart ID : %08lX\n"
|
"Cart ID : %08lX\n"
|
||||||
"Platform : %s\n"
|
"Platform : %s\n",
|
||||||
"GM9 Version : " VERSION "\n",
|
|
||||||
ncsd->mediaId, ncch->productcode, cdata_i->rom_version, cdata_i->cart_id,
|
ncsd->mediaId, ncch->productcode, cdata_i->rom_version, cdata_i->cart_id,
|
||||||
(ncch->flags[4] == 0x2) ? "N3DS" : "O3DS");
|
(ncch->flags[4] == 0x2) ? "N3DS" : "O3DS");
|
||||||
} else if (cdata->cart_type & CART_NTR) {
|
} else if (cdata->cart_type & CART_NTR) {
|
||||||
@ -85,8 +84,7 @@ u32 GetCartInfoString(char* info, size_t info_size, CartData* cdata) {
|
|||||||
"Product Code : %.6s\n"
|
"Product Code : %.6s\n"
|
||||||
"Revision : %u\n"
|
"Revision : %u\n"
|
||||||
"Cart ID : %08lX\n"
|
"Cart ID : %08lX\n"
|
||||||
"Platform : %s\n"
|
"Platform : %s\n",
|
||||||
"GM9 Version : " VERSION "\n",
|
|
||||||
nds->game_title, nds->game_code, nds->rom_version, cdata_i->cart_id,
|
nds->game_title, nds->game_code, nds->rom_version, cdata_i->cart_id,
|
||||||
(nds->unit_code == 0x2) ? "DSi Enhanced" : (nds->unit_code == 0x3) ? "DSi Exclusive" : "DS");
|
(nds->unit_code == 0x2) ? "DSi Enhanced" : (nds->unit_code == 0x3) ? "DSi Exclusive" : "DS");
|
||||||
} else return 1;
|
} else return 1;
|
||||||
@ -419,7 +417,7 @@ u32 ReadCartInfo(u8* buffer, u64 offset, u64 count, CartData* cdata) {
|
|||||||
|
|
||||||
if (offset >= len) return 0;
|
if (offset >= len) return 0;
|
||||||
if (offset + count > len) count = len - offset;
|
if (offset + count > len) count = len - offset;
|
||||||
memcpy(buffer, info + offset, count);
|
memcpy(buffer, info + offset, count);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -428,20 +426,20 @@ u32 ReadCartSave(u8* buffer, u64 offset, u64 count, CartData* cdata) {
|
|||||||
if (offset >= cdata->save_size) return 1;
|
if (offset >= cdata->save_size) return 1;
|
||||||
if (offset + count > cdata->save_size) count = cdata->save_size - offset;
|
if (offset + count > cdata->save_size) count = cdata->save_size - offset;
|
||||||
switch (cdata->save_type) {
|
switch (cdata->save_type) {
|
||||||
case CARD_SAVE_SPI:
|
case CARD_SAVE_SPI:
|
||||||
return (CardSPIReadSaveData(cdata->spi_save_type, offset, buffer, count) == 0) ? 0 : 1;
|
return (CardSPIReadSaveData(cdata->spi_save_type, offset, buffer, count) == 0) ? 0 : 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CARD_SAVE_CARD2:
|
case CARD_SAVE_CARD2:
|
||||||
{
|
{
|
||||||
u32 card2_offset = getle32(cdata->header + 0x200);
|
u32 card2_offset = getle32(cdata->header + 0x200);
|
||||||
return ReadCartBytes(buffer, card2_offset * NCSD_MEDIA_UNIT + offset, count, cdata, false);
|
return ReadCartBytes(buffer, card2_offset * NCSD_MEDIA_UNIT + offset, count, cdata, false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user