mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-31 17:21:46 +00:00
Okay, so I fscked up the video mode restoration. Sue me. It's fixed now.
This commit is contained in:
parent
8711d430d1
commit
cedd063a6a
1 changed files with 8 additions and 7 deletions
|
@ -95,7 +95,7 @@ static int nummodes;
|
||||||
|
|
||||||
static int screen_width;
|
static int screen_width;
|
||||||
static int screen_height;
|
static int screen_height;
|
||||||
static int original_mode;
|
static int original_mode = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static qboolean vidmode_avail = false;
|
static qboolean vidmode_avail = false;
|
||||||
|
@ -273,16 +273,17 @@ x11_set_vidmode (int width, int height)
|
||||||
|
|
||||||
if (vid_fullscreen->int_val && vidmode_avail) {
|
if (vid_fullscreen->int_val && vidmode_avail) {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
int best_mode = 0;
|
int best_mode = 0;
|
||||||
qboolean found_mode = false;
|
qboolean found_mode = false;
|
||||||
|
XF86VidModeModeLine orig_data;
|
||||||
|
|
||||||
XF86VidModeGetAllModeLines (x_disp, x_screen, &nummodes, &vidmodes);
|
XF86VidModeGetAllModeLines (x_disp, x_screen, &nummodes, &vidmodes);
|
||||||
XF86VidModeGetViewPort (x_disp, x_screen, &screen_width, &screen_height);
|
XF86VidModeGetViewPort (x_disp, x_screen, &orig_data);
|
||||||
|
|
||||||
for (i = 0; i < nummodes; i++) {
|
for (i = 0; i < nummodes; i++) {
|
||||||
if ((vidmodes[i]->hdisplay == screen_width) &&
|
if ((vidmodes[i]->hdisplay == orig_data.hdisplay) &&
|
||||||
(vidmodes[i]->vdisplay == screen_height)) {
|
(vidmodes[i]->vdisplay == orig_data.vdisplay)) {
|
||||||
original_mode = i;
|
original_mode = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue