mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'always-map-controls' into 'master'
Call G_MapEventsToControls before M_Responder and G_Responder Closes #480 See merge request KartKrew/Kart!1082
This commit is contained in:
commit
243c708ab2
4 changed files with 3 additions and 23 deletions
11
src/d_main.c
11
src/d_main.c
|
|
@ -230,7 +230,6 @@ void D_ProcessEvents(void)
|
|||
int i;
|
||||
|
||||
boolean eaten;
|
||||
boolean menuresponse = false;
|
||||
|
||||
G_ResetAllDeviceResponding();
|
||||
for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1))
|
||||
|
|
@ -272,8 +271,10 @@ void D_ProcessEvents(void)
|
|||
continue; // ate the event
|
||||
}
|
||||
|
||||
// update keys current state
|
||||
G_MapEventsToControls(ev);
|
||||
|
||||
// Menu input
|
||||
menuresponse = true;
|
||||
#ifdef HAVE_THREADS
|
||||
I_lock_mutex(&k_menu_mutex);
|
||||
#endif
|
||||
|
|
@ -298,12 +299,6 @@ void D_ProcessEvents(void)
|
|||
G_Responder(ev);
|
||||
}
|
||||
|
||||
// Reset menu controls when no event is processed
|
||||
if (!menuresponse)
|
||||
{
|
||||
M_MapMenuControls(NULL);
|
||||
}
|
||||
|
||||
// Update menu CMD
|
||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1813,9 +1813,6 @@ boolean G_Responder(event_t *ev)
|
|||
}
|
||||
}
|
||||
|
||||
// update keys current state
|
||||
G_MapEventsToControls(ev);
|
||||
|
||||
switch (ev->type)
|
||||
{
|
||||
case ev_keydown:
|
||||
|
|
|
|||
|
|
@ -563,7 +563,6 @@ void M_SetMenuDelay(UINT8 i);
|
|||
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -261,8 +261,6 @@ boolean M_Responder(event_t *ev)
|
|||
menuKey = ev->data1;
|
||||
}
|
||||
|
||||
M_MapMenuControls(ev);
|
||||
|
||||
// Profiles: Control mapping.
|
||||
// We take the WHOLE EVENT for convenience.
|
||||
if (optionsmenu.bindcontrol)
|
||||
|
|
@ -758,15 +756,6 @@ void M_UpdateMenuCMD(UINT8 i)
|
|||
}
|
||||
}
|
||||
|
||||
void M_MapMenuControls(event_t *ev)
|
||||
{
|
||||
if (ev)
|
||||
{
|
||||
// update keys current state
|
||||
G_MapEventsToControls(ev);
|
||||
}
|
||||
}
|
||||
|
||||
boolean M_MenuButtonPressed(UINT8 pid, UINT32 bt)
|
||||
{
|
||||
if (menucmd[pid].buttonsHeld & bt)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue