Skip to content

Commit

Permalink
fix HXCPP_TRACY_ZONE
Browse files Browse the repository at this point in the history
  • Loading branch information
dazKind committed Sep 12, 2024
1 parent 5075869 commit 37ba18e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/hx/TelemetryTracy.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@
#endif
#endif


#ifdef HXCPP_TRACY_INCLUDE_CALLSTACKS
#define HXCPP_TRACY_ZONE(name) \
::hx::strbuf TracyConcat(_hx_tracy_str_buffer, TracyLine); \
int TracyConcat(_hx_tracy_str_length, TracyLine); \
::tracy::ScopedZone TracyConcat(_hx_tracy_scoped_zone,TracyLine)(_hx_stackframe.lineNumber, _hx_stackframe.position->fileName, strlen(_hx_stackframe.position->fileName), _hx_stackframe.position->fullName, strlen(_hx_stackframe.position->fullName), name.utf8_str(&TracyConcat(_hx_tracy_str_buffer, TracyLine), &TracyConcat(_hx_tracy_str_length, TracyLine)), TracyConcat(_hx_tracy_str_length, TracyLine), _hx_stackframe.ctx->getDepth());
const char *TracyConcat(_hx_tracy_str_buffer_ptr, TracyLine) = name.utf8_str(&TracyConcat(_hx_tracy_str_buffer, TracyLine), false, &TracyConcat(_hx_tracy_str_length, TracyLine)); \
::tracy::ScopedZone TracyConcat(_hx_tracy_scoped_zone,TracyLine)(_hx_stackframe.lineNumber, _hx_stackframe.position->fileName, strlen(_hx_stackframe.position->fileName), _hx_stackframe.position->fullName, strlen(_hx_stackframe.position->fullName), TracyConcat(_hx_tracy_str_buffer_ptr, TracyLine), TracyConcat(_hx_tracy_str_length, TracyLine), _hx_stackframe.ctx->getDepth());
#else
#define HXCPP_TRACY_ZONE(name) \
::hx::strbuf TracyConcat(_hx_tracy_str_buffer, TracyLine); \
int TracyConcat(_hx_tracy_str_length, TracyLine); \
::tracy::ScopedZone TracyConcat(_hx_tracy_scoped_zone,TracyLine)(_hx_stackframe.lineNumber, _hx_stackframe.position->fileName, strlen(_hx_stackframe.position->fileName), _hx_stackframe.position->fullName, strlen(_hx_stackframe.position->fullName), name.utf8_str(&TracyConcat(_hx_tracy_str_buffer, TracyLine), &TracyConcat(_hx_tracy_str_length, TracyLine)), TracyConcat(_hx_tracy_str_length, TracyLine));
const char *TracyConcat(_hx_tracy_str_buffer_ptr, TracyLine) = name.utf8_str(&TracyConcat(_hx_tracy_str_buffer, TracyLine), false, &TracyConcat(_hx_tracy_str_length, TracyLine)); \
::tracy::ScopedZone TracyConcat(_hx_tracy_scoped_zone,TracyLine)(_hx_stackframe.lineNumber, _hx_stackframe.position->fileName, strlen(_hx_stackframe.position->fileName), _hx_stackframe.position->fullName, strlen(_hx_stackframe.position->fullName), TracyConcat(_hx_tracy_str_buffer_ptr, TracyLine), TracyConcat(_hx_tracy_str_length, TracyLine));
#endif

void __hxcpp_tracy_framemark();
Expand All @@ -39,4 +40,4 @@ void __hxcpp_tracy_message(::String msg, int color);
void __hxcpp_tracy_message_app_info(::String info);
void __hxcpp_tracy_set_thread_name_and_group(String name, int groupHint);

#endif
#endif

0 comments on commit 37ba18e

Please sign in to comment.