From 284c53489b89a6e39027aeab27c258c8926f77f0 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Mon, 23 Feb 2009 09:20:19 -0500 Subject: Engine: Added Event Thread cancellation --- src/com/fourisland/fourpuzzle/window/MessageWindow.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/com/fourisland/fourpuzzle/window') diff --git a/src/com/fourisland/fourpuzzle/window/MessageWindow.java b/src/com/fourisland/fourpuzzle/window/MessageWindow.java index 0057ca3..dab67d1 100644 --- a/src/com/fourisland/fourpuzzle/window/MessageWindow.java +++ b/src/com/fourisland/fourpuzzle/window/MessageWindow.java @@ -79,10 +79,16 @@ public class MessageWindow implements Renderable { Display.registerRenderable(mw); KeyboardInput.registerInputable(in); - cdl.await(); - - Display.unregisterRenderable(mw); - KeyboardInput.unregisterInputable(in); + try + { + cdl.await(); + } catch (InterruptedException ex) + { + throw ex; + } finally { + Display.unregisterRenderable(mw); + KeyboardInput.unregisterInputable(in); + } } public static void displayMessage(String message) throws InterruptedException -- cgit 1.4.1