forked from Mirror/GodMode9
Fix: illegal chars in all cart names
This commit is contained in:
parent
c19bc1c464
commit
0956e62b9b
@ -53,7 +53,7 @@
|
||||
|
||||
|
||||
// GodMode9 version
|
||||
#define VERSION "1.0.7"
|
||||
#define VERSION "1.0.8"
|
||||
|
||||
// Maximum payload size (arbitrary value!)
|
||||
#define SELF_MAX_SIZE (320 * 1024) // 320kB
|
||||
|
@ -45,15 +45,14 @@ u32 GetCartName(char* name, CartData* cdata) {
|
||||
CartDataCtr* cdata_i = (CartDataCtr*)(void*) cdata;
|
||||
NcsdHeader* ncsd = &(cdata_i->ncsd);
|
||||
snprintf(name, 24, "%016llX_v%02lu", ncsd->mediaId, cdata_i->rom_version);
|
||||
return 0;
|
||||
} else if (cdata->cart_type & CART_NTR) {
|
||||
CartDataNtrTwl* cdata_i = (CartDataNtrTwl*)(void*) cdata;
|
||||
TwlHeader* nds = &(cdata_i->ntr_header);
|
||||
snprintf(name, 24, "%.12s_%.6s_%02u", nds->game_title, nds->game_code, nds->rom_version);
|
||||
for (char* c = name; *c != '\0'; c++)
|
||||
if ((*c == ':') || (*c == '*') || (*c == '?') || (*c == '/') || (*c == '\\')) *c = '_';
|
||||
return 0;
|
||||
} else return 1;
|
||||
for (char* c = name; *c != '\0'; c++)
|
||||
if ((*c == ':') || (*c == '*') || (*c == '?') || (*c == '/') || (*c == '\\')) *c = '_';
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 InitCardRead(CartData* cdata) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user