Fixed CRTSwitchRes framebuffer bug

This commit is contained in:
Ben 2021-04-19 07:38:38 -07:00
parent 6b021f8d14
commit 799fcdb5e0

View File

@ -261,11 +261,14 @@ static bool x11_display_server_set_resolution(void *data,
XRRSetCrtcConfig(dpy, res,res->crtcs[i], CurrentTime,
0, 0, None, RR_Rotate_0, NULL, 0);
XSync(dpy, False);
XRRSetScreenSize(dpy, window, width, height, (int) ((25.4 * width) / 96.0), (int) ((25.4 * height) / 96.0));
XSync(dpy, False);
XRRSetCrtcConfig(dpy, res, res->crtcs[i], CurrentTime,
crtc->x, crtc->y, crtc->mode, crtc->rotation,
crtc->outputs, crtc->noutput);
XSync(dpy, False);
XRRFreeCrtcInfo(crtc);
}
@ -292,13 +295,13 @@ static bool x11_display_server_set_resolution(void *data,
XRRSetCrtcConfig(dpy, res,res->crtcs[monitor_index], CurrentTime,
0, 0, None, RR_Rotate_0, NULL, 0);
XSync(dpy, False);
XRRSetScreenSize(dpy, window, width, height, (int) ((25.4 * width) / 96.0), (int) ((25.4 * height) / 96.0));
XSync(dpy, False);
XRRSetCrtcConfig(dpy, res, res->crtcs[monitor_index], CurrentTime,
crtc->x, crtc->y, crtc->mode, crtc->rotation,
crtc->outputs, crtc->noutput);
XSync(dpy, False);
XRRFreeCrtcInfo(crtc);
}
XRRFreeOutputInfo(outputs);