summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/CMakeLists.txt3
-rw-r--r--src/core/settings.h3
-rw-r--r--src/core/telemetry_session.cpp10
3 files changed, 14 insertions, 2 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index ea09819e5..b80efe192 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -388,3 +388,6 @@ create_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) 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/settings.h b/src/core/settings.h
index 03c64c94c..ee16bb90a 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -126,6 +126,9 @@ struct Values {
126 // Debugging 126 // Debugging
127 bool use_gdbstub; 127 bool use_gdbstub;
128 u16 gdbstub_port; 128 u16 gdbstub_port;
129
130 // WebService
131 std::string telemetry_endpoint_url;
129} extern values; 132} extern values;
130 133
131// a special value for Values::region_value indicating that citra will automatically select a region 134// a special value for Values::region_value indicating that citra will automatically select a region
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp
index ddc8b262e..70eff4340 100644
--- a/src/core/telemetry_session.cpp
+++ b/src/core/telemetry_session.cpp
@@ -7,12 +7,18 @@
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 9
10#ifdef ENABLE_WEB_SERVICE
11#include "web_service/telemetry_json.h"
12#endif
13
10namespace Core { 14namespace Core {
11 15
12TelemetrySession::TelemetrySession() { 16TelemetrySession::TelemetrySession() {
13 // TODO(bunnei): Replace with a backend that logs to our web service 17#ifdef ENABLE_WEB_SERVICE
18 backend = std::make_unique<WebService::TelemetryJson>();
19#else
14 backend = std::make_unique<Telemetry::NullVisitor>(); 20 backend = std::make_unique<Telemetry::NullVisitor>();
15 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()};