mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 04:46:08 +00:00
Fix screen effects upscaler profile inheritance
This commit is contained in:
1 parent
aabd7b9e93
commit
dcb16dd2b0
2 files changed
+30
-3
No files matched your search
@@ -1424,9 +1424,18 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
SessionPrefs.setScreenEffectsUpscaler(this@SessionActivity, profileId, m)
|
||||
if (target == screenEffectsTarget) {
|
||||
upscaler = m
|
||||
if (screenEffectsTargetAppliesToLiveOutput(target)) {
|
||||
WaylandCompositor.nativeSetUpscaler(m)
|
||||
WaylandCompositor.nativeSetLookName(ScreenEffectLooks.match(effects, m)?.name)
|
||||
if (screenEffectsUpscalerTargetAppliesToLiveOutput(target)) {
|
||||
val liveProfileId =
|
||||
SessionPrefs.activeScreenEffectsProfileId(this@SessionActivity)
|
||||
val liveUpscaler =
|
||||
SessionPrefs.screenEffectsUpscaler(this@SessionActivity, liveProfileId)
|
||||
val liveEffects =
|
||||
SessionPrefs.screenEffects(this@SessionActivity, liveProfileId)
|
||||
WaylandCompositor.nativeSetUpscaler(liveUpscaler)
|
||||
WaylandCompositor.nativeSetLookName(
|
||||
ScreenEffectLooks.match(liveEffects, liveUpscaler)?.name
|
||||
)
|
||||
liveEffects.push(liveUpscaler)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2146,6 +2155,16 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
}
|
||||
}
|
||||
|
||||
private fun screenEffectsUpscalerTargetAppliesToLiveOutput(target: String): Boolean {
|
||||
if (target == SCREEN_EFFECTS_TARGET_AUTO) return true
|
||||
val selectedProfileId = screenEffectsProfileIdForTarget(target)
|
||||
val activeProfileId = currentScreenEffectsProfileId()
|
||||
if (selectedProfileId == activeProfileId) return true
|
||||
return selectedProfileId == null &&
|
||||
(activeProfileId == null ||
|
||||
!SessionPrefs.hasScreenEffectsUpscalerOverride(this, activeProfileId))
|
||||
}
|
||||
|
||||
private fun screenEffectsTargetAppliesToLiveOutput(target: String): Boolean {
|
||||
if (target == SCREEN_EFFECTS_TARGET_AUTO) return true
|
||||
val selectedProfileId = screenEffectsProfileIdForTarget(target)
|
||||
|
||||
Reference in new issue
Block a user