mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix hang when loading a savestate if sync to video is enabled
This commit is contained in:
parent
255242a665
commit
242dc5067b
1
CHANGES
1
CHANGES
|
@ -33,6 +33,7 @@ Bugfixes:
|
|||
- GBA Memory: Fix 32-bit loads from unaddress cartridge space
|
||||
- Qt: Fix multiplayer windows opening as the wrong size
|
||||
- Qt: Fix controllers sometimes not loading the right profile
|
||||
- GBA: Fix hang when loading a savestate if sync to video is enabled
|
||||
Misc:
|
||||
- Qt: Show multiplayer numbers in window title
|
||||
- Qt: Handle saving input settings better
|
||||
|
|
|
@ -178,7 +178,7 @@ static bool _loadPNGState(struct GBA* gba, struct VFile* vf) {
|
|||
PNGReadFooter(png, end);
|
||||
PNGReadClose(png, info, end);
|
||||
gba->video.renderer->putPixels(gba->video.renderer, VIDEO_HORIZONTAL_PIXELS, pixels);
|
||||
GBASyncPostFrame(gba->sync);
|
||||
GBASyncForceFrame(gba->sync);
|
||||
|
||||
free(pixels);
|
||||
return true;
|
||||
|
|
|
@ -712,6 +712,16 @@ void GBASyncPostFrame(struct GBASync* sync) {
|
|||
MutexUnlock(&sync->videoFrameMutex);
|
||||
}
|
||||
|
||||
void GBASyncForceFrame(struct GBASync* sync) {
|
||||
if (!sync) {
|
||||
return;
|
||||
}
|
||||
|
||||
MutexLock(&sync->videoFrameMutex);
|
||||
ConditionWake(&sync->videoFrameAvailableCond);
|
||||
MutexUnlock(&sync->videoFrameMutex);
|
||||
}
|
||||
|
||||
bool GBASyncWaitFrameStart(struct GBASync* sync, int frameskip) {
|
||||
if (!sync) {
|
||||
return true;
|
||||
|
|
|
@ -138,6 +138,7 @@ void GBAThreadTakeScreenshot(struct GBAThread* threadContext);
|
|||
#endif
|
||||
|
||||
void GBASyncPostFrame(struct GBASync* sync);
|
||||
void GBASyncForceFrame(struct GBASync* sync);
|
||||
bool GBASyncWaitFrameStart(struct GBASync* sync, int frameskip);
|
||||
void GBASyncWaitFrameEnd(struct GBASync* sync);
|
||||
bool GBASyncDrawingFrame(struct GBASync* sync);
|
||||
|
|
Loading…
Reference in New Issue