mirror of https://github.com/mgba-emu/mgba.git
Core: Fix reported ROM size when a fixed buffer size is used
This commit is contained in:
parent
5fd48c25dc
commit
6ab8193279
1
CHANGES
1
CHANGES
|
@ -30,6 +30,7 @@ Other fixes:
|
|||
- 3DS: Fix crash with libctru 2.0 when exiting
|
||||
- All: Improve export headers (fixes mgba.io/i/1738)
|
||||
- Core: Ensure ELF regions can be written before trying
|
||||
- Core: Fix reported ROM size when a fixed buffer size is used
|
||||
- Debugger: Don't skip undefined instructions when debugger attached
|
||||
- FFmpeg: Fix some small memory leaks
|
||||
- FFmpeg: Fix encoding of time base
|
||||
|
|
|
@ -145,7 +145,10 @@ bool mCorePreloadVFCB(struct mCore* core, struct VFile* vf, void (cb)(size_t, si
|
|||
#ifdef FIXED_ROM_BUFFER
|
||||
extern uint32_t* romBuffer;
|
||||
extern size_t romBufferSize;
|
||||
vfm = VFileFromMemory(romBuffer, romBufferSize);
|
||||
if (size > romBufferSize) {
|
||||
size = romBufferSize;
|
||||
}
|
||||
vfm = VFileFromMemory(romBuffer, size);
|
||||
#else
|
||||
vfm = VFileMemChunk(NULL, size);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue