mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 14:26:00 +00:00
fix: keep PRoot out of the APK, VPN DNS first, bridge failure exits, HUD polling stays on
This commit is contained in:
1 parent
f05e0df39e
commit
34a1cbbead
11 files changed
+27
-44
No files matched your search
@@ -13,7 +13,6 @@ import android.widget.FrameLayout
|
||||
import com.droiddeck.launcher.gpu.FrameGen
|
||||
import com.droiddeck.launcher.gpu.GpuInfo
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.session.SessionDisplay
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
@@ -179,9 +178,10 @@ class DroidDeckHudHost(context: Context) {
|
||||
|
||||
private fun applyShown() {
|
||||
if (!running) return
|
||||
val show = !hidden && !backgrounded && SessionState.mode != SessionService.MODE_DESKTOP
|
||||
view?.visibility = if (show) View.VISIBLE else View.GONE
|
||||
showing = show
|
||||
val show = !hidden && !backgrounded
|
||||
val visible = show && SessionState.mode != SessionService.MODE_DESKTOP
|
||||
view?.visibility = if (visible) View.VISIBLE else View.GONE
|
||||
showing = visible
|
||||
if (show != polling) {
|
||||
polling = show
|
||||
if (show) Choreographer.getInstance().postFrameCallback(frameCallback)
|
||||
@@ -215,9 +215,7 @@ class DroidDeckHudHost(context: Context) {
|
||||
}.getOrNull()
|
||||
|
||||
private fun sessionResolution(): String {
|
||||
val panel = SessionDisplay.panelSize(context)
|
||||
val choice = SessionPrefs.resolutionChoice(context, SessionState.mode, panel)
|
||||
val (width, height) = SessionDisplay.resolveChoice(panel, choice)
|
||||
val (width, height) = SessionState.outputSize
|
||||
return "${width}x${height}"
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ internal class MangoReadings(private val sessionDir: File, private val rootDir:
|
||||
private fun externalCpuTemp(): Int? {
|
||||
val file = File(Environment.getExternalStorageDirectory(), "DroidDeck/cpu-temp")
|
||||
if (!file.isFile || System.currentTimeMillis() - file.lastModified() > CPU_TEMP_FRESH_MS) return null
|
||||
return readFloat(file)?.roundToInt()?.takeIf { it in -20..150 }
|
||||
return readFloat(file)?.takeIf { it.isFinite() && it in -20f..150f }?.roundToInt()
|
||||
}
|
||||
|
||||
fun gpuPercent(): Int? {
|
||||
|
||||
Reference in new issue
Block a user