From f21c352fb4ff99631b2eea5469cef7e12f73eb7b Mon Sep 17 00:00:00 2001 From: TimeServ Date: Thu, 27 Jan 2011 01:34:08 +0000 Subject: [PATCH] code cleanup fix no dga on linux git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3720 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/in_sdl.c | 11 ----------- engine/client/sys_linux.c | 9 +-------- engine/gl/gl_vidlinuxglx.c | 24 +++++------------------- engine/server/sv_sql.c | 2 +- 4 files changed, 7 insertions(+), 39 deletions(-) diff --git a/engine/client/in_sdl.c b/engine/client/in_sdl.c index dd25758bb..ebb168bb5 100644 --- a/engine/client/in_sdl.c +++ b/engine/client/in_sdl.c @@ -224,10 +224,6 @@ static unsigned int tbl_sdltoquakemouse[] = int mouse_x, mouse_y; -#ifdef SWQUAKE -void ResetFrameBuffers(void); -#endif - void Sys_SendKeyEvents(void) { SDL_Event event; @@ -251,13 +247,6 @@ void Sys_SendKeyEvents(void) vid.pixelwidth = event.resize.w; vid.pixelheight = event.resize.h; break; -#endif -#ifdef SWQUAKE - case QR_SOFTWARE: - vid.width = event.resize.w; - vid.height = event.resize.h; - ResetFrameBuffers(); - break; #endif } break; diff --git a/engine/client/sys_linux.c b/engine/client/sys_linux.c index a0f4bc10a..9b74204f7 100644 --- a/engine/client/sys_linux.c +++ b/engine/client/sys_linux.c @@ -399,6 +399,7 @@ void Sys_CloseLibrary(dllhandle_t *lib) { dlclose((void*)lib); } + dllhandle_t *Sys_LoadLibrary(const char *name, dllfunction_t *funcs) { int i; @@ -513,14 +514,6 @@ int main (int c, char **v) continue; } #endif -#ifdef SWQUAKE -#warning don't worry if this causes linker errors - we don't have a macos sw renderer yet! - if (swcocoaRunLoop()) - { - oldtime = Sys_DoubleTime (); - continue; - } -#endif #endif // find time spent rendering last frame diff --git a/engine/gl/gl_vidlinuxglx.c b/engine/gl/gl_vidlinuxglx.c index 042612df1..95c75c658 100644 --- a/engine/gl/gl_vidlinuxglx.c +++ b/engine/gl/gl_vidlinuxglx.c @@ -52,11 +52,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define WARP_WIDTH 320 #define WARP_HEIGHT 200 -#ifdef SWQUAKE -Display *vid_dpy = NULL; -#else static Display *vid_dpy = NULL; -#endif static Window vid_window; static GLXContext ctx = NULL; int scrnum; @@ -90,7 +86,6 @@ qboolean originalapplied; //states that the origionalramps arrays are valid, and extern cvar_t _windowed_mouse; -#ifndef SWQUAKE cvar_t m_filter = {"m_filter", "0"}; cvar_t m_accel = {"m_accel", "0"}; @@ -101,12 +96,6 @@ cvar_t in_xflip = {"in_xflip", "0"}; static float mouse_x, mouse_y; static float old_mouse_x, old_mouse_y; -#else - -extern float mouse_x, mouse_y; -extern float old_mouse_x, old_mouse_y; -#endif - /*-----------------------------------------------------------------------*/ float gldepthmin, gldepthmax; @@ -348,8 +337,11 @@ static void install_grabs(void) static void uninstall_grabs(void) { #ifdef USE_DGA - XF86DGADirectVideo(vid_dpy, DefaultScreen(vid_dpy), 0); - dgamouse = 0; + if (dgamouse) + { + XF86DGADirectVideo(vid_dpy, DefaultScreen(vid_dpy), 0); + dgamouse = 0; + } #endif XUngrabPointer(vid_dpy, CurrentTime); @@ -968,11 +960,7 @@ qboolean GLVID_Init (rendererstate_t *info, unsigned char *palette) return true; } -#ifdef SWQUAKE -void GLSys_SendKeyEvents(void) -#else void Sys_SendKeyEvents(void) -#endif { if (vid_dpy && vid_window) { while (XPending(vid_dpy)) @@ -985,7 +973,6 @@ void Force_CenterView_f (void) cl.viewangles[0][PITCH] = 0; } -#ifndef SWQUAKE void IN_ReInit(void) { } @@ -1109,7 +1096,6 @@ void IN_Move (float *movements, int pnum) { IN_MouseMove(movements, pnum); } -#endif void GL_DoSwap(void) {} diff --git a/engine/server/sv_sql.c b/engine/server/sv_sql.c index f3cb481d6..fec42845d 100644 --- a/engine/server/sv_sql.c +++ b/engine/server/sv_sql.c @@ -166,7 +166,7 @@ int sql_serverworker(void *sref) { Sys_LockConditional(server->requestcondv); if (!server->requests) // this is needed for thread startup and to catch any "lost" changes - Sys_ConditionWait(server->requestcondv); + Sys_ConditionWait(server->requestcondv); needlock = false; // so we don't try to relock first round while (1)