DS: Fix getting game title

This commit is contained in:
Vicki Pfau 2017-02-20 13:44:34 -08:00
parent 0de1300b4d
commit eeb8501ec4
1 changed files with 2 additions and 1 deletions

View File

@ -484,6 +484,7 @@ void DSGetGameCode(struct DS* ds, char* out) {
} }
struct DSCartridge* cart = ds->romVf->map(ds->romVf, sizeof(*cart), MAP_READ); struct DSCartridge* cart = ds->romVf->map(ds->romVf, sizeof(*cart), MAP_READ);
// TODO: TWL-?
memcpy(out, "NTR-", 4); memcpy(out, "NTR-", 4);
memcpy(&out[4], &cart->id, 4); memcpy(&out[4], &cart->id, 4);
ds->romVf->unmap(ds->romVf, cart, sizeof(*cart)); ds->romVf->unmap(ds->romVf, cart, sizeof(*cart));
@ -496,7 +497,7 @@ void DSGetGameTitle(struct DS* ds, char* out) {
} }
struct DSCartridge* cart = ds->romVf->map(ds->romVf, sizeof(*cart), MAP_READ); struct DSCartridge* cart = ds->romVf->map(ds->romVf, sizeof(*cart), MAP_READ);
memcpy(out, &cart->title, 4); memcpy(out, &cart->title, 12);
ds->romVf->unmap(ds->romVf, cart, sizeof(*cart)); ds->romVf->unmap(ds->romVf, cart, sizeof(*cart));
} }