From f71b2c25f2140b25ee2b83b2d89c7bf047ee5e40 Mon Sep 17 00:00:00 2001 From: Jeffrey Han Date: Tue, 27 Jan 2015 15:20:03 -0500 Subject: [PATCH] Quick fix: 'Esc' key not properly checked in splash screen. Signed-off-by: Jeffrey Han --- src/itdelatrisu/opsu/states/Splash.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/itdelatrisu/opsu/states/Splash.java b/src/itdelatrisu/opsu/states/Splash.java index 44c1f936..84912968 100644 --- a/src/itdelatrisu/opsu/states/Splash.java +++ b/src/itdelatrisu/opsu/states/Splash.java @@ -144,12 +144,14 @@ public class Splash extends BasicGameState { @Override public void keyPressed(int key, char c) { - // close program - if (++escapeCount >= 3) - container.exit(); - - // stop parsing OsuFiles by sending interrupt to OsuParser - else if (key == Input.KEY_ESCAPE && thread != null) - thread.interrupt(); + if (key == Input.KEY_ESCAPE) { + // close program + if (++escapeCount >= 3) + container.exit(); + + // stop parsing OsuFiles by sending interrupt to OsuParser + else if (thread != null) + thread.interrupt(); + } } }