mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
Feat:Add per-game frame generation profiles (#2473)
This commit is contained in:
1 parent
b1b6ab7931
commit
b52ce7e4c5
46 files changed
+598
-43
No files matched your search
@@ -3,6 +3,7 @@ package com.droiddeck.launcher.session
|
||||
import com.droiddeck.launcher.core.FexPreset
|
||||
import com.droiddeck.launcher.core.GameEnvironment
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import com.droiddeck.launcher.gpu.FrameGen
|
||||
|
||||
data class ProfileValue(val value: String, val inherited: Boolean)
|
||||
|
||||
@@ -17,6 +18,8 @@ data class SelectedGameProfile(
|
||||
val environmentOverrides: Int,
|
||||
val windowsComponentNames: List<String>,
|
||||
val startWithoutSteam: Boolean = false,
|
||||
val frameGen: FrameGen.Mode = FrameGen.Mode.OFF,
|
||||
val frameGenInherited: Boolean = true,
|
||||
) {
|
||||
val hasOverrides: Boolean
|
||||
get() = !fexPreset.inherited ||
|
||||
@@ -24,7 +27,8 @@ data class SelectedGameProfile(
|
||||
components.values.any { !it.inherited } ||
|
||||
environmentOverrides > 0 ||
|
||||
windowsComponentNames.isNotEmpty() ||
|
||||
startWithoutSteam
|
||||
startWithoutSteam ||
|
||||
!frameGenInherited
|
||||
|
||||
companion object {
|
||||
fun resolve(
|
||||
@@ -38,6 +42,8 @@ data class SelectedGameProfile(
|
||||
gameProtonId: String?,
|
||||
gameComponents: Map<String, String>,
|
||||
gameWindowsComponents: List<String>,
|
||||
frameGenMode: FrameGen.Mode = FrameGen.Mode.OFF,
|
||||
frameGenInherited: Boolean = true,
|
||||
): SelectedGameProfile? {
|
||||
val game = games.firstOrNull { it.profileKey == selectedAppId.toString() } ?: return null
|
||||
val fexOverride = GameEnvironment.gameFexPreset(environment, game.profileKey)
|
||||
@@ -68,6 +74,8 @@ data class SelectedGameProfile(
|
||||
environmentOverrides = otherEnvironment.size,
|
||||
windowsComponentNames = gameWindowsComponents.map(WinComponentNames::of),
|
||||
startWithoutSteam = GameEnvironment.gameNoSteam(environment, game.profileKey),
|
||||
frameGen = frameGenMode,
|
||||
frameGenInherited = frameGenInherited,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user