mirror of https://github.com/mgba-emu/mgba.git
GB, GBA: Prevent loading null ROMs
This commit is contained in:
parent
a30599e239
commit
d9764e8cea
1
CHANGES
1
CHANGES
|
@ -24,6 +24,7 @@ Misc:
|
||||||
- VFS: Call msync when syncing mapped data
|
- VFS: Call msync when syncing mapped data
|
||||||
- GBA Video, GB Video: Colors are now fully scaled
|
- GBA Video, GB Video: Colors are now fully scaled
|
||||||
- PSP2: Improved controller rumble
|
- PSP2: Improved controller rumble
|
||||||
|
- GB, GBA: Prevent loading null ROMs
|
||||||
|
|
||||||
0.5.1: (2016-10-05)
|
0.5.1: (2016-10-05)
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
|
|
@ -81,6 +81,9 @@ static void GBInit(void* cpu, struct mCPUComponent* component) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GBLoadROM(struct GB* gb, struct VFile* vf) {
|
bool GBLoadROM(struct GB* gb, struct VFile* vf) {
|
||||||
|
if (!vf) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
GBUnloadROM(gb);
|
GBUnloadROM(gb);
|
||||||
gb->romVf = vf;
|
gb->romVf = vf;
|
||||||
gb->pristineRomSize = vf->size(vf);
|
gb->pristineRomSize = vf->size(vf);
|
||||||
|
|
|
@ -490,6 +490,9 @@ bool GBALoadMB(struct GBA* gba, struct VFile* vf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GBALoadROM(struct GBA* gba, struct VFile* vf) {
|
bool GBALoadROM(struct GBA* gba, struct VFile* vf) {
|
||||||
|
if (!vf) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
GBAUnloadROM(gba);
|
GBAUnloadROM(gba);
|
||||||
gba->romVf = vf;
|
gba->romVf = vf;
|
||||||
gba->pristineRomSize = vf->size(vf);
|
gba->pristineRomSize = vf->size(vf);
|
||||||
|
|
Loading…
Reference in New Issue