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
This commit is contained in:
TimeServ 2011-01-27 01:34:08 +00:00
parent 227bc47130
commit f21c352fb4
4 changed files with 7 additions and 39 deletions

View file

@ -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;

View file

@ -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

View file

@ -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) {}

View file

@ -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)