@@ -312,26 +312,9 @@ GameMessageDisposition WindowTranslator::translateGameMessage(const GameMessage
312312 UnsignedByte key = msg->getArgument ( 0 )->integer ;
313313 UnsignedByte state = msg->getArgument ( 1 )->integer ;
314314
315- Bool videoSkipHandled = FALSE ;
316- if ( (key == KEY_ESC)
317- && (BitIsSet ( state, KEY_STATE_UP )) )
318- {
319- if ( TheGameLogic && TheGameLogic->getLoadScreen () )
320- {
321- LoadScreen *loadScreen = TheGameLogic->getLoadScreen ();
322- if ( loadScreen->isVideoPlaying () )
323- {
324- loadScreen->skipVideo ();
325- returnCode = WIN_INPUT_USED;
326- videoSkipHandled = TRUE ;
327- }
328- }
329- }
330-
331- if ( TheWindowManager && !videoSkipHandled )
332- {
315+ // process event through window system
316+ if ( TheWindowManager )
333317 returnCode = TheWindowManager->winProcessKey ( key, state );
334- }
335318
336319
337320 // If we're in a movie, we want to be able to escape out of it
@@ -345,6 +328,21 @@ GameMessageDisposition WindowTranslator::translateGameMessage(const GameMessage
345328 returnCode = WIN_INPUT_USED;
346329 }
347330
331+ if (returnCode != WIN_INPUT_USED
332+ && (key == KEY_ESC)
333+ && (BitIsSet ( state, KEY_STATE_UP )) )
334+ {
335+ if ( TheGameLogic && TheGameLogic->getLoadScreen () )
336+ {
337+ LoadScreen *loadScreen = TheGameLogic->getLoadScreen ();
338+ if ( loadScreen->isVideoPlaying () )
339+ {
340+ loadScreen->skipVideo ();
341+ returnCode = WIN_INPUT_USED;
342+ }
343+ }
344+ }
345+
348346 if (returnCode != WIN_INPUT_USED
349347 && (key == KEY_ESC)
350348 && (BitIsSet ( state, KEY_STATE_UP ))
0 commit comments