Correctly report if tracing is enabled

This commit is contained in:
Patrick Nicolas
2026-07-14 20:15:53 +02:00
parent 82b6ebc7a7
commit eed9e052fc
+3 -1
View File
@@ -53,6 +53,7 @@ namespace wivrn::trace
namespace namespace
{ {
bool initialized = false; bool initialized = false;
bool enabled = false;
::vk_bundle * calibration = nullptr; ::vk_bundle * calibration = nullptr;
perfetto::Track g_encoder_track(1); perfetto::Track g_encoder_track(1);
@@ -266,6 +267,7 @@ void init()
U_LOG_D("wivrn::trace: WIVRN_TRACING not set, perfetto tracing disabled"); U_LOG_D("wivrn::trace: WIVRN_TRACING not set, perfetto tracing disabled");
return; return;
} }
enabled = true;
const bool use_system = mode == tracing_mode::system or mode == tracing_mode::both; const bool use_system = mode == tracing_mode::system or mode == tracing_mode::both;
const bool use_inprocess = mode == tracing_mode::inprocess or mode == tracing_mode::both; const bool use_inprocess = mode == tracing_mode::inprocess or mode == tracing_mode::both;
@@ -321,7 +323,7 @@ void shutdown()
bool is_enabled() bool is_enabled()
{ {
return initialized; return enabled;
} }
void set_calibration_source(::vk_bundle * monado_vk) void set_calibration_source(::vk_bundle * monado_vk)