mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-14 19:25:16 -05:00
Add frame market support, and enable on demand tracing.
This commit is contained in:
parent
2a5269c2a7
commit
52f5c24f96
2 changed files with 9 additions and 1 deletions
|
@ -537,7 +537,7 @@ class Project extends HXProject {
|
|||
setHaxedef("HXCPP_TELEMETRY"); // Enable telemetry
|
||||
setHaxedef("HXCPP_TRACY"); // Enable Tracy telemetry
|
||||
setHaxedef("HXCPP_TRACY_MEMORY"); // Track memory allocations
|
||||
// setHaxedef("HXCPP_TRACY_ON_DEMAND"); // Only collect telemetry when Tracy is open and reachable
|
||||
setHaxedef("HXCPP_TRACY_ON_DEMAND"); // Only collect telemetry when Tracy is open and reachable
|
||||
// setHaxedef("HXCPP_TRACY_INCLUDE_CALLSTACKS"); // Inspect callstacks per zone, inflating telemetry data
|
||||
|
||||
setHaxedef("absolute-paths"); // Fix source locations so Tracy can see them
|
||||
|
|
|
@ -91,6 +91,14 @@ class WindowUtil
|
|||
windowExit.dispatch(exitCode);
|
||||
});
|
||||
|
||||
#if FEATURE_DEBUG_TRACY
|
||||
// Apply a marker to indicate frame end for the Tracy profiler.
|
||||
// Do this only if Tracy is configured to prevent lag.
|
||||
openfl.Lib.current.stage.addEventListener(openfl.events.Event.EXIT_FRAME, (e:openfl.events.Event) -> {
|
||||
cpp.vm.tracy.TracyProfiler.frameMark();
|
||||
});
|
||||
#end
|
||||
|
||||
openfl.Lib.current.stage.addEventListener(openfl.events.KeyboardEvent.KEY_DOWN, (e:openfl.events.KeyboardEvent) -> {
|
||||
for (key in PlayerSettings.player1.controls.getKeysForAction(WINDOW_FULLSCREEN))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue