mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-19 16:51:53 +00:00
Merge branch 'add-unblockable-console-key' into 'next'
Add unblockable console key See merge request STJr/SRB2!2531
This commit is contained in:
commit
81465eae39
3 changed files with 20 additions and 0 deletions
|
@ -918,6 +918,22 @@ static void CON_InputDelChar(void)
|
|||
// ----
|
||||
//
|
||||
|
||||
//
|
||||
// Same as CON_Responder, but is process before everything else, so it cannot be blocked.
|
||||
//
|
||||
boolean CON_PreResponder(event_t *ev)
|
||||
{
|
||||
if (ev->type == ev_keydown && shiftdown == 1 && ev->key == KEY_ESCAPE)
|
||||
{
|
||||
I_SetTextInputMode(con_destlines == 0); // inverse, since this is changed next tic.
|
||||
consoletoggle = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Handles console key input
|
||||
//
|
||||
boolean CON_Responder(event_t *ev)
|
||||
|
|
|
@ -19,6 +19,7 @@ void CON_Init(void);
|
|||
void CON_StartRefresh(void);
|
||||
void CON_StopRefresh(void);
|
||||
|
||||
boolean CON_PreResponder(event_t *ev);
|
||||
boolean CON_Responder(event_t *ev);
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
|
|
|
@ -227,6 +227,9 @@ void D_ProcessEvents(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (CON_PreResponder(ev))
|
||||
continue;
|
||||
|
||||
// Screenshots over everything so that they can be taken anywhere.
|
||||
if (M_ScreenshotResponder(ev))
|
||||
continue; // ate the event
|
||||
|
|
Loading…
Reference in a new issue