Remove debug output

This commit is contained in:
Deve 2014-07-27 19:36:40 +02:00
parent 068b88cb4b
commit 0409a84fa0

View File

@ -259,7 +259,6 @@ bool CIrrDeviceLinux::switchToFullscreen(bool reset)
if (s != Success) if (s != Success)
{ {
printf("XRRSetCrtcConfig failed\n");
return false; return false;
} }
} }
@ -338,35 +337,24 @@ bool CIrrDeviceLinux::switchToFullscreen(bool reset)
if (!res) if (!res)
{ {
printf("Couldn't get XRandR screen resources\n");
return false; return false;
} }
printf("res->noutput %i \n", res->noutput);
printf("res->nmode %i \n", res->nmode);
XRROutputInfo* output = XRRGetOutputInfo(display, res, res->outputs[output_id]); XRROutputInfo* output = XRRGetOutputInfo(display, res, res->outputs[output_id]);
XRRCrtcInfo* crtc = XRRGetCrtcInfo(display, res, output->crtc); XRRCrtcInfo* crtc = XRRGetCrtcInfo(display, res, output->crtc);
printf("wanted width: %i, wanted height: %i\n", Width, Height);
for (int i = 0; i < res->nmode; i++) for (int i = 0; i < res->nmode; i++)
{ {
const XRRModeInfo* info = &res->modes[i]; const XRRModeInfo* info = &res->modes[i];
printf("mode %i, width: %i, height: %i\n", i, info->width, info->height);
if (bestMode == -1 && info->width == Width && info->height == Height) if (bestMode == -1 && info->width == Width && info->height == Height)
{ {
printf("found info->width %i, info->height %i\n", info->width, info->height);
printf("output->nmode, %i\n", output->nmode);
for (int j = 0; j < output->nmode; j++) for (int j = 0; j < output->nmode; j++)
{ {
if (res->modes[i].id != output->modes[j]) if (res->modes[i].id != output->modes[j])
continue; continue;
bestMode = i; bestMode = i;
printf("Found best mode: %i, width: %i, height: %i\n", bestMode, info->width, info->height);
break; break;
} }
} }
@ -384,7 +372,6 @@ bool CIrrDeviceLinux::switchToFullscreen(bool reset)
if (s != Success) if (s != Success)
{ {
printf("XRRSetCrtcConfig failed\n");
return false; return false;
} }
@ -1549,14 +1536,11 @@ video::IVideoModeList* CIrrDeviceLinux::getVideoModeList()
if (!res) if (!res)
{ {
printf("Couldn't get XRandR screen resources\n");
return NULL; return NULL;
} }
XRROutputInfo *output = NULL; XRROutputInfo *output = NULL;
XRRCrtcInfo* crtc = NULL; XRRCrtcInfo* crtc = NULL;
printf("res->noutput %i \n", res->noutput);
printf("res->nmode %i \n", res->nmode);
for (int i = 0; i < res->noutput; i++) for (int i = 0; i < res->noutput; i++)
{ {
@ -1565,30 +1549,24 @@ video::IVideoModeList* CIrrDeviceLinux::getVideoModeList()
if (!output || !output->crtc || output->connection == RR_Disconnected) if (!output || !output->crtc || output->connection == RR_Disconnected)
{ {
XRRFreeOutputInfo(output); XRRFreeOutputInfo(output);
printf("disconnected\n");
continue; continue;
} }
crtc = XRRGetCrtcInfo(display, res, output->crtc); crtc = XRRGetCrtcInfo(display, res, output->crtc);
printf("crtc->x %i\n", crtc->x);
printf("crtc->y %i\n", crtc->y);
if (!crtc || crtc->x != 0 || crtc->y != 0) if (!crtc || crtc->x != 0 || crtc->y != 0)
{ {
XRRFreeCrtcInfo(crtc); XRRFreeCrtcInfo(crtc);
XRRFreeOutputInfo(output); XRRFreeOutputInfo(output);
printf("not crtc\n");
continue; continue;
} }
output_id = i; output_id = i;
printf("found\n");
break; break;
} }
if (crtc == NULL) if (crtc == NULL)
{ {
printf("error. crtc not found\n");
XRRFreeCrtcInfo(crtc); XRRFreeCrtcInfo(crtc);
XRRFreeOutputInfo(output); XRRFreeOutputInfo(output);
XRRFreeScreenResources(res); XRRFreeScreenResources(res);
@ -1598,24 +1576,19 @@ video::IVideoModeList* CIrrDeviceLinux::getVideoModeList()
for (int i = 0; i < res->nmode; i++) for (int i = 0; i < res->nmode; i++)
{ {
const XRRModeInfo *mode = &res->modes[i]; const XRRModeInfo *mode = &res->modes[i];
printf("mode %i, width: %i, height: %i\n", i, mode->width, mode->height);
for (int j = 0; j < output->nmode; j++) for (int j = 0; j < output->nmode; j++)
{ {
if (res->modes[i].id == output->modes[j]) if (res->modes[i].id == output->modes[j])
{ {
VideoModeList.addMode(core::dimension2d<u32>( VideoModeList.addMode(core::dimension2d<u32>(
mode->width, mode->height), defaultDepth); mode->width, mode->height), defaultDepth);
printf("Found mode: %i, width: %i, height: %i\n", i, mode->width, mode->height);
} }
if (res->modes[i].id == crtc->mode) if (res->modes[i].id == crtc->mode)
{ {
old_mode = i; old_mode = i;
VideoModeList.setDesktop(defaultDepth, core::dimension2d<u32>(mode->width, mode->height)); VideoModeList.setDesktop(defaultDepth, core::dimension2d<u32>(mode->width, mode->height));
printf("current resolution, width: %i, height: %i\n", mode->width, mode->height);
} }
} }
} }