qt: Hide stress test behind ENABLE_DEVELOPER_OPTIONS CMake option

This commit is contained in:
OpenSauce04 2025-10-21 15:47:52 +01:00
parent 60033de3dd
commit 1b7fd92d7d
4 changed files with 12 additions and 1 deletions

View file

@ -121,6 +121,8 @@ option(ENABLE_MICROPROFILE "Enables microprofile capabilities" OFF)
option(ENABLE_SSE42 "Enable SSE4.2 optimizations on x86_64" ON)
option(ENABLE_DEVELOPER_OPTIONS "Enable functionality targeted at emulator developers" OFF)
# Compile options
CMAKE_DEPENDENT_OPTION(COMPILE_WITH_DWARF "Add DWARF debugging information" ${IS_DEBUG_BUILD} "MINGW" OFF)
option(ENABLE_LTO "Enable link time optimization" ${DEFAULT_ENABLE_LTO})

View file

@ -174,6 +174,9 @@ endif()
if(ENABLE_VULKAN)
add_compile_definitions(ENABLE_VULKAN)
endif()
if(ENABLE_DEVELOPER_OPTIONS)
add_compile_definitions(ENABLE_DEVELOPER_OPTIONS)
endif()
add_subdirectory(common)
add_subdirectory(core)

View file

@ -980,8 +980,10 @@ void GMainWindow::ConnectWidgetEvents() {
connect(game_list, &GameList::ShowList, this, &GMainWindow::OnGameListShowList);
connect(game_list, &GameList::PopulatingCompleted, this,
[this] { multiplayer_state->UpdateGameList(game_list->GetModel()); });
#ifdef ENABLE_DEVELOPER_OPTIONS
connect(game_list, &GameList::StartingLaunchStressTest, this,
&GMainWindow::StartLaunchStressTest);
#endif
connect(game_list, &GameList::OpenPerGameGeneralRequested, this,
&GMainWindow::OnGameListOpenPerGameProperties);

View file

@ -644,8 +644,10 @@ void GameList::AddGamePopup(QMenu& context_menu, const QString& path, const QStr
shortcut_menu->addAction(tr("Add to Applications Menu"));
#endif
#ifdef ENABLE_DEVELOPER_OPTIONS
context_menu.addSeparator();
QAction* stress_test_launch = context_menu.addAction(tr("Stress Test: Launch (Debug)"));
QAction* stress_test_launch = context_menu.addAction(tr("Stress Test: App Launch"));
#endif
context_menu.addSeparator();
QAction* properties = context_menu.addAction(tr("Properties"));
@ -758,8 +760,10 @@ void GameList::AddGamePopup(QMenu& context_menu, const QString& path, const QStr
[this, path, program_id] { emit DumpRomFSRequested(path, program_id); });
connect(remove_play_time_data, &QAction::triggered,
[this, program_id]() { emit RemovePlayTimeRequested(program_id); });
#ifdef ENABLE_DEVELOPER_OPTIONS
connect(stress_test_launch, &QAction::triggered,
[this, path]() { emit StartingLaunchStressTest(path); });
#endif
connect(properties, &QAction::triggered, this,
[this, path]() { emit OpenPerGameGeneralRequested(path); });
connect(open_shader_cache_location, &QAction::triggered, this, [this, program_id] {