Enable web services on Android in Github build (#6555)
* Enable web services in android * Fix web services build on android * clang-format * Remove unnecessary line * Set telemetry to be disabled by default on all platforms
This commit is contained in:
parent
2281bf5b0b
commit
72b82ef6ed
@ -106,7 +106,6 @@ android {
|
|||||||
cmake {
|
cmake {
|
||||||
arguments "-DENABLE_QT=0", // Don't use QT
|
arguments "-DENABLE_QT=0", // Don't use QT
|
||||||
"-DENABLE_SDL2=0", // Don't use SDL
|
"-DENABLE_SDL2=0", // Don't use SDL
|
||||||
"-DENABLE_WEB_SERVICE=0", // Don't use telemetry
|
|
||||||
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
|
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
|
||||||
"-DBUNDLE_SPEEX=ON"
|
"-DBUNDLE_SPEEX=ON"
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ void Config::ReadValues() {
|
|||||||
|
|
||||||
// Web Service
|
// Web Service
|
||||||
NetSettings::values.enable_telemetry =
|
NetSettings::values.enable_telemetry =
|
||||||
sdl2_config->GetBoolean("WebService", "enable_telemetry", true);
|
sdl2_config->GetBoolean("WebService", "enable_telemetry", false);
|
||||||
NetSettings::values.web_api_url =
|
NetSettings::values.web_api_url =
|
||||||
sdl2_config->GetString("WebService", "web_api_url", "https://api.citra-emu.org");
|
sdl2_config->GetString("WebService", "web_api_url", "https://api.citra-emu.org");
|
||||||
NetSettings::values.citra_username = sdl2_config->GetString("WebService", "citra_username", "");
|
NetSettings::values.citra_username = sdl2_config->GetString("WebService", "citra_username", "");
|
||||||
|
@ -334,7 +334,7 @@ gdbstub_port=24689
|
|||||||
|
|
||||||
[WebService]
|
[WebService]
|
||||||
# Whether or not to enable telemetry
|
# Whether or not to enable telemetry
|
||||||
# 0: No, 1 (default): Yes
|
# 0 (default): No, 1: Yes
|
||||||
enable_telemetry =
|
enable_telemetry =
|
||||||
# URL for Web API
|
# URL for Web API
|
||||||
web_api_url = https://api.citra-emu.org
|
web_api_url = https://api.citra-emu.org
|
||||||
|
@ -313,7 +313,7 @@ void Config::ReadValues() {
|
|||||||
|
|
||||||
// Web Service
|
// Web Service
|
||||||
NetSettings::values.enable_telemetry =
|
NetSettings::values.enable_telemetry =
|
||||||
sdl2_config->GetBoolean("WebService", "enable_telemetry", true);
|
sdl2_config->GetBoolean("WebService", "enable_telemetry", false);
|
||||||
NetSettings::values.web_api_url =
|
NetSettings::values.web_api_url =
|
||||||
sdl2_config->GetString("WebService", "web_api_url", "https://api.citra-emu.org");
|
sdl2_config->GetString("WebService", "web_api_url", "https://api.citra-emu.org");
|
||||||
NetSettings::values.citra_username = sdl2_config->GetString("WebService", "citra_username", "");
|
NetSettings::values.citra_username = sdl2_config->GetString("WebService", "citra_username", "");
|
||||||
|
@ -349,7 +349,7 @@ renderer_debug =
|
|||||||
|
|
||||||
[WebService]
|
[WebService]
|
||||||
# Whether or not to enable telemetry
|
# Whether or not to enable telemetry
|
||||||
# 0: No, 1 (default): Yes
|
# 0 (default): No, 1: Yes
|
||||||
enable_telemetry =
|
enable_telemetry =
|
||||||
# URL for Web API
|
# URL for Web API
|
||||||
web_api_url = https://api.citra-emu.org
|
web_api_url = https://api.citra-emu.org
|
||||||
|
@ -803,7 +803,7 @@ void Config::ReadWebServiceValues() {
|
|||||||
qt_config->beginGroup(QStringLiteral("WebService"));
|
qt_config->beginGroup(QStringLiteral("WebService"));
|
||||||
|
|
||||||
NetSettings::values.enable_telemetry =
|
NetSettings::values.enable_telemetry =
|
||||||
ReadSetting(QStringLiteral("enable_telemetry"), true).toBool();
|
ReadSetting(QStringLiteral("enable_telemetry"), false).toBool();
|
||||||
NetSettings::values.web_api_url =
|
NetSettings::values.web_api_url =
|
||||||
ReadSetting(QStringLiteral("web_api_url"), QStringLiteral("https://api.citra-emu.org"))
|
ReadSetting(QStringLiteral("web_api_url"), QStringLiteral("https://api.citra-emu.org"))
|
||||||
.toString()
|
.toString()
|
||||||
|
@ -145,8 +145,8 @@ void GMainWindow::ShowTelemetryCallout() {
|
|||||||
tr("<a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous "
|
tr("<a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous "
|
||||||
"data is collected</a> to help improve Citra. "
|
"data is collected</a> to help improve Citra. "
|
||||||
"<br/><br/>Would you like to share your usage data with us?");
|
"<br/><br/>Would you like to share your usage data with us?");
|
||||||
if (QMessageBox::question(this, tr("Telemetry"), telemetry_message) != QMessageBox::Yes) {
|
if (QMessageBox::question(this, tr("Telemetry"), telemetry_message) == QMessageBox::Yes) {
|
||||||
NetSettings::values.enable_telemetry = false;
|
NetSettings::values.enable_telemetry = true;
|
||||||
Settings::Apply();
|
Settings::Apply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,8 @@ std::optional<std::vector<u8>> Download(const std::string& path) {
|
|||||||
httplib::Request request{
|
httplib::Request request{
|
||||||
.method = "GET",
|
.method = "GET",
|
||||||
.path = path,
|
.path = path,
|
||||||
|
// Needed when httplib is included on android
|
||||||
|
.matches = httplib::Match(),
|
||||||
};
|
};
|
||||||
|
|
||||||
client->set_follow_location(true);
|
client->set_follow_location(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user