Merge branch 'main' into upscaler-setting

This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-10-02 23:25:35 -04:00
commit a8f421c396
27 files changed
+1810 -200

No files matched your search

@@ -41,6 +41,7 @@ import com.droiddeck.launcher.gpu.Lossless
import com.droiddeck.launcher.gpu.TurnipDriver
import com.droiddeck.launcher.input.EvdevKeys
import com.droiddeck.launcher.input.KeyboardHost
import com.droiddeck.launcher.input.SessionClipboard
import com.droiddeck.launcher.input.OnScreenControls
import com.droiddeck.launcher.input.PadBridge
import com.droiddeck.launcher.input.PointerGestures
@@ -125,6 +126,11 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
}
private var onScreenControls: OnScreenControls? = null
private var keyboard: KeyboardHost? = null
private val sessionClipboard by lazy {
SessionClipboard(this) {
window.decorView.hasWindowFocus() || secondScreenPresentation?.window?.decorView?.hasWindowFocus() == true
}
}
private var watching = true
private lateinit var touchpad: TouchpadGestures
private var touchMode by mutableStateOf(SessionPrefs.TOUCH_AUTO)
@@ -1169,7 +1175,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
}
return true
}
val resumeKey = event.keyCode == KeyEvent.KEYCODE_BUTTON_A || event.keyCode == KeyEvent.KEYCODE_BUTTON_START
val resumeKey = event.keyCode == KeyEvent.KEYCODE_BUTTON_A || event.keyCode == KeyEvent.KEYCODE_BUTTON_START ||
event.keyCode == KeyEvent.KEYCODE_BUTTON_MODE || event.keyCode == KeyEvent.KEYCODE_HOME
val resumeKeyId = event.deviceId to event.keyCode
if (fromController && resumeKey && (SessionState.suspended || resumeKeyId in resumeKeysDown)) {
if (event.action == KeyEvent.ACTION_DOWN) {
@@ -1672,12 +1679,14 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
onScreenControls?.reload()
updateOnScreenControls()
resumed = true
sessionClipboard.start()
updatePadMotion()
readPrefs()
if (CompositorHost.isStarted) applyFrameGen()
}
override fun onPause() {
sessionClipboard.stop()
// Do not carry transient session UI across an app/display transition. In particular, the
// drawer's dim layer can otherwise remain over Steam when this activity returns.
drawerOpen = false
@@ -1702,7 +1711,15 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
override fun onWindowFocusChanged(hasFocus: Boolean) {
super.onWindowFocusChanged(hasFocus)
if (hasFocus) goFullscreen()
if (hasFocus) {
goFullscreen()
refreshClipboard()
}
}
/** The keyboard/trackpad presentation can own focus instead of the main display. */
fun refreshClipboard() {
if (resumed) sessionClipboard.refresh()
}
private fun goFullscreen() {