X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=0643e1642c3a77ff7c33ded51282c0c9b1167af1;hb=ac94403f845928d307f2a7b60e81dfca1fd13cbb;hp=2678fa28b94c227855bd4f772ae5bcc57615f31c;hpb=888ee0497f046c51100416e0a033ec35d77fb45c;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index 2678fa28..0643e164 100644 --- a/src/events.c +++ b/src/events.c @@ -4,7 +4,7 @@ // (c) 1995-2014 by Artsoft Entertainment // Holger Schemel // info@artsoft.org -// http://www.artsoft.org/ +// https://www.artsoft.org/ // ---------------------------------------------------------------------------- // events.c // ============================================================================ @@ -1382,7 +1382,12 @@ static void HandleButtonOrFinger(int mx, int my, int button) static boolean checkTextInputKey(Key key) { - return (textinput_status && KSYM_PRINTABLE(key)); + // when playing, only handle raw key events and ignore text input + if (game_status == GAME_MODE_PLAYING) + return FALSE; + + // else handle all printable keys as text input + return KSYM_PRINTABLE(key); } void HandleTextEvent(TextEvent *event) @@ -2172,7 +2177,7 @@ void HandleKey(Key key, int key_status) { setup.fullscreen = !setup.fullscreen; - ToggleFullscreenOrChangeWindowScalingIfNeeded(); + ToggleFullscreenIfNeeded(); if (game_status == GAME_MODE_SETUP) RedrawSetupScreenAfterFullscreenToggle(); @@ -2205,7 +2210,7 @@ void HandleKey(Key key, int key_status) else if (setup.window_scaling_percent > MAX_WINDOW_SCALING_PERCENT) setup.window_scaling_percent = MAX_WINDOW_SCALING_PERCENT; - ToggleFullscreenOrChangeWindowScalingIfNeeded(); + ChangeWindowScalingIfNeeded(); if (game_status == GAME_MODE_SETUP) RedrawSetupScreenAfterFullscreenToggle();