mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
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:
parent
bef3d7229e
commit
96d56cd8ef
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user