mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix controller delay in menus
M_UpdateMenuCMD only needs to be called once per tick per player. It was being called for every event, which really mangled the repeat delays as more attached controllers sent axis events.
This commit is contained in:
parent
d45ba09ac0
commit
4bb0c39133
3 changed files with 9 additions and 7 deletions
|
|
@ -178,6 +178,7 @@ boolean capslock = 0; // gee i wonder what this does.
|
|||
void D_ProcessEvents(void)
|
||||
{
|
||||
event_t *ev;
|
||||
int i;
|
||||
|
||||
boolean eaten;
|
||||
boolean menuresponse = false;
|
||||
|
|
@ -251,6 +252,12 @@ void D_ProcessEvents(void)
|
|||
{
|
||||
M_MapMenuControls(NULL);
|
||||
}
|
||||
|
||||
// Update menu CMD
|
||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
{
|
||||
M_UpdateMenuCMD(i);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -571,6 +571,7 @@ void Addons_option_Onchange(void);
|
|||
void M_SortServerList(void);
|
||||
|
||||
void M_MapMenuControls(event_t *ev);
|
||||
void M_UpdateMenuCMD(UINT8 i);
|
||||
boolean M_Responder(event_t *ev);
|
||||
boolean M_MenuButtonPressed(UINT8 pid, UINT32 bt);
|
||||
boolean M_MenuButtonHeld(UINT8 pid, UINT32 bt);
|
||||
|
|
|
|||
|
|
@ -691,7 +691,7 @@ void M_SetMenuDelay(UINT8 i)
|
|||
}
|
||||
}
|
||||
|
||||
static void M_UpdateMenuCMD(UINT8 i)
|
||||
void M_UpdateMenuCMD(UINT8 i)
|
||||
{
|
||||
UINT8 mp = max(1, setup_numplayers);
|
||||
|
||||
|
|
@ -734,12 +734,6 @@ void M_MapMenuControls(event_t *ev)
|
|||
// update keys current state
|
||||
G_MapEventsToControls(ev);
|
||||
}
|
||||
|
||||
// Update menu CMD
|
||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
{
|
||||
M_UpdateMenuCMD(i);
|
||||
}
|
||||
}
|
||||
|
||||
boolean M_MenuButtonPressed(UINT8 pid, UINT32 bt)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue