diff --git a/code/REDALERT/MAPEDDLG.CPP b/code/REDALERT/MAPEDDLG.CPP index 41c0b0f..050a12c 100644 --- a/code/REDALERT/MAPEDDLG.CPP +++ b/code/REDALERT/MAPEDDLG.CPP @@ -655,6 +655,8 @@ int MapEditClass::Pick_Scenario(char const * caption, int & scen_nump, ScenarioP g_globalKeyNumType = KN_NONE; g_globalKeyFlags = 0; UserInput.Process_Input(); + + Device_Present(); } Imgui_Dialog_Function = nullptr; @@ -1122,6 +1124,8 @@ int MapEditClass::Size_Map(int x, int y, int w, int h) g_globalKeyFlags = 0; UserInput.Process_Input(); + Device_Present(); + // display = REDRAW_NONE; @@ -1958,9 +1962,10 @@ int MapEditClass::Scenario_Dialog(void) */ KeyNumType input = KN_NONE; //commands->Input(); - g_globalKeyNumType = KN_NONE; + //g_globalKeyNumType = KN_NONE; g_globalKeyFlags = 0; - UserInput.Process_Input(); + + UserInput.Process_Input(input); /* ** Process input @@ -2554,6 +2559,8 @@ int MapEditClass::Select_Trigger(void) g_globalKeyFlags = 0; UserInput.Process_Input(); + Device_Present(); + /* ** Get user input */ diff --git a/code/REDALERT/MAPEDIT.CPP b/code/REDALERT/MAPEDIT.CPP index 06cc48c..ab87f0e 100644 --- a/code/REDALERT/MAPEDIT.CPP +++ b/code/REDALERT/MAPEDIT.CPP @@ -1589,7 +1589,7 @@ void MapEditClass::Main_Menu(void) g_globalKeyFlags = 0; UserInput.Process_Input(); - Call_Back(); + Device_Present(); Show_Mouse(); @@ -1786,8 +1786,12 @@ void MapEditClass::AI_Menu(void) */ Call_Back(); + g_globalKeyNumType = KN_NONE; + g_globalKeyFlags = 0; UserInput.Process_Input(); + Device_Present(); + /* ** Invoke menu */ diff --git a/code/REDALERT/MAPEDTM.CPP b/code/REDALERT/MAPEDTM.CPP index 7c07909..32a7366 100644 --- a/code/REDALERT/MAPEDTM.CPP +++ b/code/REDALERT/MAPEDTM.CPP @@ -330,6 +330,12 @@ int MapEditClass::Select_Team(char const * ) /* ** Get user input */ + g_globalKeyNumType = KN_NONE; + g_globalKeyFlags = 0; + UserInput.Process_Input(); + + //Device_Present(); + KeyNumType input = commands->Input(); /* diff --git a/code/REDALERT/MENUS.CPP b/code/REDALERT/MENUS.CPP index fd8ffda..7b534d0 100644 --- a/code/REDALERT/MENUS.CPP +++ b/code/REDALERT/MENUS.CPP @@ -245,11 +245,7 @@ int Check_Menu(int menu, char const * text[], char *, long field, int index, Key key = 0; UnknownKey = 0; if (Keyboard->Check()) { -#ifdef WIN32 key = (Keyboard->Get() & ~(WWKEY_SHIFT_BIT | WWKEY_ALT_BIT | WWKEY_CTRL_BIT)); /* mask off all but release bit */ -#else - key = (Keyboard->Get() & 0x08FF); /* mask off all but release bit */ -#endif } } else { @@ -441,18 +437,23 @@ int Do_Menu(char const ** strings, bool ) Keyboard->Clear(); selection = -1; UnknownKey = 0; + + // AI options main selection loop while (selection == -1) { -// jmarshall + Call_Back(); + g_globalKeyNumType = KN_NONE; g_globalKeyFlags = 0; + UserInput.Process_Input(); - Call_Back(); + Device_Present(); Show_Mouse(true); selection = Check_Menu(0, strings, NULL, 0xFFL, 0, (KeyNumType)g_globalKeyFlags); - if (UnknownKey != 0 || UnknownKey == KN_ESC || UnknownKey==KN_LMOUSE || UnknownKey==KN_RMOUSE) break; + if ( UnknownKey != 0 || UnknownKey == KN_ESC || UnknownKey==KN_LMOUSE || UnknownKey==KN_RMOUSE) break; } + Keyboard->Clear(); Hide_Mouse();