diff options
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r-- | source/creator/creator.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index c4da823381c..353fb6425c7 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -360,7 +360,7 @@ static int background_mode(int UNUSED(argc), const char **UNUSED(argv), void *UN static int debug_mode(int UNUSED(argc), const char **UNUSED(argv), void *data) { - G.f |= G_DEBUG; /* std output printf's */ + G.debug |= G_DEBUG; /* std output printf's */ printf(BLEND_VERSION_STRING_FMT); MEM_set_memory_debug(); @@ -372,19 +372,16 @@ static int debug_mode(int UNUSED(argc), const char **UNUSED(argv), void *data) return 0; } -#ifdef WITH_LIBMV -static int debug_mode_libmv(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) +static int debug_mode_generic(int UNUSED(argc), const char **UNUSED(argv), void *data) { - libmv_startDebugLogging(); - + G.debug |= GET_INT_FROM_POINTER(data); return 0; } -#endif -#ifdef WITH_FFMPEG -static int debug_mode_ffmpeg(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) +#ifdef WITH_LIBMV +static int debug_mode_libmv(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) { - G.f |= G_DEBUG_FFMPEG; + libmv_startDebugLogging(); return 0; } @@ -520,7 +517,7 @@ static int no_joystick(int UNUSED(argc), const char **UNUSED(argv), void *data) * failed joystick initialization delays over 5 seconds, before game engine start */ SYS_WriteCommandLineInt(*syshandle, "nojoystick", 1); - if (G.f & G_DEBUG) printf("disabling nojoystick\n"); + if (G.debug & G_DEBUG) printf("disabling nojoystick\n"); #endif return 0; @@ -1100,11 +1097,15 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) BLI_argsAdd(ba, 1, "-a", NULL, playback_doc, playback_mode, NULL); BLI_argsAdd(ba, 1, "-d", "--debug", debug_doc, debug_mode, ba); - BLI_argsAdd(ba, 1, NULL, "--debug-fpe", "\n\tEnable floating point exceptions", set_fpe, NULL); - #ifdef WITH_FFMPEG - BLI_argsAdd(ba, 1, NULL, "--debug-ffmpeg", "\n\tEnable debug messages from FFmpeg library", debug_mode_ffmpeg, NULL); + BLI_argsAdd(ba, 1, NULL, "--debug-ffmpeg", "\n\tEnable debug messages from FFmpeg library", debug_mode_generic, (void *)G_DEBUG_FFMPEG); #endif + BLI_argsAdd(ba, 1, NULL, "--debug-python", "\n\tEnable debug messages for python", debug_mode_generic, (void *)G_DEBUG_FFMPEG); + BLI_argsAdd(ba, 1, NULL, "--debug-events", "\n\tEnable debug messages for the event system", debug_mode_generic, (void *)G_DEBUG_EVENTS); + BLI_argsAdd(ba, 1, NULL, "--debug-wm", "\n\tEnable debug messages for the window manager", debug_mode_generic, (void *)G_DEBUG_WM); + BLI_argsAdd(ba, 1, NULL, "--debug-all", "\n\tEnable all debug messages (excludes libmv)", debug_mode_generic, (void *)G_DEBUG_ALL); + + BLI_argsAdd(ba, 1, NULL, "--debug-fpe", "\n\tEnable floating point exceptions", set_fpe, NULL); #ifdef WITH_LIBMV BLI_argsAdd(ba, 1, NULL, "--debug-libmv", "\n\tEnable debug messages from libmv library", debug_mode_libmv, NULL); |