mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 12:35:42 +00:00
Keep the last frame visible on manual pause (#3626)
Use the effective zero-copy profile to capture and restore presentation across manual pause and resume, without overriding a disabled preference.
This commit is contained in:
1 parent
eeb10e02fd
commit
f9eeef44ed
3 files changed
+39
-3
No files matched your search
@@ -6281,7 +6281,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
val back = {
|
||||
if (restore.compareAndSet(false, true)) {
|
||||
pauseCaptures--
|
||||
if (!isDestroyed) WaylandCompositor.nativeSetZeroCopy(composedOutputFree())
|
||||
if (!isDestroyed && zeroCopyActive()) WaylandCompositor.nativeSetZeroCopy(composedOutputFree())
|
||||
}
|
||||
}
|
||||
uiHandler.postDelayed({ capturePausedFrame(manual = true, onDone = back) }, ZERO_COPY_SETTLE_MS)
|
||||
|
||||
@@ -1874,10 +1874,10 @@ object SessionPrefs {
|
||||
prefs(context).edit().putBoolean(hdrKey(mode), on).apply()
|
||||
}
|
||||
|
||||
fun zeroCopy(context: Context, mode: String): Boolean = prefs(context).getBoolean("zeroCopy.$mode", true)
|
||||
fun zeroCopy(context: Context, mode: String): Boolean = prefs(context).getBoolean("zeroCopy.${prefMode(mode)}", true)
|
||||
|
||||
fun setZeroCopy(context: Context, mode: String, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("zeroCopy.$mode", on).apply()
|
||||
prefs(context).edit().putBoolean("zeroCopy.${prefMode(mode)}", on).apply()
|
||||
}
|
||||
|
||||
const val FPS_UNPACED = -1
|
||||
|
||||
Reference in new issue
Block a user