Skip to content

Commit

Permalink
BAGEL: Fix SAVTURNCOUNT getting reset as conv starts
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed May 17, 2024
1 parent a8a0157 commit 7acd975
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions engines/bagel/boflib/gui/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,7 @@ void CBofWindow::handleEvents() {
Common::Event e;
CBofWindow *capture = CBofApp::getApp()->getCaptureControl();
CBofWindow *focus = CBofApp::getApp()->getFocusControl();

// Check for expired timers before handling events
checkTimers();
bool eventsPresent = false;

while (g_system->getEventManager()->pollEvent(e)) {
if (capture)
Expand All @@ -583,9 +581,20 @@ void CBofWindow::handleEvents() {
_mouseY = e.mouse.y;
}

if (e.type != Common::EVENT_MOUSEMOVE)
if (e.type != Common::EVENT_MOUSEMOVE) {
eventsPresent = true;
break;
}
}

// Only do timer checks when not processing other pending events.
// This simulates Windows behaviour, where the WM_TIMER events
// would be added at the end of the event queue
if (!eventsPresent)
// Check for expired timers
checkTimers();


}

void CBofWindow::handleEvent(const Common::Event &event) {
Expand Down

0 comments on commit 7acd975

Please sign in to comment.