mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-23 13:02:07 +00:00
Merge pull request #634 from lazd/altloadfix
Flush keys when server data is parsed
This commit is contained in:
commit
bd4f7bed65
2 changed files with 15 additions and 11 deletions
|
@ -829,6 +829,9 @@ CL_ParseServerData(void)
|
||||||
char *str;
|
char *str;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/* Clear all key states */
|
||||||
|
In_FlushQueue();
|
||||||
|
|
||||||
Com_DPrintf("Serverdata packet received.\n");
|
Com_DPrintf("Serverdata packet received.\n");
|
||||||
|
|
||||||
/* wipe the client_state_t struct */
|
/* wipe the client_state_t struct */
|
||||||
|
|
|
@ -577,7 +577,7 @@ IN_Update(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Com_Printf("Pressed unknown key with SDL_Keycode %d, SDL_Scancode %d.\n", kc, (int)sc);
|
Com_DPrintf("Pressed unknown key with SDL_Keycode %d, SDL_Scancode %d.\n", kc, (int)sc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -822,16 +822,6 @@ IN_Update(void)
|
||||||
sys_frame_time = Sys_Milliseconds();
|
sys_frame_time = Sys_Milliseconds();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Removes all pending events from SDLs queue.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
In_FlushQueue(void)
|
|
||||||
{
|
|
||||||
SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT);
|
|
||||||
Key_MarkAllUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Move handling
|
* Move handling
|
||||||
*/
|
*/
|
||||||
|
@ -981,6 +971,17 @@ IN_JoyAltSelectorUp(void)
|
||||||
joy_altselector_pressed = false;
|
joy_altselector_pressed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Removes all pending events from SDLs queue.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
In_FlushQueue(void)
|
||||||
|
{
|
||||||
|
SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT);
|
||||||
|
Key_MarkAllUp();
|
||||||
|
IN_JoyAltSelectorUp();
|
||||||
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------ */
|
||||||
|
|
||||||
static void IN_Haptic_Shutdown(void);
|
static void IN_Haptic_Shutdown(void);
|
||||||
|
|
Loading…
Reference in a new issue