From 957825a5faf70f18bb5d088ca834b8855adea510 Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Wed, 17 Oct 2001 19:15:55 +0000 Subject: [PATCH] added force_centerview to glx (by moving it to vid_shared) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@935 d7cf8633-e32d-0410-b094-e92efae38249 --- in_svgalib.c | 7 ------- in_win.c | 12 ------------ vid_glx.c | 5 ----- vid_shared.c | 6 ++++++ 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/in_svgalib.c b/in_svgalib.c index d1854309..2527be89 100644 --- a/in_svgalib.c +++ b/in_svgalib.c @@ -92,12 +92,6 @@ static void mousehandler(int buttonstate, int dx, int dy, int dz, int drx, int d } -void Force_CenterView_f(void) -{ - cl.viewangles[PITCH] = 0; -} - - void IN_Init(void) { if (COM_CheckParm("-nokbd")) UseKeyboard = 0; @@ -238,7 +232,6 @@ static void IN_init_mouse(void) int mouserate = MOUSE_DEFAULTSAMPLERATE; Cvar_RegisterVariable (&m_filter); - Cmd_AddCommand("force_centerview", Force_CenterView_f); mouse_buttons = 3; diff --git a/in_win.c b/in_win.c index 5f0b731b..d27f5976 100644 --- a/in_win.c +++ b/in_win.c @@ -156,17 +156,6 @@ void Joy_AdvancedUpdate_f (void); void IN_JoyMove (usercmd_t *cmd); -/* -=========== -Force_CenterView_f -=========== -*/ -void Force_CenterView_f (void) -{ - cl.viewangles[PITCH] = 0; -} - - /* =========== IN_UpdateClipCursor @@ -473,7 +462,6 @@ void IN_Init (void) Cvar_RegisterVariable (&joy_wwhack1); Cvar_RegisterVariable (&joy_wwhack2); - Cmd_AddCommand ("force_centerview", Force_CenterView_f); Cmd_AddCommand ("joyadvancedupdate", Joy_AdvancedUpdate_f); uiWheelMessage = RegisterWindowMessage ( "MSWHEEL_ROLLMSG" ); diff --git a/vid_glx.c b/vid_glx.c index 69b8c61d..a1a898fd 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -776,11 +776,6 @@ void Sys_SendKeyEvents(void) HandleEvents(); } -void Force_CenterView_f (void) -{ - cl.viewangles[PITCH] = 0; -} - void IN_Init(void) { } diff --git a/vid_shared.c b/vid_shared.c index 7cea9639..b28692ad 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -20,9 +20,15 @@ void (GLAPIENTRY *qglSelectTexture) (GLenum); void (GLAPIENTRY *qglLockArraysEXT) (GLint first, GLint count); void (GLAPIENTRY *qglUnlockArraysEXT) (void); +void Force_CenterView_f (void) +{ + cl.viewangles[PITCH] = 0; +} + void VID_InitCvars(void) { Cvar_RegisterVariable(&vid_mode); Cvar_RegisterVariable(&vid_mouse); Cvar_RegisterVariable(&vid_fullscreen); + Cmd_AddCommand("force_centerview", Force_CenterView_f); } -- 2.39.2