diff options
Diffstat (limited to '')
| -rw-r--r-- | src/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/core/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/core/telemetry_session.cpp | 10 |
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() | |||
| 14 | if (ENABLE_QT) | 14 | if (ENABLE_QT) |
| 15 | add_subdirectory(citra_qt) | 15 | add_subdirectory(citra_qt) |
| 16 | endif() | 16 | endif() |
| 17 | add_subdirectory(web_service) | 17 | if (ENABLE_WEB_SERVICE) |
| 18 | add_subdirectory(web_service) | ||
| 19 | endif() | ||
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 | ||
| 387 | create_directory_groups(${SRCS} ${HEADERS}) | 387 | create_directory_groups(${SRCS} ${HEADERS}) |
| 388 | add_library(core STATIC ${SRCS} ${HEADERS}) | 388 | add_library(core STATIC ${SRCS} ${HEADERS}) |
| 389 | target_link_libraries(core PUBLIC common PRIVATE audio_core video_core web_service) | 389 | target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) |
| 390 | target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic fmt) | 390 | target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic fmt) |
| 391 | if (ENABLE_WEB_SERVICE) | ||
| 392 | target_link_libraries(core PUBLIC json-headers web_service) | ||
| 393 | endif() | ||
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 | ||
| 11 | namespace Core { | 14 | namespace Core { |
| 12 | 15 | ||
| 13 | TelemetrySession::TelemetrySession() { | 16 | TelemetrySession::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()}; |