Config: Clamp the touch layout snap grid size on load

The layout editor divides by it, and drawing the grid never finishes when
it's 0. Only the slider limited it, so a hand-edited ini could hang.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-22 10:55:31 +02:00
1 parent b5b37954b3
commit 37be6ce4e8
1 file changed
+3
+3
View File
@@ -1666,6 +1666,9 @@ void Config::PostLoadCleanup() {
// Three frames in flight showed no benefit over two, so the option is gone. Squash old values.
iInflightFrames = std::clamp(iInflightFrames, 1, 2);
// The touch layout editor divides by this, and loops forever drawing the grid if it's 0.
iTouchSnapGridSize = std::clamp(iTouchSnapGridSize, 2, 256);
}
void Config::PreSaveCleanup() {