fix for memcard manager using sjis for ascii encoded string

thanks to gerbilsoft for finding my mistake, fixes issue 5148
This commit is contained in:
LPFaint99 2012-01-18 22:41:35 -08:00
parent bef3d7229e
commit 96d56cd8ef
2 changed files with 3 additions and 3 deletions

View File

@ -1126,7 +1126,7 @@ bool GCMemcard::Format(u8 * card_data, bool sjis, u16 SizeMb)
gcp.bat_backup = (BlockAlloc *)(card_data + BLOCK_SIZE*4);
*(u16*)gcp.hdr->SizeMb = BE16(SizeMb);
*(u16*)gcp.hdr->Encoding = BE16(sjis ? 1 : 0);
gcp.hdr->Encoding = BE16(sjis ? 1 : 0);
FormatInternal(gcp);
return true;
@ -1148,7 +1148,7 @@ bool GCMemcard::Format(bool sjis, u16 SizeMb)
gcp.bat_backup = &bat_backup;
*(u16*)hdr.SizeMb = BE16(SizeMb);
*(u16*)hdr.Encoding = BE16(sjis ? 1 : 0);
hdr.Encoding = BE16(sjis ? 1 : 0);
FormatInternal(gcp);
m_sizeMb = SizeMb;

View File

@ -91,7 +91,7 @@ private:
// end Serial in libogc
u8 deviceID[2]; //0x0020 2 0 if formated in slot A 1 if formated in slot B
u8 SizeMb[2]; //0x0022 2 size of memcard in Mbits
u8 Encoding[2]; //0x0024 2 encoding (ASCII or japanese)
u16 Encoding; //0x0024 2 encoding (ASCII or japanese)
u8 Unused1[468]; //0x0026 468 unused (0xff)
u8 UpdateCounter[2];//0x01fa 2 update Counter (?, probably unused)
u16 Checksum; //0x01fc 2 Additive Checksum