From d90f564d0c8d4bf52685db2ee83d49866592b116 Mon Sep 17 00:00:00 2001 From: EnzoDLofi Date: Thu, 12 Nov 2026 22:13:50 -0400 Subject: [PATCH] Fix screen effects profile upscaler handling --- .../com/droiddeck/launcher/SessionActivity.kt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt b/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt index a1f0618410..b271ad9c93 100644 --- a/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt +++ b/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt @@ -1376,10 +1376,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde val target = effectsEditorTarget ?: screenEffectsTarget val profileId = screenEffectsProfileIdForTarget(target) SessionPrefs.setScreenEffectsUpscaler(this@SessionActivity, profileId, m) - if (target == screenEffectsTarget && screenEffectsTargetAppliesToLiveOutput(target)) { + if (target == screenEffectsTarget) { upscaler = m - WaylandCompositor.nativeSetUpscaler(m) - WaylandCompositor.nativeSetLookName(ScreenEffectLooks.match(effects, m)?.name) + if (screenEffectsTargetAppliesToLiveOutput(target)) { + WaylandCompositor.nativeSetUpscaler(m) + WaylandCompositor.nativeSetLookName(ScreenEffectLooks.match(effects, m)?.name) + } } }, onUpscaleSharpness = { pct -> @@ -2497,9 +2499,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde .onFailure { Log.e(TAG, "Could not update game environment", it) } }, "game-env-publish").start() WaylandCompositor.nativeSetScaleMode(SCALE_FIT, ALIGN_CENTER) - WaylandCompositor.nativeSetUpscaler(SessionPrefs.upscaler(this)) + val activeProfileId = currentScreenEffectsProfileId() + val activeUpscaler = SessionPrefs.screenEffectsUpscaler(this, activeProfileId) + val activeEffects = SessionPrefs.screenEffects(this, activeProfileId) + WaylandCompositor.nativeSetUpscaler(activeUpscaler) WaylandCompositor.nativeSetUpscaleSharpness(SessionPrefs.upscaleSharpness(this)) - SessionPrefs.screenEffects(this, currentScreenEffectsProfileId()).push(SessionPrefs.upscaler(this)) + activeEffects.push(activeUpscaler) activeCardboard = effectiveCardboard(SessionPrefs.cardboard(this)) pushCardboard(activeCardboard) WaylandCompositor.nativeSetCardboardPoseFile(File(filesDir, ".wayland-rt/droiddeck-headpose").path) @@ -5237,12 +5242,13 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde readPrefs() observedScreenEffectsProfileId = SessionPrefs.activeScreenEffectsProfileId(this) val activeEffects = SessionPrefs.screenEffects(this, observedScreenEffectsProfileId) + val activeUpscaler = SessionPrefs.screenEffectsUpscaler(this, observedScreenEffectsProfileId) if (screenEffectsTarget == SCREEN_EFFECTS_TARGET_AUTO) { effects = activeEffects } else { effects = SessionPrefs.screenEffects(this, screenEffectsProfileIdForTarget(screenEffectsTarget)) } - if (CompositorHost.isStarted) activeEffects.push(upscaler) + if (CompositorHost.isStarted) activeEffects.push(activeUpscaler) refreshInputProfile() refreshControls() if (::pip.isInitialized) pip.resumed()