Bug fix for stack overflow error that can occur when calling QCoreApplication::processEvents() and not guarding against recursion on calling parent function.
This commit is contained in:
parent
199a3d8d72
commit
04b8d8a789
|
@ -4285,9 +4285,18 @@ void consoleWin_t::transferVideoBuffer(void)
|
||||||
|
|
||||||
void consoleWin_t::emuFrameFinish(void)
|
void consoleWin_t::emuFrameFinish(void)
|
||||||
{
|
{
|
||||||
|
static bool eventProcessingInProg = false;
|
||||||
|
|
||||||
|
if ( eventProcessingInProg )
|
||||||
|
{ // Prevent recursion as processEvents function can double back on us
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
eventProcessingInProg = true;
|
||||||
// Process all events before attempting to render viewport
|
// Process all events before attempting to render viewport
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
|
|
||||||
|
eventProcessingInProg = false;
|
||||||
|
|
||||||
// Update Input Devices
|
// Update Input Devices
|
||||||
FCEUD_UpdateInput();
|
FCEUD_UpdateInput();
|
||||||
|
|
||||||
|
@ -4298,9 +4307,18 @@ void consoleWin_t::emuFrameFinish(void)
|
||||||
|
|
||||||
void consoleWin_t::updatePeriodic(void)
|
void consoleWin_t::updatePeriodic(void)
|
||||||
{
|
{
|
||||||
|
static bool eventProcessingInProg = false;
|
||||||
|
|
||||||
|
if ( eventProcessingInProg )
|
||||||
|
{ // Prevent recursion as processEvents function can double back on us
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
eventProcessingInProg = true;
|
||||||
// Process all events before attempting to render viewport
|
// Process all events before attempting to render viewport
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
|
|
||||||
|
eventProcessingInProg = false;
|
||||||
|
|
||||||
// Update Input Devices
|
// Update Input Devices
|
||||||
FCEUD_UpdateInput();
|
FCEUD_UpdateInput();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue