From 0aea27f23768ef963e064a1dc513f8235f05c368 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 22 Jan 2024 00:01:12 -0800 Subject: [PATCH] Fix limits check not updating with CTRL+F8 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. --- desktop_version/src/KeyPoll.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/desktop_version/src/KeyPoll.cpp b/desktop_version/src/KeyPoll.cpp index d9454a94..b98e4348 100644 --- a/desktop_version/src/KeyPoll.cpp +++ b/desktop_version/src/KeyPoll.cpp @@ -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" @@ -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;