1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-01-10 06:07:09 +00:00

Define for enabling/disabling log trace

This commit is contained in:
EliteMasterEric 2024-09-18 02:11:31 -04:00
parent 61d23b9985
commit 119148acf0
2 changed files with 9 additions and 1 deletions

View file

@ -157,6 +157,13 @@ class Project extends HXProject {
*/
static final FEATURE_DEBUG_TRACY:FeatureFlag = "FEATURE_DEBUG_TRACY";
/**
* `-DFEATURE_LOG_TRACE`
* If this flag is enabled, the game will print debug traces to the console.
* Disable to improve performance a bunch.
*/
static final FEATURE_LOG_TRACE:FeatureFlag = "FEATURE_LOG_TRACE";
/**
* `-DFEATURE_DISCORD_RPC`
* If this flag is enabled, the game will enable the Discord Remote Procedure Call library.
@ -461,6 +468,7 @@ class Project extends HXProject {
// Should be true on debug builds or if GITHUB_BUILD is enabled.
FEATURE_DEBUG_FUNCTIONS.apply(this, isDebug() || GITHUB_BUILD.isEnabled(this));
FEATURE_LOG_TRACE.apply(this, isDebug());
// Should default to true on workspace builds and false on release builds.
REDIRECT_ASSETS_FOLDER.apply(this, isDebug() && isDesktop());

View file

@ -6,7 +6,7 @@ class AnsiTrace
// but adds nice cute ANSI things
public static function trace(v:Dynamic, ?info:haxe.PosInfos)
{
#if TREMOVE
#if NO_FEATURE_LOG_TRACE
return;
#end
var str = formatOutput(v, info);