mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-04 21:08:40 +00:00
added macro for sending notes to telemetry
This commit is contained in:
+13
-1
@@ -48,10 +48,21 @@
|
|||||||
static tm_uint64 file_id = 0; TM_API_PTR->_tmStaticString(&file_id, __FILE__); \
|
static tm_uint64 file_id = 0; TM_API_PTR->_tmStaticString(&file_id, __FILE__); \
|
||||||
Temp scratch = scratch_begin(0,0); \
|
Temp scratch = scratch_begin(0,0); \
|
||||||
String8 string = push_str8f(scratch.arena, __VA_ARGS__); \
|
String8 string = push_str8f(scratch.arena, __VA_ARGS__); \
|
||||||
tm_uint64 hash = TM_API_PTR->_tmPrintf("%.*s", str8_varg(string)); \
|
tm_uint64 hash = TM_API_PTR->_tmHash((char*)string.str, string.size); \
|
||||||
|
hash = TM_API_PTR->_tmSendDynamicString(hash, (char*)string.str); \
|
||||||
TM_API_PTR->_tmEnterZoneFast_Core(0, 0, file_id, __LINE__, hash); \
|
TM_API_PTR->_tmEnterZoneFast_Core(0, 0, file_id, __LINE__, hash); \
|
||||||
scratch_end(scratch); \
|
scratch_end(scratch); \
|
||||||
}
|
}
|
||||||
|
# define ProfNoteV(...) \
|
||||||
|
if (TM_API_PTR) { \
|
||||||
|
static tm_uint64 file_id = 0; TM_API_PTR->_tmStaticString(&file_id, __FILE__); \
|
||||||
|
Temp scratch = scratch_begin(0,0); \
|
||||||
|
String8 string = push_str8f(scratch.arena, __VA_ARGS__); \
|
||||||
|
tm_uint64 hash = TM_API_PTR->_tmHash((char*)string.str, string.size); \
|
||||||
|
hash = TM_API_PTR->_tmSendDynamicString(hash, (char*)string.str); \
|
||||||
|
TM_API_PTR->_tmMessageFast_Core(0, TMMF_ICON_NOTE, file_id, __LINE__, hash); \
|
||||||
|
scratch_end(scratch); \
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
@@ -73,6 +84,7 @@
|
|||||||
# define ProfLockDrop(...) (0)
|
# define ProfLockDrop(...) (0)
|
||||||
# define ProfColor(...) (0)
|
# define ProfColor(...) (0)
|
||||||
# define ProfBeginV(...) (0)
|
# define ProfBeginV(...) (0)
|
||||||
|
# define ProfNoteV(...) (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user