Skip to content

Commit

Permalink
[LUA] Unlock usage of 'source' functionality with tracy profiler. (#1778
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Neloreck authored Feb 6, 2025
1 parent 0257a16 commit 7c6eab4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Externals/tracy/public/tracy/TracyLua.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,11 @@ static tracy_force_inline void SendLuaCallstack( lua_State* L, uint32_t depth )

static inline void LuaShortenSrc( char* dst, const char* src )
{
size_t l = std::min( (size_t)255, strlen( src ) );
memcpy( dst, src, l );
// OpenXRay - remove '@' prefix from LuaJIT to allow directly working with file source with Tracy application.
const char* src_trimmed = src && *src == '@' ? src + 1 : src;

size_t l = std::min( (size_t)255, strlen( src_trimmed ) );
memcpy( dst, src_trimmed, l );
dst[l] = 0;
}

Expand Down

0 comments on commit 7c6eab4

Please sign in to comment.