From 4d139943f2407144d5f8e3dc5a673f24850d43d0 Mon Sep 17 00:00:00 2001 From: fearlessTobi Date: Sun, 16 Sep 2018 20:05:51 +0200 Subject: Port web_service from Citra --- src/yuzu_cmd/config.cpp | 8 ++++++++ src/yuzu_cmd/default_ini.h | 6 ++---- src/yuzu_cmd/yuzu.cpp | 3 +++ 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'src/yuzu_cmd') diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index a478b0a56..9d934e220 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -138,6 +138,14 @@ void Config::ReadValues() { Settings::values.use_gdbstub = sdl2_config->GetBoolean("Debugging", "use_gdbstub", false); Settings::values.gdbstub_port = static_cast(sdl2_config->GetInteger("Debugging", "gdbstub_port", 24689)); + + // Web Service + Settings::values.enable_telemetry = + sdl2_config->GetBoolean("WebService", "enable_telemetry", true); + Settings::values.web_api_url = + sdl2_config->Get("WebService", "web_api_url", "https://api.yuzu-emu.org"); + Settings::values.yuzu_username = sdl2_config->Get("WebService", "yuzu_username", ""); + Settings::values.yuzu_token = sdl2_config->Get("WebService", "yuzu_token", ""); } void Config::Reload() { diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index d35c441e9..eaa64da39 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h @@ -202,10 +202,8 @@ gdbstub_port=24689 # Whether or not to enable telemetry # 0: No, 1 (default): Yes enable_telemetry = -# Endpoint URL for submitting telemetry data -telemetry_endpoint_url = -# Endpoint URL to verify the username and token -verify_endpoint_url = +# URL for Web API +web_api_url = https://api.yuzu-emu.org # Username and token for yuzu Web Service # See https://services.citra-emu.org/ for more info yuzu_username = diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index b2559b717..1d951ca3f 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -10,6 +10,7 @@ #include #include "common/common_paths.h" +#include "common/detached_tasks.h" #include "common/file_util.h" #include "common/logging/backend.h" #include "common/logging/filter.h" @@ -78,6 +79,7 @@ static void InitializeLogging() { /// Application entry point int main(int argc, char** argv) { + Common::DetachedTasks detached_tasks; Config config; int option_index = 0; @@ -213,5 +215,6 @@ int main(int argc, char** argv) { system.RunLoop(); } + detached_tasks.WaitForAllTasks(); return 0; } -- cgit v1.2.3