aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/flame/FileResolvingTask.cpp
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-08-26 22:26:01 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-08-26 22:26:01 +0300
commit288d0d1fd4562e4020c964955918a5681b547705 (patch)
tree318cebd7be802fd1f32edf045d5f6695d1085416 /launcher/modplatform/flame/FileResolvingTask.cpp
parentabfd1a42053eb6393394fee1ac23a2b608499d47 (diff)
downloadPrismLauncher-288d0d1fd4562e4020c964955918a5681b547705.tar.gz
PrismLauncher-288d0d1fd4562e4020c964955918a5681b547705.tar.bz2
PrismLauncher-288d0d1fd4562e4020c964955918a5681b547705.zip
Added back api loader filtering if just one is selected
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/modplatform/flame/FileResolvingTask.cpp')
-rw-r--r--launcher/modplatform/flame/FileResolvingTask.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/launcher/modplatform/flame/FileResolvingTask.cpp b/launcher/modplatform/flame/FileResolvingTask.cpp
index 6fc3a21c..5865bee9 100644
--- a/launcher/modplatform/flame/FileResolvingTask.cpp
+++ b/launcher/modplatform/flame/FileResolvingTask.cpp
@@ -135,11 +135,6 @@ void Flame::FileResolvingTask::netJobFinished()
m_checkJob->start();
}
-constexpr bool has_single_bit(int x) noexcept
-{
- return x && !(x & (x - 1));
-}
-
void Flame::FileResolvingTask::modrinthCheckFinished()
{
setProgress(2, 3);
@@ -159,7 +154,7 @@ void Flame::FileResolvingTask::modrinthCheckFinished()
// If there's more than one mod loader for this version, we can't know for sure
// which file is relative to each loader, so it's best to not use any one and
// let the user download it manually.
- if (!file.loaders || has_single_bit(file.loaders)) {
+ if (!file.loaders || hasSingleModLoaderSelected(file.loaders)) {
out->url = file.downloadUrl;
qDebug() << "Found alternative on modrinth " << out->fileName;
} else {