diff --git a/main/gbx/gbx_component.c b/main/gbx/gbx_component.c index d37d4304d..3ee0f24fd 100644 --- a/main/gbx/gbx_component.c +++ b/main/gbx/gbx_component.c @@ -59,7 +59,7 @@ //#define DEBUG_PRELOAD COMPONENT *COMPONENT_current = NULL; -COMPONENT *COMPONENT_main; +//COMPONENT *COMPONENT_main; int COMPONENT_count = 0; char *COMPONENT_path; diff --git a/main/gbx/gbx_component.h b/main/gbx/gbx_component.h index 9ba557d5f..73a948453 100644 --- a/main/gbx/gbx_component.h +++ b/main/gbx/gbx_component.h @@ -53,7 +53,7 @@ typedef EXTERN char *COMPONENT_path; EXTERN COMPONENT *COMPONENT_current; EXTERN int COMPONENT_count; -EXTERN COMPONENT *COMPONENT_main; +//EXTERN COMPONENT *COMPONENT_main; #endif void COMPONENT_init(void); diff --git a/main/gbx/gbx_debug.h b/main/gbx/gbx_debug.h index 1d2a3a388..37ef97517 100644 --- a/main/gbx/gbx_debug.h +++ b/main/gbx/gbx_debug.h @@ -78,11 +78,11 @@ void DEBUG_enter_eval(void); void DEBUG_leave_eval(void); #define PROFILE_ENTER_FUNCTION() \ - if (EXEC_profile && CP && CP->component == COMPONENT_main) \ + if (EXEC_profile && CP && CP->component == NULL) \ DEBUG.Profile.Begin(CP, FP); \ #define PROFILE_LEAVE_FUNCTION() \ - if (EXEC_profile && CP && CP->component == COMPONENT_main) \ + if (EXEC_profile && CP && CP->component == NULL) \ DEBUG.Profile.End(CP, FP); \ #endif diff --git a/main/gbx/gbx_exec_loop.c b/main/gbx/gbx_exec_loop.c index 32977609c..1ceb7df6c 100644 --- a/main/gbx/gbx_exec_loop.c +++ b/main/gbx/gbx_exec_loop.c @@ -4016,7 +4016,7 @@ static void _break(ushort code) //fprintf(stderr, "%s\n", DEBUG_get_current_position()); - if (CP && CP->component == COMPONENT_main) + if (CP && CP->component == NULL) { if (EXEC_profile_instr) DEBUG.Profile.Add(CP, FP, PC);