mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-01-18 22:41:47 +00:00
some input cleanup, restarts should work a bit better
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2271 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
0d6d61e31c
commit
640524e990
8 changed files with 95 additions and 75 deletions
|
@ -331,7 +331,7 @@ void IN_Impulse (void)
|
|||
void IN_Restart (void)
|
||||
{
|
||||
IN_Shutdown();
|
||||
IN_Init();
|
||||
IN_ReInit();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -68,15 +68,12 @@ void IN_Shutdown(void)
|
|||
|
||||
inputport = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void IN_Init()
|
||||
void IN_ReInit()
|
||||
{
|
||||
/* Cvar_Register (&m_filter, "input controls");*/
|
||||
|
||||
Cvar_Register (&in_xflip, "input controls");
|
||||
|
||||
inputport = CreatePort(0, 0);
|
||||
if (inputport == 0)
|
||||
{
|
||||
|
@ -106,7 +103,12 @@ void IN_Init()
|
|||
inputreq->io_Data = (void *)&InputHandler;
|
||||
inputreq->io_Command = IND_ADDHANDLER;
|
||||
DoIO((struct IORequest *)inputreq);
|
||||
}
|
||||
|
||||
void IN_Init(void)
|
||||
{
|
||||
Cvar_Register (&in_xflip, "input controls");
|
||||
IN_ReInit();
|
||||
}
|
||||
|
||||
static void ExpireRingBuffer()
|
||||
|
|
|
@ -284,11 +284,18 @@ void Sys_SendKeyEvents(void)
|
|||
void IN_Shutdown (void)
|
||||
{
|
||||
}
|
||||
|
||||
void IN_ReInit (void)
|
||||
{
|
||||
IN_ActivateMouse();
|
||||
}
|
||||
|
||||
void IN_Init (void)
|
||||
{
|
||||
#ifdef IN_XFLIP
|
||||
Cvar_Register (&in_xflip, "Input Controls");
|
||||
#endif
|
||||
IN_ReInit();
|
||||
}
|
||||
void IN_Move (usercmd_t *cmd, int pnum) //add mouse movement to cmd
|
||||
{
|
||||
|
|
|
@ -1199,11 +1199,15 @@ void IN_StartupMouse (void)
|
|||
IN_Init
|
||||
===========
|
||||
*/
|
||||
void IN_ReInit (void)
|
||||
{
|
||||
IN_StartupMouse ();
|
||||
IN_StartupJoystick ();
|
||||
IN_ActivateMouse();
|
||||
}
|
||||
|
||||
void IN_Init (void)
|
||||
{
|
||||
static qboolean firstinit = true;
|
||||
if (firstinit)
|
||||
{
|
||||
//keyboard variables
|
||||
Cvar_Register (&cl_keypad, "Input Controls");
|
||||
|
||||
|
@ -1271,14 +1275,8 @@ void IN_Init (void)
|
|||
Cvar_Register (&in_rawinput_combine, "Input Controls");
|
||||
Cvar_Register (&in_rawinput_rdp, "Input Controls");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
IN_StartupMouse ();
|
||||
IN_StartupJoystick ();
|
||||
}
|
||||
|
||||
firstinit = false;
|
||||
IN_ReInit();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// input.h -- external (non-keyboard) input devices
|
||||
|
||||
void IN_ReInit (void);
|
||||
|
||||
void IN_Init (void);
|
||||
|
||||
void IN_Shutdown (void);
|
||||
|
|
|
@ -1615,7 +1615,7 @@ TRACE(("dbg: R_ApplyRenderer: renderer inited\n"));
|
|||
TRACE(("dbg: R_ApplyRenderer: screen inited\n"));
|
||||
Sbar_Flush();
|
||||
|
||||
IN_Init();
|
||||
IN_ReInit();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -950,12 +950,17 @@ void Force_CenterView_f (void)
|
|||
cl.viewangles[0][PITCH] = 0;
|
||||
}
|
||||
|
||||
void IN_ReInit(void)
|
||||
{
|
||||
}
|
||||
|
||||
#ifndef SWQUAKE
|
||||
void IN_Init(void)
|
||||
{
|
||||
#ifdef IN_XFLIP
|
||||
Cvar_Register (&in_xflip, "Input variables");
|
||||
#endif
|
||||
IN_ReInit();
|
||||
}
|
||||
|
||||
void IN_Shutdown(void)
|
||||
|
|
|
@ -1263,6 +1263,14 @@ void SWD_EndDirectRect (int x, int y, int width, int height)
|
|||
// direct drawing of the "accessing disk" icon isn't supported under Linux
|
||||
}
|
||||
|
||||
void IN_ReInit(void)
|
||||
{
|
||||
if ( COM_CheckParm ("-nomouse") )
|
||||
return;
|
||||
mouse_x = mouse_y = 0.0;
|
||||
mouseactive = mouse_avail = 1;
|
||||
}
|
||||
|
||||
void IN_Init (void)
|
||||
{
|
||||
Cvar_Register (&_windowed_mouse, "Input Controls");
|
||||
|
@ -1271,10 +1279,8 @@ void IN_Init (void)
|
|||
#ifdef IN_XFLIP
|
||||
Cvar_Register (&in_xflip, "Input Controls");
|
||||
#endif
|
||||
if ( COM_CheckParm ("-nomouse") )
|
||||
return;
|
||||
mouse_x = mouse_y = 0.0;
|
||||
mouseactive = mouse_avail = 1;
|
||||
|
||||
IN_ReInit();
|
||||
}
|
||||
|
||||
void IN_Shutdown (void)
|
||||
|
|
Loading…
Reference in a new issue