diff options
author | bunnei <bunneidev@gmail.com> | 2017-07-13 03:31:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-13 03:31:12 +0200 |
commit | 9cf261ba8ba4fd9929d275cc793d48d13df624f3 (patch) | |
tree | 2eb47ab96bde081a84c5dd7c8107a21cb8a3511c /src/core | |
parent | Merge pull request #2815 from mailwl/bossp (diff) | |
parent | web_backend: Specify api-version on JSON post. (diff) | |
download | yuzu-9cf261ba8ba4fd9929d275cc793d48d13df624f3.tar yuzu-9cf261ba8ba4fd9929d275cc793d48d13df624f3.tar.gz yuzu-9cf261ba8ba4fd9929d275cc793d48d13df624f3.tar.bz2 yuzu-9cf261ba8ba4fd9929d275cc793d48d13df624f3.tar.lz yuzu-9cf261ba8ba4fd9929d275cc793d48d13df624f3.tar.xz yuzu-9cf261ba8ba4fd9929d275cc793d48d13df624f3.tar.zst yuzu-9cf261ba8ba4fd9929d275cc793d48d13df624f3.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/core/settings.h | 3 | ||||
-rw-r--r-- | src/core/telemetry_session.cpp | 10 |
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}) add_library(core STATIC ${SRCS} ${HEADERS}) target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic fmt) +if (ENABLE_WEB_SERVICE) + target_link_libraries(core PUBLIC json-headers web_service) +endif() 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 { // Debugging bool use_gdbstub; u16 gdbstub_port; + + // WebService + std::string telemetry_endpoint_url; } extern values; // 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 @@ #include "common/scm_rev.h" #include "core/telemetry_session.h" +#ifdef ENABLE_WEB_SERVICE +#include "web_service/telemetry_json.h" +#endif + namespace Core { TelemetrySession::TelemetrySession() { - // TODO(bunnei): Replace with a backend that logs to our web service +#ifdef ENABLE_WEB_SERVICE + backend = std::make_unique<WebService::TelemetryJson>(); +#else backend = std::make_unique<Telemetry::NullVisitor>(); - +#endif // Log one-time session start information const auto duration{std::chrono::steady_clock::now().time_since_epoch()}; const auto start_time{std::chrono::duration_cast<std::chrono::microseconds>(duration).count()}; |