summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/core/CMakeLists.txt5
-rw-r--r--src/core/telemetry_session.cpp10
3 files changed, 15 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f855a5195..e11940f59 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,4 +14,6 @@ endif()
14if (ENABLE_QT) 14if (ENABLE_QT)
15 add_subdirectory(citra_qt) 15 add_subdirectory(citra_qt)
16endif() 16endif()
17add_subdirectory(web_service) 17if (ENABLE_WEB_SERVICE)
18 add_subdirectory(web_service)
19endif()
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 72233877b..b80efe192 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -386,5 +386,8 @@ set(HEADERS
386 386
387create_directory_groups(${SRCS} ${HEADERS}) 387create_directory_groups(${SRCS} ${HEADERS})
388add_library(core STATIC ${SRCS} ${HEADERS}) 388add_library(core STATIC ${SRCS} ${HEADERS})
389target_link_libraries(core PUBLIC common PRIVATE audio_core video_core web_service) 389target_link_libraries(core PUBLIC common PRIVATE audio_core video_core)
390target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic fmt) 390target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic fmt)
391if (ENABLE_WEB_SERVICE)
392 target_link_libraries(core PUBLIC json-headers web_service)
393endif()
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp
index 1ba0a698d..70eff4340 100644
--- a/src/core/telemetry_session.cpp
+++ b/src/core/telemetry_session.cpp
@@ -6,13 +6,19 @@
6 6
7#include "common/scm_rev.h" 7#include "common/scm_rev.h"
8#include "core/telemetry_session.h" 8#include "core/telemetry_session.h"
9#include "web_services/telemetry_json.h" 9
10#ifdef ENABLE_WEB_SERVICE
11#include "web_service/telemetry_json.h"
12#endif
10 13
11namespace Core { 14namespace Core {
12 15
13TelemetrySession::TelemetrySession() { 16TelemetrySession::TelemetrySession() {
17#ifdef ENABLE_WEB_SERVICE
14 backend = std::make_unique<WebService::TelemetryJson>(); 18 backend = std::make_unique<WebService::TelemetryJson>();
15 19#else
20 backend = std::make_unique<Telemetry::NullVisitor>();
21#endif
16 // Log one-time session start information 22 // Log one-time session start information
17 const auto duration{std::chrono::steady_clock::now().time_since_epoch()}; 23 const auto duration{std::chrono::steady_clock::now().time_since_epoch()};
18 const auto start_time{std::chrono::duration_cast<std::chrono::microseconds>(duration).count()}; 24 const auto start_time{std::chrono::duration_cast<std::chrono::microseconds>(duration).count()};