X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=6dbb1e7154fd6823a9e5d7ebcfaebbfb9c0830d4;hb=17c100ba4bca1cf8475905b6eeb502e581489c5c;hp=93b135503b073c32e9a34ee79ccf5fbbcf13562a;hpb=71c4b8d626b4a731a72840facb6bd548c7e33da9;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index 93b13550..6dbb1e71 100644 --- a/src/events.c +++ b/src/events.c @@ -1703,6 +1703,15 @@ void HandleKey(Key key, int key_status) return; } + if (HandleGlobalAnimClicks(-1, -1, (key == KSYM_space || + key == KSYM_Return || + key == KSYM_Escape))) + { + /* do not handle this key event anymore */ + if (key != KSYM_Escape) /* always allow ESC key to be handled */ + return; + } + if (game_status == GAME_MODE_PLAYING && AllPlayersGone && (key == KSYM_Return || key == setup.shortcut.toggle_pause)) { @@ -1957,6 +1966,12 @@ void HandleJoystick() int dx = (left ? -1 : right ? 1 : 0); int dy = (up ? -1 : down ? 1 : 0); + if (HandleGlobalAnimClicks(-1, -1, newbutton)) + { + /* do not handle this button event anymore */ + return; + } + switch (game_status) { case GAME_MODE_TITLE: