Skip to content

Commit

Permalink
Fix in-game load/save screen click handling
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Jun 27, 2024
1 parent 68ab9db commit c89f384
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,24 +224,26 @@ static GAMECODE renderLoop()
displayRenderLoop();
}

WidgetTriggers const &triggers = widgRunScreen(psWScreen); // always run the screen, so overlays can process input

if (InGameOpUp || isInGamePopupUp || intHelpOverlayIsUp()) // ingame options menu up, run it!
if (!bLoadSaveUp)
{
unsigned widgval = triggers.empty() ? 0 : triggers.front().widget->id; // Just use first click here, since the next click could be on another menu.
WidgetTriggers const &triggers = widgRunScreen(psWScreen); // always run the screen, so overlays can process input

intProcessInGameOptions(widgval);
if (widgval == INTINGAMEOP_QUIT || widgval == INTINGAMEOP_POPUP_QUIT)
if (InGameOpUp || isInGamePopupUp || intHelpOverlayIsUp()) // ingame options menu up, run it!
{
if (gamePaused())
unsigned widgval = triggers.empty() ? 0 : triggers.front().widget->id; // Just use first click here, since the next click could be on another menu.

intProcessInGameOptions(widgval);
if (widgval == INTINGAMEOP_QUIT || widgval == INTINGAMEOP_POPUP_QUIT)
{
kf_TogglePauseMode();
if (gamePaused())
{
kf_TogglePauseMode();
}
intRetVal = INT_QUIT;
}
intRetVal = INT_QUIT;
}
}

if (bLoadSaveUp && runLoadSave(true) && strlen(sRequestResult))
else if (runLoadSave(true) && strlen(sRequestResult))
{
debug(LOG_NEVER, "Returned %s", sRequestResult);
if (bRequestLoad)
Expand Down

0 comments on commit c89f384

Please sign in to comment.