GHOST: Only spam about X11 errors when using --debug-ghost

This commit adds a new command line argument --debug-ghost and
makes it so X11 errors happening during context initialization
are only printed when this new flag is sued.

There is no need to flood users with errors when their GPU is
not supporting latest OpenGL version. Or, at a very minimum,
the error must be more meaning full.

Differential Revision: https://developer.blender.org/D6057
This commit is contained in:
Sergey Sharybin
2019-10-14 12:44:41 +02:00
parent dc8be23234
commit 8d4460b6c4
9 changed files with 75 additions and 2 deletions

View File

@@ -2079,6 +2079,12 @@ void main_args_setup(bContext *C, bArgs *ba)
(void *)G_DEBUG_HANDLERS);
BLI_argsAdd(
ba, 1, NULL, "--debug-wm", CB_EX(arg_handle_debug_mode_generic_set, wm), (void *)G_DEBUG_WM);
BLI_argsAdd(ba,
1,
NULL,
"--debug-ghost",
CB_EX(arg_handle_debug_mode_generic_set, handlers),
(void *)G_DEBUG_GHOST);
BLI_argsAdd(ba, 1, NULL, "--debug-all", CB(arg_handle_debug_mode_all), NULL);
BLI_argsAdd(ba, 1, NULL, "--debug-io", CB(arg_handle_debug_mode_io), NULL);