mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-27 15:26:55 +00:00
Add frame market support, and enable on demand tracing.
This commit is contained in:
parent
2a5269c2a7
commit
52f5c24f96
|
@ -537,7 +537,7 @@ class Project extends HXProject {
|
||||||
setHaxedef("HXCPP_TELEMETRY"); // Enable telemetry
|
setHaxedef("HXCPP_TELEMETRY"); // Enable telemetry
|
||||||
setHaxedef("HXCPP_TRACY"); // Enable Tracy telemetry
|
setHaxedef("HXCPP_TRACY"); // Enable Tracy telemetry
|
||||||
setHaxedef("HXCPP_TRACY_MEMORY"); // Track memory allocations
|
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("HXCPP_TRACY_INCLUDE_CALLSTACKS"); // Inspect callstacks per zone, inflating telemetry data
|
||||||
|
|
||||||
setHaxedef("absolute-paths"); // Fix source locations so Tracy can see them
|
setHaxedef("absolute-paths"); // Fix source locations so Tracy can see them
|
||||||
|
|
|
@ -91,6 +91,14 @@ class WindowUtil
|
||||||
windowExit.dispatch(exitCode);
|
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) -> {
|
openfl.Lib.current.stage.addEventListener(openfl.events.KeyboardEvent.KEY_DOWN, (e:openfl.events.KeyboardEvent) -> {
|
||||||
for (key in PlayerSettings.player1.controls.getKeysForAction(WINDOW_FULLSCREEN))
|
for (key in PlayerSettings.player1.controls.getKeysForAction(WINDOW_FULLSCREEN))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue