aboutsummaryrefslogtreecommitdiff
path: root/launcher/net
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-09-05 17:45:17 +0200
committerGitHub <noreply@github.com>2022-09-05 17:45:17 +0200
commit8e3356f11a81cba394f57567e7521c3ccc2c3afa (patch)
tree12c44b9a4eeb96a63e433dd88b8eba5d6c45ac8b /launcher/net
parent2f167b1512dc0c3b80731ae412d55ee897da14fd (diff)
parentd82bb29919d1cc6a9ead4a4e4a18d7b02c5221eb (diff)
downloadPrismLauncher-8e3356f11a81cba394f57567e7521c3ccc2c3afa.tar.gz
PrismLauncher-8e3356f11a81cba394f57567e7521c3ccc2c3afa.tar.bz2
PrismLauncher-8e3356f11a81cba394f57567e7521c3ccc2c3afa.zip
Merge pull request #1034 from Scrumplex/detect-performance-features
Diffstat (limited to 'launcher/net')
-rw-r--r--launcher/net/Download.cpp2
-rw-r--r--launcher/net/Upload.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/launcher/net/Download.cpp b/launcher/net/Download.cpp
index 3778b939..fd3dbedc 100644
--- a/launcher/net/Download.cpp
+++ b/launcher/net/Download.cpp
@@ -118,7 +118,7 @@ void Download::executeTask()
}
request.setHeader(QNetworkRequest::UserAgentHeader, APPLICATION->getUserAgent().toUtf8());
- if (APPLICATION->currentCapabilities() & Application::SupportsFlame
+ if (APPLICATION->capabilities() & Application::SupportsFlame
&& request.url().host().contains("api.curseforge.com")) {
request.setRawHeader("x-api-key", APPLICATION->getFlameAPIKey().toUtf8());
};
diff --git a/launcher/net/Upload.cpp b/launcher/net/Upload.cpp
index cfda4b4e..f3b19022 100644
--- a/launcher/net/Upload.cpp
+++ b/launcher/net/Upload.cpp
@@ -216,7 +216,7 @@ namespace Net {
}
request.setHeader(QNetworkRequest::UserAgentHeader, APPLICATION->getUserAgent().toUtf8());
- if (APPLICATION->currentCapabilities() & Application::SupportsFlame
+ if (APPLICATION->capabilities() & Application::SupportsFlame
&& request.url().host().contains("api.curseforge.com")) {
request.setRawHeader("x-api-key", APPLICATION->getFlameAPIKey().toUtf8());
}