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