mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-05 01:38:13 +00:00
Merge branch 'buffered-input-hell' into 'master'
Don't clear inputs at level load or during wipes Closes #1099 See merge request KartKrew/Kart!2001
This commit is contained in:
commit
6bd10fc708
5 changed files with 18 additions and 17 deletions
|
|
@ -5920,9 +5920,9 @@ static void Local_Maketic(INT32 realtics)
|
|||
INT32 i;
|
||||
|
||||
I_OsPolling(); // I_Getevent
|
||||
D_ProcessEvents(); // menu responder, cons responder,
|
||||
// game responder calls HU_Responder, AM_Responder,
|
||||
// and G_MapEventsToControls
|
||||
D_ProcessEvents(true); // menu responder, cons responder,
|
||||
// game responder calls HU_Responder, AM_Responder,
|
||||
// and G_MapEventsToControls
|
||||
|
||||
if (!dedicated) rendergametic = gametic;
|
||||
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ void HandleGamepadDeviceEvents(event_t *ev)
|
|||
// D_ProcessEvents
|
||||
// Send all the events of the given timestamp down the responder chain
|
||||
//
|
||||
void D_ProcessEvents(void)
|
||||
void D_ProcessEvents(boolean callresponders)
|
||||
{
|
||||
event_t *ev;
|
||||
int i;
|
||||
|
|
@ -298,6 +298,9 @@ void D_ProcessEvents(void)
|
|||
// update keys current state
|
||||
G_MapEventsToControls(ev);
|
||||
|
||||
if (!callresponders)
|
||||
continue; // eat
|
||||
|
||||
// Menu input
|
||||
#ifdef HAVE_THREADS
|
||||
I_lock_mutex(&k_menu_mutex);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ void D_PostEvent(const event_t *ev);
|
|||
void D_PostEvent_end(void); // delimiter for locking memory
|
||||
#endif
|
||||
|
||||
void D_ProcessEvents(void);
|
||||
void D_ProcessEvents(boolean callresponders);
|
||||
|
||||
const char *D_Home(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -494,11 +494,6 @@ void F_RunWipe(UINT8 wipemode, UINT8 wipetype, boolean drawMenu, const char *col
|
|||
WipeInAction = true;
|
||||
wipe_scr = screens[0];
|
||||
|
||||
// FIXME: Wipes SUCK and drop input events for some reason, causing stuck gamepad inputs.
|
||||
// It's better to ignore an intentional hold than to turn a tap into a phantom hold.
|
||||
// (If you're removing this, remove the one after the inner loop too!)
|
||||
G_ResetAllDeviceGameKeyDown();
|
||||
|
||||
// lastwipetic should either be 0 or the tic we last wiped
|
||||
// on for fade-to-black
|
||||
for (;;)
|
||||
|
|
@ -558,6 +553,12 @@ void F_RunWipe(UINT8 wipemode, UINT8 wipetype, boolean drawMenu, const char *col
|
|||
}
|
||||
|
||||
I_OsPolling();
|
||||
// The event buffer is rather small so we need to
|
||||
// process these events immediately, to make sure
|
||||
// inputs don't get stuck (would happen a lot with
|
||||
// some controllers that send a lot of analog
|
||||
// events).
|
||||
D_ProcessEvents(false);
|
||||
I_UpdateNoBlit();
|
||||
|
||||
if (drawMenu && rendermode != render_none)
|
||||
|
|
@ -586,11 +587,6 @@ void F_RunWipe(UINT8 wipemode, UINT8 wipetype, boolean drawMenu, const char *col
|
|||
|
||||
WipeInAction = false;
|
||||
|
||||
// FIXME: Wipes SUCK and drop input events for some reason, causing stuck gamepad inputs.
|
||||
// It's better to ignore an intentional hold than to turn a tap into a phantom hold.
|
||||
// (If you're removing this, remove the one before the inner loop too!)
|
||||
G_ResetAllDeviceGameKeyDown();
|
||||
|
||||
if (fcolor)
|
||||
{
|
||||
Z_Free(fcolor);
|
||||
|
|
|
|||
|
|
@ -1191,8 +1191,10 @@ void G_DoLoadLevelEx(boolean resetplayer, gamestate_t newstate)
|
|||
}
|
||||
|
||||
// clear cmd building stuff
|
||||
G_ResetAllDeviceGameKeyDown();
|
||||
G_ResetAllDeviceResponding();
|
||||
// We don't clear them anymore, so you can buffer inputs
|
||||
// on map change / map restart.
|
||||
//G_ResetAllDeviceGameKeyDown();
|
||||
//G_ResetAllDeviceResponding();
|
||||
|
||||
// clear hud messages remains (usually from game startup)
|
||||
CON_ClearHUD();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue