Code cleanup

This commit is contained in:
Ben 2020-09-10 14:44:49 +01:00
parent 00ba1646c6
commit 42c22df72a

View File

@ -306,20 +306,6 @@ static bool x11_display_server_set_resolution(void *data,
XRRFreeCrtcInfo(crtc);
}
for (int m = 0; m < resources->nmode; m++)
{
if (strcmp(resources->modes[m].name, old_mode) == 0)
{
// XRRDeleteOutputMode(dpy, res->outputs[monitor_index], resources->modes[m].id);
// XRRDestroyMode(dpy, resources->modes[m].id);
XSync(dpy, False);
break;
}
}
XRRFreeOutputInfo(outputs);
XRRFreeScreenResources(resources);
@ -594,7 +580,6 @@ static void x11_display_server_destroy(void *data)
}
XRRFreeScreenResources(resources);
}
else if (g_monitor_index != 20)
{
@ -618,27 +603,7 @@ static void x11_display_server_destroy(void *data)
XRRFreeCrtcInfo(crtc);
}
}
/*
snprintf(xrandr, sizeof(xrandr),
"xrandr --newmode 700x480_59.94 13.849698 700 742 801 867 480 490 496 533 interlace -hsync -vsync");
system(xrandr);
snprintf(xrandr, sizeof(xrandr),
"xrandr --addmode \"%s\" 700x480_59.94",
orig_output);
system(xrandr);
snprintf(xrandr, sizeof(xrandr),
"xrandr --output \"%s\" --mode 700x480_59.94",
orig_output);
system(xrandr);
snprintf(xrandr, sizeof(xrandr),
"xrandr --delmode \"%s\" \"%s\"",
orig_output, old_mode);
system(xrandr);
snprintf(xrandr, sizeof(xrandr),
"xrandr --rmmode \"%s\"",
old_mode);
system(xrandr); */
}
for (int m = 0; m < resources->nmode; m++)