diff --git a/.gitignore b/.gitignore index 8e63a95530..ef9fc87281 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ subprojects/imgui-*/ subprojects/spdlog-*/ subprojects/nlohmann_json-*/ subprojects/implot-*/ +subprojects/cmocka/ #GNU Global Metadata **/GPATH diff --git a/src/gpu_fdinfo.cpp b/src/gpu_fdinfo.cpp index 1753d84837..0c304623f9 100644 --- a/src/gpu_fdinfo.cpp +++ b/src/gpu_fdinfo.cpp @@ -1,5 +1,8 @@ #include "gpu_fdinfo.h" + +#ifndef TEST_ONLY #include "hud_elements.h" +#endif namespace fs = ghc::filesystem; @@ -490,11 +493,13 @@ void GPU_fdinfo::main_thread() std::unique_lock lock(metrics_mutex); cond_var.wait(lock, [this]() { return !paused || stop_thread; }); +#ifndef TEST_ONLY if (HUDElements.g_gamescopePid > 0 && HUDElements.g_gamescopePid != pid) { pid = HUDElements.g_gamescopePid; find_fd(); } +#endif // Recheck fds every 10secs, fixes Mass Effect 1, maybe some others too {