Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorNicholas Rishel <rishel.nick@gmail.com>2021-06-23 03:30:10 +0300
committerNicholas Rishel <rishel.nick@gmail.com>2022-04-18 01:21:59 +0300
commitbf80dc2bd4ac9fab125982a08d616e248f329701 (patch)
tree1045ef4027b23beba2498f066c4a3942044e79e4 /source
parent213cd39b6db387bd88f12589fd50ff0e6563cf56 (diff)
Add debugging info for Wintab activated by argument `--debug-wintab`.
Bonus: Added docs for `--debug-ghost`. Differential Revision: https://developer.blender.org/D14610
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_global.h5
-rw-r--r--source/blender/windowmanager/intern/wm_window.c10
-rw-r--r--source/creator/creator_args.c14
m---------source/tools0
4 files changed, 25 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index d82e7460071..2070584a8a0 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -195,12 +195,13 @@ enum {
G_DEBUG_XR = (1 << 19), /* XR/OpenXR messages */
G_DEBUG_XR_TIME = (1 << 20), /* XR/OpenXR timing messages */
- G_DEBUG_GHOST = (1 << 21), /* Debug GHOST module. */
+ G_DEBUG_GHOST = (1 << 21), /* Debug GHOST module. */
+ G_DEBUG_WINTAB = (1 << 22), /* Debug Wintab. */
};
#define G_DEBUG_ALL \
(G_DEBUG | G_DEBUG_FFMPEG | G_DEBUG_PYTHON | G_DEBUG_EVENTS | G_DEBUG_WM | G_DEBUG_JOBS | \
- G_DEBUG_FREESTYLE | G_DEBUG_DEPSGRAPH | G_DEBUG_IO | G_DEBUG_GHOST)
+ G_DEBUG_FREESTYLE | G_DEBUG_DEPSGRAPH | G_DEBUG_IO | G_DEBUG_GHOST | G_DEBUG_WINTAB)
/** #Global.fileflags */
enum {
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 89bb6906a22..382a37e09e5 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1541,7 +1541,15 @@ void wm_ghost_init(bContext *C)
}
g_system = GHOST_CreateSystem();
- GHOST_SystemInitDebug(g_system, G.debug & G_DEBUG_GHOST);
+
+ GHOST_Debug debug = {0};
+ if (G.debug & G_DEBUG_GHOST) {
+ debug.flags |= GHOST_kDebugDefault;
+ }
+ if (G.debug & G_DEBUG_WINTAB) {
+ debug.flags |= GHOST_kDebugWintab;
+ }
+ GHOST_SystemInitDebug(g_system, debug);
if (C != NULL) {
GHOST_AddEventConsumer(g_system, consumer);
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index 05b7f1bcb85..b3f5d24ee8c 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -576,6 +576,7 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo
BLI_args_print_arg_doc(ba, "--debug-depsgraph-pretty");
BLI_args_print_arg_doc(ba, "--debug-depsgraph-uuid");
BLI_args_print_arg_doc(ba, "--debug-ghost");
+ BLI_args_print_arg_doc(ba, "--debug-wintab");
BLI_args_print_arg_doc(ba, "--debug-gpu");
BLI_args_print_arg_doc(ba, "--debug-gpu-force-workarounds");
BLI_args_print_arg_doc(ba, "--debug-wm");
@@ -943,6 +944,12 @@ static const char arg_handle_debug_mode_generic_set_doc_wm[] =
"\n\t"
"Enable debug messages for the window manager, shows all operators in search, shows "
"keymap errors.";
+static const char arg_handle_debug_mode_generic_set_doc_ghost[] =
+ "\n\t"
+ "Enable debug messages for Ghost (Linux only).";
+static const char arg_handle_debug_mode_generic_set_doc_wintab[] =
+ "\n\t"
+ "Enable debug messages for Wintab.";
# ifdef WITH_XR_OPENXR
static const char arg_handle_debug_mode_generic_set_doc_xr[] =
"\n\t"
@@ -2130,8 +2137,13 @@ void main_args_setup(bContext *C, bArgs *ba)
BLI_args_add(ba,
NULL,
"--debug-ghost",
- CB_EX(arg_handle_debug_mode_generic_set, handlers),
+ CB_EX(arg_handle_debug_mode_generic_set, ghost),
(void *)G_DEBUG_GHOST);
+ BLI_args_add(ba,
+ NULL,
+ "--debug-wintab",
+ CB_EX(arg_handle_debug_mode_generic_set, wintab),
+ (void *)G_DEBUG_WINTAB);
BLI_args_add(ba, NULL, "--debug-all", CB(arg_handle_debug_mode_all), NULL);
BLI_args_add(ba, NULL, "--debug-io", CB(arg_handle_debug_mode_io), NULL);
diff --git a/source/tools b/source/tools
-Subproject 1e658ca996f11e5ff3398d89bd81f5b719304a5
+Subproject 4c1e01e3e309282beb1af3b1eddb2c7f9a666b5