mirror of https://github.com/mgba-emu/mgba.git
GBA Savedata: Fix extracting save when not yet configured in-game
This commit is contained in:
parent
853cdf2880
commit
83237c7e76
1
CHANGES
1
CHANGES
|
@ -5,6 +5,7 @@ Emulation fixes:
|
||||||
- GB MBC: Fix MBC2 bit selection
|
- GB MBC: Fix MBC2 bit selection
|
||||||
Other fixes:
|
Other fixes:
|
||||||
- GB Core: Fix extracting SRAM when none is present
|
- GB Core: Fix extracting SRAM when none is present
|
||||||
|
- GBA Savedata: Fix extracting save when not yet configured in-game
|
||||||
|
|
||||||
0.8.2: (2020-06-14)
|
0.8.2: (2020-06-14)
|
||||||
Emulation fixes:
|
Emulation fixes:
|
||||||
|
|
|
@ -139,6 +139,7 @@ bool GBASavedataClone(struct GBASavedata* savedata, struct VFile* out) {
|
||||||
} else if (savedata->vf) {
|
} else if (savedata->vf) {
|
||||||
off_t read = 0;
|
off_t read = 0;
|
||||||
uint8_t buffer[2048];
|
uint8_t buffer[2048];
|
||||||
|
savedata->vf->seek(savedata->vf, 0, SEEK_SET);
|
||||||
do {
|
do {
|
||||||
read = savedata->vf->read(savedata->vf, buffer, sizeof(buffer));
|
read = savedata->vf->read(savedata->vf, buffer, sizeof(buffer));
|
||||||
out->write(out, buffer, read);
|
out->write(out, buffer, read);
|
||||||
|
|
Loading…
Reference in New Issue