GBA Thread: Automatically load patches, if detected

This commit is contained in:
Jeffrey Pfau 2015-08-04 19:35:14 -07:00
parent 6dda6cc841
commit 071fe7ff2d
2 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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);