Skip to content

Commit

Permalink
Fix limits check not updating with CTRL+F8
Browse files Browse the repository at this point in the history
This makes it work pretty well. It basically just resets the state of
the limits check and starts from the first limit broken (if any), which
is behavior that makes sense to me.

Otherwise, without this, it seems to invalidate pointers and, on my
machine, start pulling strings from the language XML, which is
horrifying.
  • Loading branch information
InfoTeddy committed Feb 2, 2024
1 parent b528f25 commit e2e7720
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions desktop_version/src/KeyPoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "Graphics.h"
#include "GraphicsUtil.h"
#include "Localization.h"
#include "LocalizationMaint.h"
#include "LocalizationStorage.h"
#include "Music.h"
#include "Screen.h"
Expand Down Expand Up @@ -189,6 +190,11 @@ bool cycle_language(bool should_recompute_textboxes)

if (game.gamestate == TITLEMODE)
{
if (game.currentmenuname == Menu::translator_options_limitscheck)
{
loc::local_limits_check();
}

int temp = game.menucountdown;
game.createmenu(game.currentmenuname, true);
game.menucountdown = temp;
Expand Down

0 comments on commit e2e7720

Please sign in to comment.