From 4a266dc920a21c2a3f16568dbc87f92e94fe0130 Mon Sep 17 00:00:00 2001 From: Shaolin Date: Fri, 3 Aug 2018 00:52:47 -0300 Subject: [PATCH] libobs-opengl: Improve X error handler message --- libobs-opengl/gl-x11.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libobs-opengl/gl-x11.c b/libobs-opengl/gl-x11.c index 2653cb150..4ea99d6aa 100644 --- a/libobs-opengl/gl-x11.c +++ b/libobs-opengl/gl-x11.c @@ -323,10 +323,16 @@ error: static int x_error_handler(Display *display, XErrorEvent *error) { - char str[512]; - XGetErrorText(display, error->error_code, str, sizeof(str)); + char str1[512]; + char str2[512]; + char str3[512]; + XGetErrorText(display, error->error_code, str1, sizeof(str1)); + XGetErrorText(display, error->request_code, str2, sizeof(str2)); + XGetErrorText(display, error->minor_code, str3, sizeof(str3)); - blog(LOG_ERROR, "X Error: %s", str); + blog(LOG_ERROR, "X Error: %s, Major opcode: %s, " + "Minor opcode: %s, Serial: %lu", + str1, str2, str3, error->serial); return 0; }