mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
kinfocenter: warn in case of error
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
1df7f425fc
commit
2838d2997e
1 changed files with 11 additions and 11 deletions
|
@ -669,29 +669,29 @@ static QTreeWidgetItem *get_gl_info(Display *dpy, int scrnum, Bool allowDirect,
|
||||||
|
|
||||||
egl_dpy = eglGetDisplay(dpy);
|
egl_dpy = eglGetDisplay(dpy);
|
||||||
if (!egl_dpy) {
|
if (!egl_dpy) {
|
||||||
kDebug() << "Error: eglGetDisplay() failed\n";
|
kWarning() << "eglGetDisplay() failed";
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!eglInitialize(egl_dpy, &major, &minor)) {
|
if (!eglInitialize(egl_dpy, &major, &minor)) {
|
||||||
kDebug() << "Error: eglInitialize() failed\n";
|
kWarning() << "eglInitialize() failed";
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!eglChooseConfig(egl_dpy, attribs, &config, 1, &num_configs)) {
|
if (!eglChooseConfig(egl_dpy, attribs, &config, 1, &num_configs)) {
|
||||||
kDebug() << "Error: couldn't get an EGL visual config\n";
|
kWarning() << "couldn't get an EGL visual config";
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) {
|
if (!eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) {
|
||||||
kDebug() << "Error: eglGetConfigAttrib() failed\n";
|
kWarning() << "eglGetConfigAttrib() failed";
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
visTemplate.visualid = vid;
|
visTemplate.visualid = vid;
|
||||||
visinfo = XGetVisualInfo(dpy, VisualIDMask, &visTemplate, &num_visuals);
|
visinfo = XGetVisualInfo(dpy, VisualIDMask, &visTemplate, &num_visuals);
|
||||||
if (!visinfo) {
|
if (!visinfo) {
|
||||||
kDebug() << "Error: couldn't get X visual\n";
|
kWarning() << "couldn't get X visual";
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -708,7 +708,7 @@ static QTreeWidgetItem *get_gl_info(Display *dpy, int scrnum, Bool allowDirect,
|
||||||
#ifndef KCM_ENABLE_OPENGLES
|
#ifndef KCM_ENABLE_OPENGLES
|
||||||
ctx = glXCreateContext( dpy, visinfo, NULL, allowDirect );
|
ctx = glXCreateContext( dpy, visinfo, NULL, allowDirect );
|
||||||
if (!ctx) {
|
if (!ctx) {
|
||||||
kDebug() << "Error: glXCreateContext failed\n";
|
kWarning() << "glXCreateContext failed";
|
||||||
XDestroyWindow(dpy, win);
|
XDestroyWindow(dpy, win);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -733,7 +733,7 @@ static QTreeWidgetItem *get_gl_info(Display *dpy, int scrnum, Bool allowDirect,
|
||||||
|
|
||||||
result = print_screen_info(l1, after);
|
result = print_screen_info(l1, after);
|
||||||
} else {
|
} else {
|
||||||
kDebug() << "Error: glXMakeCurrent failed\n";
|
kWarning() << "glXMakeCurrent failed";
|
||||||
}
|
}
|
||||||
|
|
||||||
glXDestroyContext(dpy, ctx);
|
glXDestroyContext(dpy, ctx);
|
||||||
|
@ -741,14 +741,14 @@ static QTreeWidgetItem *get_gl_info(Display *dpy, int scrnum, Bool allowDirect,
|
||||||
eglBindAPI(EGL_OPENGL_ES_API);
|
eglBindAPI(EGL_OPENGL_ES_API);
|
||||||
ctx = eglCreateContext(egl_dpy, config, EGL_NO_CONTEXT, ctx_attribs);
|
ctx = eglCreateContext(egl_dpy, config, EGL_NO_CONTEXT, ctx_attribs);
|
||||||
if (!ctx) {
|
if (!ctx) {
|
||||||
kDebug() << "Error: eglCreateContext failed\n";
|
kWarning() << "eglCreateContext failed";
|
||||||
XDestroyWindow(dpy, win);
|
XDestroyWindow(dpy, win);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
surf = eglCreateWindowSurface(egl_dpy, config, win, NULL);
|
surf = eglCreateWindowSurface(egl_dpy, config, win, NULL);
|
||||||
if (!surf) {
|
if (!surf) {
|
||||||
kDebug() << "Error: eglCreateWindowSurface failed\n";
|
kWarning() << "eglCreateWindowSurface failed";
|
||||||
eglDestroyContext(egl_dpy, ctx);
|
eglDestroyContext(egl_dpy, ctx);
|
||||||
XDestroyWindow(dpy, win);
|
XDestroyWindow(dpy, win);
|
||||||
return result;
|
return result;
|
||||||
|
@ -767,7 +767,7 @@ static QTreeWidgetItem *get_gl_info(Display *dpy, int scrnum, Bool allowDirect,
|
||||||
IsDirect = true;
|
IsDirect = true;
|
||||||
result = print_screen_info(l1, after);
|
result = print_screen_info(l1, after);
|
||||||
} else {
|
} else {
|
||||||
kDebug() <<"Error: eglMakeCurrent() failed\n";
|
kWarning() << "eglMakeCurrent() failed";
|
||||||
}
|
}
|
||||||
|
|
||||||
eglDestroySurface(egl_dpy, surf);
|
eglDestroySurface(egl_dpy, surf);
|
||||||
|
@ -787,7 +787,7 @@ bool GetInfo_OpenGL(QTreeWidget *treeWidget)
|
||||||
|
|
||||||
dpy = XOpenDisplay(displayName);
|
dpy = XOpenDisplay(displayName);
|
||||||
if (!dpy) {
|
if (!dpy) {
|
||||||
// kDebug() << "Error: unable to open display " << displayName;
|
kWarning() << "unable to open display " << displayName;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue