Files
XCEngine/new_editor/app/Platform/Win32/EditorWindowRuntimeInternal.cpp

25 lines
754 B
C++
Raw Normal View History

#include "Platform/Win32/EditorWindowRuntimeInternal.h"
#include <XCEditor/Foundation/UIEditorRuntimeTrace.h>
namespace XCEngine::UI::Editor::App::EditorWindowInternal {
bool ResolveVerboseRuntimeTraceEnabled() {
wchar_t buffer[8] = {};
const DWORD length = GetEnvironmentVariableW(
L"XCUIEDITOR_VERBOSE_TRACE",
buffer,
static_cast<DWORD>(std::size(buffer)));
return length > 0u && buffer[0] != L'0';
}
void LogRuntimeTrace(std::string_view channel, std::string_view message) {
AppendUIEditorRuntimeTrace(channel, message);
}
bool IsAutoCaptureOnStartupEnabled() {
return Support::IsEnvironmentFlagEnabled("XCUI_AUTO_CAPTURE_ON_STARTUP");
}
} // namespace XCEngine::UI::Editor::App::EditorWindowInternal