[APP] Allow profiler to be enabled via cmake option

- Hide profiler buttons if profiler is disabled
- From default it is disabled
This commit is contained in:
Gliniak
2026-05-04 19:53:37 +02:00
parent 9467c77f08
commit ec18a89da4
3 changed files with 12 additions and 5 deletions

View File

@@ -805,6 +805,7 @@ bool EmulatorWindow::Initialize() {
MenuItem::Type::kString, "Time Scalar *= 2", "Numpad +",
std::bind(&EmulatorWindow::CpuTimeScalarSetDouble, this)));
}
#if XE_OPTION_PROFILING
cpu_menu->AddChild(MenuItem::Create(MenuItem::Type::kSeparator));
{
cpu_menu->AddChild(MenuItem::Create(MenuItem::Type::kString,
@@ -814,6 +815,7 @@ bool EmulatorWindow::Initialize() {
"&Pause/Resume Profiler", "`",
[]() { Profiler::TogglePause(); }));
}
#endif
cpu_menu->AddChild(MenuItem::Create(MenuItem::Type::kSeparator));
{
cpu_menu->AddChild(MenuItem::Create(