mirror of https://github.com/mgba-emu/mgba.git
VFS: Fix resizing memory chunks when not needed
This commit is contained in:
parent
4c4fbcc2a8
commit
323d425c89
1
CHANGES
1
CHANGES
|
@ -17,6 +17,7 @@ Bugfixes:
|
||||||
- GBA Cheats: Fix GameShark ROM patches
|
- GBA Cheats: Fix GameShark ROM patches
|
||||||
- Qt: Fix cut off tiles and alignment issues in tile viewer
|
- Qt: Fix cut off tiles and alignment issues in tile viewer
|
||||||
- GB MBC: Fix initializing MBC when no ROM is loaded
|
- GB MBC: Fix initializing MBC when no ROM is loaded
|
||||||
|
- VFS: Fix resizing memory chunks when not needed
|
||||||
Misc:
|
Misc:
|
||||||
- SDL: Remove scancode key input
|
- SDL: Remove scancode key input
|
||||||
- GBA Video: Clean up unused timers
|
- GBA Video: Clean up unused timers
|
||||||
|
|
|
@ -238,7 +238,7 @@ ssize_t _vfmWrite(struct VFile* vf, const void* buffer, size_t size) {
|
||||||
ssize_t _vfmWriteExpanding(struct VFile* vf, const void* buffer, size_t size) {
|
ssize_t _vfmWriteExpanding(struct VFile* vf, const void* buffer, size_t size) {
|
||||||
struct VFileMem* vfm = (struct VFileMem*) vf;
|
struct VFileMem* vfm = (struct VFileMem*) vf;
|
||||||
|
|
||||||
if (size + vfm->offset >= vfm->size) {
|
if (size + vfm->offset > vfm->size) {
|
||||||
_vfmExpand(vfm, vfm->offset + size);
|
_vfmExpand(vfm, vfm->offset + size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue