mirror of https://github.com/mgba-emu/mgba.git
GBA Thread: Automatically load patches, if detected
This commit is contained in:
parent
6dda6cc841
commit
071fe7ff2d
1
CHANGES
1
CHANGES
|
@ -29,6 +29,7 @@ Features:
|
|||
- Default controller profiles for several common controllers
|
||||
- Libretro now supports BIOS, rumble and solar sensor
|
||||
- Implement BIOS call Stop, for sleep mode
|
||||
- Automatically load patches, if found
|
||||
Bugfixes:
|
||||
- ARM7: Fix SWI and IRQ timings
|
||||
- GBA Audio: Force audio FIFOs to 32-bit
|
||||
|
|
|
@ -419,6 +419,16 @@ bool GBAThreadStart(struct GBAThread* threadContext) {
|
|||
|
||||
threadContext->save = VDirOptionalOpenFile(threadContext->stateDir, threadContext->fname, "sram", ".sav", O_CREAT | O_RDWR);
|
||||
|
||||
if (!threadContext->patch) {
|
||||
threadContext->patch = VDirOptionalOpenFile(threadContext->stateDir, threadContext->fname, "patch", ".ups", O_RDONLY);
|
||||
}
|
||||
if (!threadContext->patch) {
|
||||
threadContext->patch = VDirOptionalOpenFile(threadContext->stateDir, threadContext->fname, "patch", ".ips", O_RDONLY);
|
||||
}
|
||||
if (!threadContext->patch) {
|
||||
threadContext->patch = VDirOptionalOpenFile(threadContext->stateDir, threadContext->fname, "patch", ".bps", O_RDONLY);
|
||||
}
|
||||
|
||||
MutexInit(&threadContext->stateMutex);
|
||||
ConditionInit(&threadContext->stateCond);
|
||||
|
||||
|
|
Loading…
Reference in New Issue