mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
merge IN_SendKeyEvents and IN_Commands into IN_ProcessEvents
This commit is contained in:
parent
35eb866603
commit
255a7522bd
10 changed files with 16 additions and 38 deletions
|
@ -41,20 +41,17 @@ extern viewdelta_t viewdelta;
|
|||
#define freelook (in_mlook.state & 1 || in_freelook->int_val)
|
||||
|
||||
|
||||
void IN_UpdateGrab (struct cvar_s *);
|
||||
void IN_Init (void);
|
||||
void IN_Init_Cvars (void);
|
||||
|
||||
void IN_Shutdown (void);
|
||||
|
||||
void IN_Commands (void);
|
||||
// oportunity for devices to stick commands on the script buffer
|
||||
void IN_ProcessEvents (void);
|
||||
|
||||
void IN_UpdateGrab (struct cvar_s *);
|
||||
|
||||
void IN_ClearStates (void);
|
||||
|
||||
void IN_SendKeyEvents (void);
|
||||
// Perform Key_Event () callbacks until the input que is empty
|
||||
|
||||
void IN_Move (void); // FIXME: was cmduser_t?
|
||||
// add additional movement on top of the keyboard move cmd
|
||||
|
||||
|
@ -72,7 +69,7 @@ extern float in_mouse_x, in_mouse_y;
|
|||
void IN_LL_Init_Cvars (void);
|
||||
void IN_LL_Init (void);
|
||||
void IN_LL_Shutdown (void);
|
||||
void IN_LL_SendKeyEvents (void);
|
||||
void IN_LL_ProcessEvents (void);
|
||||
void IN_LL_ClearStates (void);
|
||||
void IN_LL_Grab_Input (int grab);
|
||||
|
||||
|
|
|
@ -87,16 +87,11 @@ IN_UpdateGrab (cvar_t *var) // called from context_*.c
|
|||
}
|
||||
|
||||
void
|
||||
IN_Commands (void)
|
||||
{
|
||||
JOY_Command ();
|
||||
}
|
||||
|
||||
void
|
||||
IN_SendKeyEvents (void)
|
||||
IN_ProcessEvents (void)
|
||||
{
|
||||
/* Get events from environment. */
|
||||
IN_LL_SendKeyEvents ();
|
||||
JOY_Command ();
|
||||
IN_LL_ProcessEvents ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -96,7 +96,7 @@ IN_LL_Shutdown (void)
|
|||
}
|
||||
|
||||
void
|
||||
IN_LL_SendKeyEvents (void)
|
||||
IN_LL_ProcessEvents (void)
|
||||
{
|
||||
int k, down;
|
||||
char buf[4];
|
||||
|
|
|
@ -71,7 +71,7 @@ event_focusin (void)
|
|||
}
|
||||
|
||||
void
|
||||
IN_LL_SendKeyEvents (void)
|
||||
IN_LL_ProcessEvents (void)
|
||||
{
|
||||
SDL_Event event;
|
||||
int sym, state, but;
|
||||
|
|
|
@ -418,7 +418,7 @@ IN_LL_Shutdown (void)
|
|||
|
||||
|
||||
void
|
||||
IN_LL_SendKeyEvents (void)
|
||||
IN_LL_ProcessEvents (void)
|
||||
{
|
||||
if (!in_svgalib_inited)
|
||||
return;
|
||||
|
|
|
@ -423,7 +423,7 @@ IN_LL_ClearStates (void)
|
|||
}
|
||||
|
||||
void
|
||||
IN_LL_SendKeyEvents (void)
|
||||
IN_LL_ProcessEvents (void)
|
||||
{
|
||||
MSG msg;
|
||||
int mx, my;
|
||||
|
|
|
@ -621,7 +621,7 @@ IN_LL_Grab_Input (int grab)
|
|||
}
|
||||
|
||||
void
|
||||
IN_LL_SendKeyEvents (void)
|
||||
IN_LL_ProcessEvents (void)
|
||||
{
|
||||
X11_ProcessEvents (); // Get events from X server.
|
||||
}
|
||||
|
|
|
@ -598,13 +598,8 @@ _Host_Frame (float time)
|
|||
return; // don't run too fast, or packets
|
||||
// will flood out
|
||||
|
||||
if (cls.state != ca_dedicated) {
|
||||
// get new key events
|
||||
IN_SendKeyEvents ();
|
||||
|
||||
// allow mice or other external controllers to add commands
|
||||
IN_Commands ();
|
||||
}
|
||||
if (cls.state != ca_dedicated)
|
||||
IN_ProcessEvents ();
|
||||
|
||||
// process gib threads
|
||||
|
||||
|
|
|
@ -200,11 +200,6 @@ Host_Skin_Init_Cvars (void)
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
IN_Commands (void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
IN_Init (void)
|
||||
{
|
||||
|
@ -216,7 +211,7 @@ IN_Init_Cvars (void)
|
|||
}
|
||||
|
||||
void
|
||||
IN_SendKeyEvents (void)
|
||||
IN_ProcessEvents (void)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -1495,11 +1495,7 @@ Host_Frame (float time)
|
|||
oldrealtime = realtime;
|
||||
host_frametime = min (host_frametime, 0.2);
|
||||
|
||||
// get new key events
|
||||
IN_SendKeyEvents ();
|
||||
|
||||
// allow mouses or other external controllers to add commands
|
||||
IN_Commands ();
|
||||
IN_ProcessEvents ();
|
||||
|
||||
// process gib threads
|
||||
|
||||
|
|
Loading…
Reference in a new issue