mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Ignore key held events.
This commit is contained in:
parent
180a3b5d91
commit
153d0347cb
1 changed files with 6 additions and 2 deletions
|
|
@ -167,6 +167,8 @@ static tic_t charseltimer = 0;
|
|||
static fixed_t char_scroll = 0;
|
||||
#define charscrollamt 128*FRACUNIT
|
||||
|
||||
static tic_t keydown = 0;
|
||||
|
||||
//
|
||||
// PROTOTYPES
|
||||
//
|
||||
|
|
@ -2864,6 +2866,7 @@ boolean M_Responder(event_t *ev)
|
|||
{
|
||||
if (ev->type == ev_keydown)
|
||||
{
|
||||
keydown++;
|
||||
ch = ev->data1;
|
||||
|
||||
// added 5-2-98 remap virtual keys (mouse & joystick buttons)
|
||||
|
|
@ -2970,6 +2973,8 @@ boolean M_Responder(event_t *ev)
|
|||
pmousex = lastx += 30;
|
||||
}
|
||||
}
|
||||
else if (ev->type == ev_keyup) // Preserve event for other responders
|
||||
keydown = 0;
|
||||
}
|
||||
else if (ev->type == ev_keydown) // Preserve event for other responders
|
||||
ch = ev->data1;
|
||||
|
|
@ -7959,8 +7964,7 @@ static void M_HandleChoosePlayerMenu(INT32 choice)
|
|||
boolean exitmenu = false; // exit to previous menu
|
||||
INT32 selectval;
|
||||
|
||||
// How do I detect key hold events?
|
||||
if (char_scroll)
|
||||
if (keydown > 1)
|
||||
return;
|
||||
|
||||
switch (choice)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue