Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ dependencies {
// JavaSteam
val localBuild = false // Change to 'true' needed when building JavaSteam manually
if (localBuild) {
implementation(files("../../JavaSteam/build/libs/javasteam-1.8.0-6-SNAPSHOT.jar"))
implementation(files("../../JavaSteam/javasteam-depotdownloader/build/libs/javasteam-depotdownloader-1.8.0-6-SNAPSHOT.jar"))
implementation(files("../../JavaSteam/build/libs/javasteam-1.8.0-10-SNAPSHOT.jar"))
implementation(files("../../JavaSteam/javasteam-depotdownloader/build/libs/javasteam-depotdownloader-1.8.0-10-SNAPSHOT.jar"))
implementation(libs.bundles.javasteam.dev)
} else {
implementation(libs.javasteam) {
Expand Down
21 changes: 9 additions & 12 deletions app/src/main/java/app/gamenative/service/SteamService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1445,32 +1445,30 @@ class SteamService : Service(), IChallengeUrlChanged {

when (PrefManager.downloadSpeed) {
8 -> {
downloadRatio = 0.3
decompressRatio = 0.3
downloadRatio = 0.6
decompressRatio = 0.2
}
16 -> {
downloadRatio = 0.5
decompressRatio = 0.5
downloadRatio = 1.2
decompressRatio = 0.4
}
24 -> {
downloadRatio = 0.8
decompressRatio = 0.8
downloadRatio = 1.5
decompressRatio = 0.5
}
32 -> {
downloadRatio = 1.0
decompressRatio = 1.0
downloadRatio = 2.4
decompressRatio = 0.8
}
}

val cpuCores = Runtime.getRuntime().availableProcessors()
val maxDownloads = (cpuCores * downloadRatio).toInt().coerceAtLeast(1)
val maxDecompress = (cpuCores * decompressRatio).toInt().coerceAtLeast(1)
val maxFileWrites = 1

Timber.i("CPU Cores: $cpuCores,")
Timber.i("CPU Cores: $cpuCores")
Timber.i("maxDownloads: $maxDownloads")
Timber.i("maxDecompress: $maxDecompress")
Timber.i("maxFileWrites: $maxFileWrites")

// Create DepotDownloader instance
val depotDownloader = DepotDownloader(
Expand All @@ -1480,7 +1478,6 @@ class SteamService : Service(), IChallengeUrlChanged {
androidEmulation = true,
maxDownloads = maxDownloads,
maxDecompress = maxDecompress,
maxFileWrites = maxFileWrites,
parentJob = coroutineContext[Job],
autoStartDownload = false,
)
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dataStore = "1.1.2" # https://mvnrepository.com/artifact/androidx.datastore/data
espressoCore = "3.6.1" # https://mvnrepository.com/artifact/androidx.test.espresso/espresso-core
feature-delivery = "2.1.0" # https://mvnrepository.com/artifact/com.google.android.play/feature-delivery
hiltNavigationCompose = "1.2.0" # https://mvnrepository.com/artifact/androidx.hilt/hilt-navigation-compose
javasteam = "1.8.0-6-SNAPSHOT" # https://mvnrepository.com/artifact/in.dragonbra/javasteam
javasteam = "1.8.0-10-SNAPSHOT" # https://mvnrepository.com/artifact/in.dragonbra/javasteam
json = "1.8.0" # https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-serialization-json
junit = "4.13.2" # https://mvnrepository.com/artifact/junit/junit
junitVersion = "1.2.1" # https://mvnrepository.com/artifact/androidx.test.ext/junit
Expand Down