Core: Fix reported ROM size when a fixed buffer size is used

This commit is contained in:
Vicki Pfau 2020-08-10 00:09:02 -07:00
parent da6a0254ab
commit 75865cab94
2 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,10 @@
0.8.4: (Future) 0.8.4: (Future)
Emulation fixes:
- GBA Video: Invalidate map cache when modifying BGCNT (fixes mgba.io/i/1846)
Other fixes:
- 3DS: Redo video sync to be more precise - 3DS: Redo video sync to be more precise
- 3DS: Fix crash with libctru 2.0 when exiting - 3DS: Fix crash with libctru 2.0 when exiting
- GBA Video: Invalidate map cache when modifying BGCNT (fixes mgba.io/i/1846) - Core: Fix reported ROM size when a fixed buffer size is used
- Qt: Add dummy English translation file (fixes mgba.io/i/1469) - Qt: Add dummy English translation file (fixes mgba.io/i/1469)
- mGUI: Fix closing down a game if an exit is signalled - mGUI: Fix closing down a game if an exit is signalled
- mVL: Fix injecting accidentally draining non-injection buffer - mVL: Fix injecting accidentally draining non-injection buffer

View File

@ -145,7 +145,10 @@ bool mCorePreloadVFCB(struct mCore* core, struct VFile* vf, void (cb)(size_t, si
#ifdef FIXED_ROM_BUFFER #ifdef FIXED_ROM_BUFFER
extern uint32_t* romBuffer; extern uint32_t* romBuffer;
extern size_t romBufferSize; extern size_t romBufferSize;
vfm = VFileFromMemory(romBuffer, romBufferSize); if (size > romBufferSize) {
size = romBufferSize;
}
vfm = VFileFromMemory(romBuffer, size);
#else #else
vfm = VFileMemChunk(NULL, size); vfm = VFileMemChunk(NULL, size);
#endif #endif