From 2cc6d778adf38d7b21b9b821383e5afae4fd99af Mon Sep 17 00:00:00 2001 From: Shadooow Date: Sun, 6 Jun 2021 15:44:01 +0000 Subject: [PATCH] fixed pressing ENTER and ESC during IMP enter key input when there is a messagebox notifying user he inputted wrong key which resulted in re-appearance of the messagebox or leaving laptop mode git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9065 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Laptop/IMP HomePage.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Laptop/IMP HomePage.cpp b/Laptop/IMP HomePage.cpp index a4c5dedb..da69f506 100644 --- a/Laptop/IMP HomePage.cpp +++ b/Laptop/IMP HomePage.cpp @@ -268,20 +268,22 @@ void GetPlayerKeyBoardInputForIMPHomePage( void ) { if( !HandleTextInput( &InputEvent ) && (InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT || InputEvent.usEvent == KEY_UP ) ) { - switch( InputEvent.usParam ) + switch( InputEvent.usParam ) { - case (( ENTER ) ): - if(( InputEvent.usEvent == KEY_UP ) ) + case ENTER: + if(InputEvent.usEvent == KEY_DOWN) { // return hit, check to see if current player activation string is a valid one - ProcessPlayerInputActivationString( ); - - fNewCharInActivationString = TRUE; + ProcessPlayerInputActivationString(); + fNewCharInActivationString = TRUE; } break; - case (( ESC )): - HandleLapTopESCKey(); // WANNE: Fix for proper closing of the IMP laptop page - LeaveLapTopScreen( ); + case ESC: + if(InputEvent.usEvent == KEY_DOWN) + { + HandleLapTopESCKey(); // WANNE: Fix for proper closing of the IMP laptop page + LeaveLapTopScreen(); + } break; default: if(InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT )