From aa345faf129c9f5485788be3644ef44eb46d27a3 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 17 Mar 2003 05:39:10 +0000 Subject: [PATCH] use the window size for the fullscreen view --- libs/video/targets/context_x11.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libs/video/targets/context_x11.c b/libs/video/targets/context_x11.c index cf7899e5b..5442de26c 100644 --- a/libs/video/targets/context_x11.c +++ b/libs/video/targets/context_x11.c @@ -276,9 +276,9 @@ X11_ForceMove (int x, int y) y -= ny; #if 0 // hopefully this isn't needed! enable if it is. - if (x < 1 - vid.width) + if (x < 1 - scr_width) x = 0; - if (y < 1 - vid.height) + if (y < 1 - scr_height) y = 0; #endif @@ -352,8 +352,8 @@ X11_SetVidMode (int width, int height) } for (i = 0; i < nummodes; i++) { - if ((vidmodes[i]->hdisplay == vid.width) && - (vidmodes[i]->vdisplay == vid.height)) { + if ((vidmodes[i]->hdisplay == scr_width) && + (vidmodes[i]->vdisplay == scr_height)) { found_mode = true; best_mode = i; break; @@ -361,8 +361,8 @@ X11_SetVidMode (int width, int height) } if (found_mode) { - Con_DPrintf ("VID: Chose video mode: %dx%d\n", vid.width, - vid.height); + Con_DPrintf ("VID: Chose video mode: %dx%d\n", scr_width, + scr_height); XF86VidModeSwitchToMode (x_disp, x_screen, vidmodes[best_mode]); @@ -371,7 +371,7 @@ X11_SetVidMode (int width, int height) X11_SetScreenSaver (); } else { Con_Printf ("VID: Mode %dx%d can't go fullscreen.\n", - vid.width, vid.height); + scr_width, scr_height); vidmode_avail = vidmode_active = false; } } @@ -409,8 +409,8 @@ X11_UpdateFullscreen (cvar_t *fullscreen) } X11_ForceMove (0, 0); - XWarpPointer (x_disp, None, x_win, 0, 0, 0, 0, vid.width / 2, - vid.height / 2); + XWarpPointer (x_disp, None, x_win, 0, 0, 0, 0, scr_width / 2, + scr_height / 2); // Done in X11_SetVidMode but moved the window since then X11_ForceViewPort (); }