summaryrefslogtreecommitdiff
path: root/src/gui/widgets/inttextfield.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/inttextfield.cpp')
-rw-r--r--src/gui/widgets/inttextfield.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp
index e28aae7e2..5ac5ec38f 100644
--- a/src/gui/widgets/inttextfield.cpp
+++ b/src/gui/widgets/inttextfield.cpp
@@ -81,10 +81,11 @@ void IntTextField::keyPressed(KeyEvent &event)
if (chr < '0' || chr > '9')
return;
}
-#else
+#else // USE_SDL2
+
if (!event.getKey().isNumber())
return;
-#endif
+#endif // USE_SDL2
TextField::keyPressed(event);