Compare commits

..
Author SHA1 Message Date
The412Banner 12cf0b2884 fix(components): bundled .NET Core runtime installers map to their runtime, not .NET Framework 4.8
A game's install script that runs windowsdesktop-runtime-3.1.x was mapped to dotnet48, because the
.NET detector only knew desktop runtimes 6-8 and fell back to the Framework. Steam's own run of that
installer is marked done, so the game's .NET Core launcher never found its runtime. Map
windowsdesktop-runtime/dotnet-runtime 3, 5, 6, 7 and 8 to their components, leave unknown ones
unmapped, stop Framework paths such as 4.7.2 or 4.6.2 matching desktop runtime 7 or 6, and rescan
games' findings.
2026-12-05 20:55:46 +00:00
157 changed files with 306 additions and 25748 deletions

No files matched your search

-3
View File
@@ -325,9 +325,6 @@ jobs:
- name: Build the DiRT 3 / DiRT Showdown ws2_32 stand-in
run: python3 tools/components/prepare.py dirt-ws2
- name: Build the DLSS / FSR / XeSS upscale bridges
run: python3 tools/components/prepare.py upscale-bridges
- name: Cache graphics driver inputs
uses: actions/cache@v4
with:
+1 -1
View File
@@ -55,7 +55,7 @@ jobs:
jq -r --arg n "$2" '.assets // [] | .[] | select(.name == $n) | .digest // empty'
}
commit=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$BUILD_RUN" --jq .head_sha 2>/dev/null || echo "$GITHUB_SHA")
for name in proot directaudio tracking xbox comet butler powervr ubisoft rockstar dirt epic upscale; do
for name in proot directaudio tracking xbox comet butler powervr ubisoft rockstar dirt epic; do
file="packs/$name.tar.zst"
[ -f "$file" ] || { echo "::error::$name.tar.zst is missing from Build APK run $BUILD_RUN"; exit 1; }
sha=$(sha256sum "$file" | cut -d' ' -f1)
-7
View File
@@ -157,13 +157,6 @@ DroidDeck is [GPL-3.0](LICENSE). Steam and Proton belong to Valve Corporation. V
</details>
<details>
<summary><b>Setup and tools</b></summary>
- The wireless debugging pairing keypad was inspired by Ryan Retro’s Handheld Toolkit.
</details>
## Star history
<a href="https://www.star-history.com/#Droid-Deck/DroidDeck&Date">
+2 -2
View File
@@ -95,7 +95,7 @@ def trackingPack = rootProject.file('tools/packs/tracking/release.env').readLine
def prootPackPin = rootProject.file('tools/packs/proot/release.env').readLines()
.findAll { it.contains('=') && !it.startsWith('#') }
.collectEntries { def kv = it.split('=', 2); [(kv[0].trim()): kv[1].trim()] }
def addonPacks = ['proot', 'directaudio', 'tracking', 'xbox', 'comet', 'butler', 'powervr', 'ubisoft', 'rockstar', 'dirt', 'epic', 'upscale'].collectEntries { name ->
def addonPacks = ['proot', 'directaudio', 'tracking', 'xbox', 'comet', 'butler', 'powervr', 'ubisoft', 'rockstar', 'dirt', 'epic'].collectEntries { name ->
def pack = file("build/packs/${name}.tar.zst")
if (!pack.isFile()) {
if (ciBuild && !unitTestsOnly) throw new GradleException("Add-on pack ${pack} is missing: run tools/packs/build.sh app/build/packs")
@@ -207,7 +207,7 @@ android {
}
androidResources {
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~:<dir>droiddeck-xbox:<dir>droiddeck-comet:<dir>droiddeck-ubisoft:<dir>droiddeck-rockstar:<dir>droiddeck-dirt:<dir>droiddeck-epic:<dir>droiddeck-upscale:<dir>directaudio:<dir>hybris'
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~:<dir>droiddeck-xbox:<dir>droiddeck-comet:<dir>droiddeck-ubisoft:<dir>droiddeck-rockstar:<dir>droiddeck-dirt:<dir>droiddeck-epic:<dir>directaudio:<dir>hybris'
}
packagingOptions {
-1
View File
@@ -41,7 +41,6 @@ message(STATUS "dd-fg chain: win-fg ${DDFG_UPSTREAM} (src ${DDFG_CHAIN_HASH})")
add_subdirectory(waylandcomp)
add_subdirectory(questxr)
add_subdirectory(../../../../tools/upscale/layer upscale_layer)
add_library(sdnative SHARED sdnative/sdnative.c)
target_link_libraries(sdnative log)
@@ -52,7 +52,6 @@ import com.droiddeck.launcher.ui.ComponentsPage
import com.droiddeck.launcher.session.GameSaves
import com.droiddeck.launcher.session.SessionLogShare
import com.droiddeck.launcher.session.SessionPaths
import com.droiddeck.launcher.session.FullscreenMode
import com.droiddeck.launcher.session.SessionPrefs
import com.droiddeck.launcher.session.SteamRepair
import com.droiddeck.launcher.session.LaunchCoordinator
@@ -209,8 +208,7 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
private var orientation by mutableStateOf(android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE)
private var launcherOrientation by mutableStateOf(android.content.pm.ActivityInfo.SCREEN_ORIENTATION_USER)
private var homePage by mutableStateOf(com.droiddeck.launcher.core.AppUiPrefs.HOME_PAGE_STEAM)
private var launcherFullscreenMode by mutableStateOf(FullscreenMode.ALWAYS)
private var sessionFullscreenMode by mutableStateOf(FullscreenMode.ALWAYS)
private var launcherFullscreen by mutableStateOf(true)
private var launcherFrost by mutableStateOf(false)
private var frostWallpaper by mutableStateOf(true)
private var frostCards by mutableStateOf(true)
@@ -1368,12 +1366,8 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
orientation = SessionPrefs.orientation(this)
launcherOrientation = com.droiddeck.launcher.core.AppUiPrefs.orientation(this)
requestedOrientation = launcherOrientation
launcherFullscreenMode = SessionPrefs.launcherFullscreenMode(this)
sessionFullscreenMode = SessionPrefs.sessionFullscreenMode(this)
applyLauncherFullscreen()
homePage = com.droiddeck.launcher.core.AppUiPrefs.homePage(this)
launcherFullscreenMode = SessionPrefs.launcherFullscreenMode(this)
sessionFullscreenMode = SessionPrefs.sessionFullscreenMode(this)
launcherFullscreen = SessionPrefs.launcherFullscreen(this)
launcherFrost = SessionPrefs.launcherFrost(this)
frostWallpaper = SessionPrefs.frostWallpaper(this)
frostCards = SessionPrefs.frostCards(this)
@@ -1488,8 +1482,7 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
orientation = orientation,
launcherOrientation = launcherOrientation,
homePage = homePage,
launcherFullscreenMode = launcherFullscreenMode,
sessionFullscreenMode = sessionFullscreenMode,
launcherFullscreen = launcherFullscreen,
launcherFrost = launcherFrost,
frostWallpaper = frostWallpaper,
frostCards = frostCards,
@@ -1765,14 +1758,13 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
}
}, "delete-session-logs").start()
},
onClearLogs = { done ->
onClearLogs = {
Thread({
val cleared = runCatching { SessionArtifacts.clearAll(this) }.getOrDefault(0)
ui.post {
android.widget.Toast.makeText(this,
if (cleared == 0) getString(R.string.main_no_logs_to_clear) else resources.getQuantityString(R.plurals.main_logs_cleared, cleared, cleared),
android.widget.Toast.LENGTH_SHORT).show()
done()
}
}, "clear-logs").start()
},
@@ -1824,15 +1816,11 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
homePage = value
},
onControllerHaptics = { on -> SessionPrefs.setControllerHaptics(this, on); controllerHaptics = on },
onLauncherFullscreenMode = { mode ->
SessionPrefs.setLauncherFullscreenMode(this, mode)
launcherFullscreenMode = mode
onLauncherFullscreen = { on ->
SessionPrefs.setLauncherFullscreen(this, on)
launcherFullscreen = on
applyLauncherFullscreen()
},
onSessionFullscreenMode = { mode ->
SessionPrefs.setSessionFullscreenMode(this, mode)
sessionFullscreenMode = mode
},
onLauncherFrost = { on ->
SessionPrefs.setLauncherFrost(this, on)
launcherFrost = on
@@ -2164,13 +2152,7 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
private fun frostShown(): Boolean =
launcherFrost && frostWallpaper && frost.prepared && frost.available && theme != com.droiddeck.launcher.ui.Themes.TRUE_BLACK
override fun onConfigurationChanged(newConfig: android.content.res.Configuration) {
super.onConfigurationChanged(newConfig)
applyLauncherFullscreen(newConfig)
}
private fun applyLauncherFullscreen(config: android.content.res.Configuration = resources.configuration) {
val launcherFullscreen = launcherFullscreenMode.hidesSystemBars(config.orientation)
private fun applyLauncherFullscreen() {
@Suppress("DEPRECATION")
window.decorView.systemUiVisibility = if (launcherFullscreen) {
(View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
@@ -128,7 +128,6 @@ import com.droiddeck.launcher.session.GpuClockPin
import com.droiddeck.launcher.session.GameProfileFollowState
import com.droiddeck.launcher.session.GameProfileInventoryCache
import com.droiddeck.launcher.session.GameProfileRefreshState
import com.droiddeck.launcher.session.FullscreenMode
import com.droiddeck.launcher.session.SessionPrefs
import com.droiddeck.launcher.session.SessionEvents
import com.droiddeck.launcher.session.SessionArtifacts
@@ -644,7 +643,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
private var drawerControllerActive by mutableStateOf(false)
private var backHold by mutableStateOf(true)
private var dockedMenuController by mutableStateOf(false)
private var sessionFullscreenMode by mutableStateOf(FullscreenMode.ALWAYS)
private var sessionOrientation by mutableStateOf(android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE)
private var dualScreenSessionMode by mutableStateOf(com.droiddeck.launcher.input.DualScreen.MODE_AUTO)
private var backActionsInverted by mutableStateOf(false)
@@ -942,8 +940,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
}
applyFollowChoice()
applyFollowOrientation(resources.configuration)
sessionFullscreenMode = SessionPrefs.sessionFullscreenMode(this)
applySessionFullscreen()
goFullscreen()
volumeControlStream = android.media.AudioManager.STREAM_MUSIC
displayManager = getSystemService(DISPLAY_SERVICE) as DisplayManager
refreshSecondScreenDisplays()
@@ -2106,12 +2103,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
onPause = ::pauseNow,
paused = SessionState.suspended || SessionState.manualPause,
onResume = { SessionService.resume(this@SessionActivity) },
fullscreenMode = sessionFullscreenMode,
onFullscreenMode = { mode ->
SessionPrefs.setSessionFullscreenMode(this@SessionActivity, mode)
sessionFullscreenMode = mode
applySessionFullscreen()
},
orientation = sessionOrientation,
onOrientation = { value ->
when (SessionState.mode) {
@@ -3318,7 +3309,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
override fun onConfigurationChanged(newConfig: android.content.res.Configuration) {
super.onConfigurationChanged(newConfig)
if (!pipUi && !isInPictureInPictureMode) applySessionFullscreen(newConfig)
picturePosition = SessionPrefs.picturePosition(this, picturePortrait(newConfig))
if (refreshActivityDisplayId() && started) {
SessionService.setActivityDisplay(this, sessionActivityDisplayId)
@@ -6679,8 +6669,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
uiHandler.removeCallbacks(questSteamVrRequest)
if (com.droiddeck.launcher.session.QuestExperimental.isSupported()) uiHandler.post(questSteamVrRequest)
if (runtimeRemovalBlocked) return
sessionFullscreenMode = SessionPrefs.sessionFullscreenMode(this)
if (!pipUi && !isInPictureInPictureMode) applySessionFullscreen()
if (!SessionState.suspended) pausedFrame = null
com.droiddeck.launcher.ui.Motion.refresh(this)
refreshHomeApp()
@@ -7394,7 +7382,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
if (hasFocus && airTriggersOpen) RedMagicAirTriggers.open(this)
if (hasFocus && !pipUi) {
retryFieldKeyboard(true)
applySessionFullscreen()
goFullscreen()
refreshClipboard()
}
updatePointerCapture()
@@ -7404,24 +7392,19 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
if (resumed) sessionClipboard.refresh()
}
private fun applySessionFullscreen(config: android.content.res.Configuration = resources.configuration) {
val fullscreen = sessionFullscreenMode.hidesSystemBars(config.orientation)
if (fullscreen) window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
else window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
private fun goFullscreen() {
@Suppress("DEPRECATION")
window.decorView.systemUiVisibility = if (fullscreen) (View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
or View.SYSTEM_UI_FLAG_FULLSCREEN
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) else View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION)
if (Build.VERSION.SDK_INT >= 28) {
window.attributes = window.attributes.apply {
layoutInDisplayCutoutMode = when {
!fullscreen -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT
Build.VERSION.SDK_INT >= 30 -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
else -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
}
layoutInDisplayCutoutMode = if (Build.VERSION.SDK_INT >= 30)
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
else WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
}
}
}
@@ -23,7 +23,7 @@ object AgentAccess {
fun requireCommands(context: Context) {
if (!commandsAllowed(context)) throw AgentException(
"AGENT_COMMANDS_DISABLED",
"droiddeckctl is off: turn on Setup > Developer > droiddeckctl on the device",
"Debugging tools are off: turn on Setup > Developer > Debugging tools on the device",
)
}
@@ -175,9 +175,6 @@ internal class AddonPack(
val ROCKSTAR = AddonPack("rockstar", BuildConfig.PACK_ROCKSTAR_SHA256, BuildConfig.PACK_ROCKSTAR_SIZE,
listOf("Launcher32.exe", "Launcher64.exe"))
val DIRT = AddonPack("dirt", BuildConfig.PACK_DIRT_SHA256, BuildConfig.PACK_DIRT_SIZE, listOf("ws2_32.dll"))
/** The in-game upscaler's bridge DLLs (tools/upscale/bridges), staged by UpscaleComponent. */
val UPSCALE = AddonPack("upscale", BuildConfig.PACK_UPSCALE_SHA256, BuildConfig.PACK_UPSCALE_SIZE,
listOf("bridges/x86_64-windows/libxess.dll", "bridges/x86_64-windows/nvngx.dll"))
val EPIC = AddonPack("epic", BuildConfig.PACK_EPIC_SHA256, BuildConfig.PACK_EPIC_SIZE, listOf("EpicGamesLauncher.exe"))
}
}
@@ -192,7 +192,6 @@ object DeviceReport {
val fs = StatFs(Environment.getExternalStorageDirectory().path)
k("Shared storage free", FileUtils.sizeToString(fs.availableBlocksLong * fs.blockSizeLong))
}
k("All files access", runCatching { com.droiddeck.launcher.files.AllFilesAccess.state() }.getOrNull())
h("GPU")
k("KGSL gpu_model", readSys("/sys/class/kgsl/kgsl-3d0/gpu_model"))
@@ -1,140 +0,0 @@
package com.droiddeck.launcher.core
/**
* The in-game upscaler (tools/upscale): bridge DLLs stand in for a game's own DLSS / FidelityFX / FSR 2/3 /
* XeSS DLLs and hand each frame to the VK_LAYER_DROIDDECK_upscale layer, which runs FSR 4 (GPU or Hexagon NPU),
* XeSS 3 DP4a or a basic temporal upscaler in its place. Ported from Winlator-NeuralScale
* (michaelisomer-cyber, GPL-3.0, a fork of StevenMXZ/Winlator-Ludashi).
*
* Per game it is a few entries of the game environment; droiddeck-game-env turns them into the DLL overrides,
* the bridge folder, the layer switch and the files the layer reads.
*/
object GameUpscaler {
const val MODE = "DROIDDECK_UPSCALE_MODE"
const val ENGINE = "DROIDDECK_UPSCALE_ENGINE"
const val SHARPNESS = "DROIDDECK_UPSCALE_SHARPNESS"
const val NPU_SYNC = "DROIDDECK_UPSCALE_NPU_SYNC"
const val SIGFIX = "DROIDDECK_UPSCALE_SIGFIX"
val keys = listOf(MODE, ENGINE, SHARPNESS, NPU_SYNC, SIGFIX)
/** Which of the game's upscalers are replaced, and what GPU the game is shown. */
enum class Mode(val id: String) {
/** FidelityFX (FSR 4 API), FSR 2/3 and XeSS games; the real GPU is reported. */
FSR_XESS("fsr"),
/** DLSS games: also nvngx + nvapi64, and the game sees an RTX 2060. */
DLSS("dlss"),
/** Games whose FSR 4 path wants an RDNA 4 card: the game sees a Radeon RX 9070 XT, shader model 6.8. */
NATIVE_FSR4("native");
companion object {
fun byId(id: String?): Mode? = entries.firstOrNull { it.id == id?.trim()?.lowercase() }
}
}
/** What runs in the game's upscaler's place. Ids are the layer's backend names (fsr4_layer.c parse_backend_str). */
enum class Engine(val id: String, val npu: Boolean) {
FSR4_LITE_GPU("fsr4_1_lite_gpu", false),
FSR4_FULL_GPU("fsr4_1_full_gpu", false),
XESS("xess3_gpu", false),
BASIC("fsr3_gpu", false),
SGSR2("sgsr2_gpu", false),
FSR4_NPU("fsr4_1_full_npu", true),
FSR4_LITE_NPU("fsr4_1_lite_npu", true);
companion object {
/** Saved before full FSR 4.1 replaced FSR 4.0 on the NPU (NeuralScale r5). */
private const val LEGACY_FSR4_NPU = "fsr4_0_npu"
fun byId(id: String?): Engine? {
val key = id?.trim()?.lowercase()
return if (key == LEGACY_FSR4_NPU) FSR4_NPU else entries.firstOrNull { it.id == key }
}
}
}
val DEFAULT_ENGINE = Engine.FSR4_LITE_GPU
const val DEFAULT_SHARPNESS = 55
val sharpnessSteps = listOf(0, 25, 40, 55, 70, 85, 100)
data class Choice(
val mode: Mode,
val engine: Engine = DEFAULT_ENGINE,
val sharpness: Int = DEFAULT_SHARPNESS,
val npuSync: Boolean = false,
val signatureFix: Boolean = true,
)
fun choice(config: GameEnvironment.Config, scope: String): Choice? {
if (scope.isEmpty()) return null
val entries = config.games[scope].orEmpty()
val mode = Mode.byId(entries[MODE]) ?: return null
return Choice(
mode = mode,
engine = Engine.byId(entries[ENGINE]) ?: DEFAULT_ENGINE,
sharpness = entries[SHARPNESS]?.toIntOrNull()?.coerceIn(0, 100) ?: DEFAULT_SHARPNESS,
npuSync = entries[NPU_SYNC] == "1",
signatureFix = entries[SIGFIX] != "0",
)
}
fun entries(choice: Choice?): Map<String, String> = if (choice == null) emptyMap() else buildMap {
put(MODE, choice.mode.id)
put(ENGINE, choice.engine.id)
put(SHARPNESS, choice.sharpness.coerceIn(0, 100).toString())
if (choice.npuSync) put(NPU_SYNC, "1")
// DLSS games need NGX to accept the bridge DLLs; on unless the player switched it off (stored as "0").
if (choice.mode == Mode.DLSS) put(SIGFIX, if (choice.signatureFix) "1" else "0")
}
fun withChoice(config: GameEnvironment.Config, scope: String, choice: Choice?): GameEnvironment.Config {
require(scope.isNotEmpty() && GameEnvironment.validScope(scope))
val kept = config.entries(scope).filterKeys { it !in keys }
return config.withEntries(scope, kept + entries(choice))
}
/** NPU engines on a device without a usable Hexagon NPU run the matching GPU engine instead. */
fun effectiveEngine(engine: Engine, npuAvailable: Boolean): Engine = when {
!engine.npu || npuAvailable -> engine
engine == Engine.FSR4_NPU -> Engine.FSR4_FULL_GPU
else -> Engine.FSR4_LITE_GPU
}
/** The control file the layer polls (fsr4_layer.c read_live_ctrl): backend, sharpness 0..1, NPU sync, on/off. */
fun controlText(engine: Engine, sharpness: Int, npuSync: Boolean, enabled: Boolean): String =
"enabled=${if (enabled) 1 else 0}\nbackend=${engine.id}\nsharpness=" +
String.format(java.util.Locale.ROOT, "%.2f", sharpness.coerceIn(0, 100) / 100f) +
"\nnpu_sync=${if (npuSync) 1 else 0}\n"
/** One status file the layer writes (fsr4_layer.c write_live_status): key=value lines. */
data class Status(
val active: Boolean,
val npu: Boolean,
val backendTag: String,
val render: String,
val output: String,
val gpuMs: Float,
val npuMs: Float,
val reason: String,
val timestampMs: Long,
)
fun parseStatus(text: String): Status? {
val values = text.lineSequence().mapNotNull { line ->
val eq = line.indexOf('=')
if (eq <= 0) null else line.substring(0, eq).trim() to line.substring(eq + 1).trim()
}.toMap()
if (values["layer"] != "1") return null
return Status(
active = values["active"] == "1",
npu = values["npu"] == "1",
backendTag = values["backend_tag"].orEmpty().ifEmpty { values["backend"].orEmpty() },
render = values["render"].orEmpty(),
output = values["output"].orEmpty(),
gpuMs = (values["gpu_us"]?.toLongOrNull() ?: 0L) / 1000f,
npuMs = (values["htp_us"]?.toLongOrNull() ?: 0L) / 1000f,
reason = values["reason"].orEmpty(),
timestampMs = values["ts_ms"]?.toLongOrNull() ?: 0L,
)
}
}
@@ -119,7 +119,7 @@ object WirelessAdbFix {
* socket table, and mDNS often advertises nothing, so the ephemeral range Linux gives adbd is
* scanned on loopback (closed ports refuse at once) and the open ports are tried with our key.
*/
private fun loopbackAdbPort(app: Context, exclude: Int? = null): Int? {
private fun loopbackAdbPort(app: Context): Int? {
val open = java.util.concurrent.ConcurrentLinkedQueue<Int>()
val workers = 32
val range = EPHEMERAL_PORTS
@@ -127,7 +127,7 @@ object WirelessAdbFix {
Thread {
var port = range.first + worker
while (port <= range.last) {
if (port != exclude && answers(LOOPBACK, port, 150)) open += port
if (answers(LOOPBACK, port, 150)) open += port
port += workers
}
}.apply { start() }
@@ -162,28 +162,8 @@ object WirelessAdbFix {
}.getOrDefault(address is Inet4Address)
fun localConnectPort(context: Context): Int? =
discoverConnectPort(context, LOOPBACK)
private fun discoverConnectPort(context: Context, host: String, exclude: Int? = null): Int? =
chooseConnectPort(host, exclude,
property = ::tlsPortProperty,
advertised = { acceptable -> findConnectPort(context, host, accept = acceptable) },
answers = { port -> answers(host, port) },
// Some local devices never advertise their connect port. Try only
// loopback and require the app's existing paired key to authenticate.
authenticatedLocal = { loopbackAdbPort(context.applicationContext, exclude) },
)
internal fun chooseConnectPort(
host: String, exclude: Int?,
property: () -> Int?, advertised: ((Int) -> Boolean) -> Int?,
answers: (Int) -> Boolean, authenticatedLocal: () -> Int?,
): Int? {
val local = host == LOOPBACK
val acceptable: (Int) -> Boolean = { port -> port != exclude && (!local || answers(port)) }
val propertyPort = if (local) property()?.takeIf(acceptable) else null
return propertyPort ?: advertised(acceptable) ?: if (local) authenticatedLocal() else null
}
tlsPortProperty()
?: findConnectPort(context, LOOPBACK)
private fun tlsPortProperty(): Int? = runCatching {
Class.forName("android.os.SystemProperties").getMethod("get", String::class.java)
@@ -321,14 +301,14 @@ object WirelessAdbFix {
if (cachedPort != null) {
val cachedResult = runCatching { action(appContext, saved.host, cachedPort) }
if (cachedResult.isSuccess) return
val discoveredPort = discoverConnectPort(appContext, saved.host, exclude = cachedPort)
val discoveredPort = findConnectPort(appContext, saved.host)
if (discoveredPort != null && discoveredPort != cachedPort) {
action(appContext, saved.host, discoveredPort)
} else {
cachedResult.getOrThrow()
}
} else {
val discoveredPort = discoverConnectPort(appContext, saved.host)
val discoveredPort = findConnectPort(appContext, saved.host)
?: error(appContext.getString(R.string.adbfix_enter_address))
action(appContext, saved.host, discoveredPort)
}
@@ -4,23 +4,20 @@ import android.app.Notification
import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent
import android.app.RemoteInput
import android.app.Service
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.net.nsd.NsdManager
import android.net.nsd.NsdServiceInfo
import android.os.Build
import android.os.Handler
import android.os.IBinder
import android.os.Looper
import android.util.TypedValue
import android.widget.RemoteViews
import com.droiddeck.launcher.FrontEndActivity
import com.droiddeck.launcher.R
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import java.util.UUID
class WirelessAdbPairingService : Service() {
override fun attachBaseContext(newBase: android.content.Context) =
@@ -40,8 +37,6 @@ class WirelessAdbPairingService : Service() {
private var discovery: NsdManager.DiscoveryListener? = null
private var pairingHost: String? = null
private var pairingPort: Int? = null
private val keypad = WirelessPairingKeypad()
private var keypadToken = UUID.randomUUID().toString()
@Volatile private var working = false
@Volatile private var limitEnabled = false
@Volatile private var session = 0
@@ -51,21 +46,13 @@ class WirelessAdbPairingService : Service() {
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
when (intent?.action) {
ACTION_KEYPAD -> {
if (intent.data?.host == keypadToken && current.value is Stage.CodeNeeded && !working) {
val key = intent.data?.lastPathSegment?.toIntOrNull()
if (key == WirelessPairingKeypad.SUBMIT) {
if (keypad.ready && pairingPort != null) onCode(keypad.digits)
} else if (key != null && keypad.press(key)) {
show(current.value, quietUpdate = true)
}
} else if (current.value == Stage.Idle) {
stopSelf(startId)
}
ACTION_CODE -> {
val code = RemoteInput.getResultsFromIntent(intent)?.getCharSequence(KEY_CODE)
?.filter(Char::isDigit)?.toString().orEmpty()
onCode(code)
}
ACTION_CANCEL -> finish(Stage.Idle)
null -> begin(intent?.getBooleanExtra(EXTRA_ENABLE_LIMIT, false) == true)
else -> if (discovery == null && !working) stopSelf(startId)
else -> begin(intent?.getBooleanExtra(EXTRA_ENABLE_LIMIT, false) == true)
}
return START_NOT_STICKY
}
@@ -73,13 +60,11 @@ class WirelessAdbPairingService : Service() {
private fun begin(enableLimit: Boolean) {
if (working) return
session++
resetKeypad()
limitEnabled = enableLimit
pairingHost = null
pairingPort = null
working = false
publish(Stage.Waiting)
getSystemService(NotificationManager::class.java)?.cancel(KEYPAD_NOTIFICATION_ID)
startForeground(NOTIFICATION_ID, notification(Stage.Waiting))
startDiscovery()
main.removeCallbacks(timeout)
@@ -116,13 +101,9 @@ class WirelessAdbPairingService : Service() {
if (!WirelessAdbFix.isLocalAddress(address)) return
main.post {
if (owner != session || working || current.value == Stage.Done) return@post
val endpointChanged = pairingHost != address.hostAddress || pairingPort != serviceInfo.port
pairingHost = address.hostAddress
pairingPort = serviceInfo.port
if (endpointChanged) {
resetKeypad()
show(Stage.CodeNeeded())
}
if (current.value !is Stage.CodeNeeded) show(Stage.CodeNeeded())
}
}
}
@@ -136,12 +117,11 @@ class WirelessAdbPairingService : Service() {
show(Stage.Waiting)
return
}
if (code.length != WirelessPairingKeypad.LENGTH) {
if (code.length != 6) {
show(Stage.CodeNeeded(getString(R.string.adbpair_six_digits)))
return
}
working = true
resetKeypad()
val owner = session
val enable = limitEnabled
show(Stage.Working(getString(R.string.adbpair_pairing)))
@@ -175,34 +155,17 @@ class WirelessAdbPairingService : Service() {
}, "wireless-adb-pairing").start()
}
private fun show(stage: Stage, quietUpdate: Boolean = false) {
private fun show(stage: Stage) {
publish(stage)
val manager = getSystemService(NotificationManager::class.java) ?: return
if (stage is Stage.CodeNeeded) {
// A new high-priority notification can pop over Settings. Updating the
// quiet foreground-service notification can leave the keypad in the shade.
// End any previous indeterminate progress even if this is a code retry.
if (!quietUpdate) manager.notify(NOTIFICATION_ID, notification(stage, foregroundCodeEntry = true))
manager.notify(KEYPAD_NOTIFICATION_ID, notification(stage, quietUpdate))
} else {
manager.cancel(KEYPAD_NOTIFICATION_ID)
manager.notify(NOTIFICATION_ID, notification(stage, quietUpdate))
}
}
private fun resetKeypad() {
keypad.clear()
keypadToken = UUID.randomUUID().toString()
getSystemService(NotificationManager::class.java)?.notify(NOTIFICATION_ID, notification(stage))
}
private fun finish(stage: Stage) {
session++
resetKeypad()
main.removeCallbacks(timeout)
stopDiscovery()
publish(stage)
val manager = getSystemService(NotificationManager::class.java)
manager?.cancel(KEYPAD_NOTIFICATION_ID)
if (stage is Stage.Done || stage is Stage.Failed) {
manager?.notify(NOTIFICATION_ID, notification(stage))
stopForeground(STOP_FOREGROUND_DETACH)
@@ -220,16 +183,13 @@ class WirelessAdbPairingService : Service() {
}
override fun onDestroy() {
getSystemService(NotificationManager::class.java)?.cancel(KEYPAD_NOTIFICATION_ID)
main.removeCallbacks(timeout)
stopDiscovery()
if (current.value.let { it is Stage.Waiting || it is Stage.CodeNeeded || it is Stage.Working }) publish(Stage.Idle)
super.onDestroy()
}
private fun notification(
stage: Stage, quietUpdate: Boolean = false, foregroundCodeEntry: Boolean = false,
): Notification {
private fun notification(stage: Stage): Notification {
val manager = getSystemService(NotificationManager::class.java)
manager?.createNotificationChannel(NotificationChannel(CHANNEL_ID, getString(R.string.adbpair_channel_name),
NotificationManager.IMPORTANCE_HIGH).apply {
@@ -245,7 +205,7 @@ class WirelessAdbPairingService : Service() {
PendingIntent.FLAG_IMMUTABLE)
val cancel = PendingIntent.getService(this, 1,
Intent(this, WirelessAdbPairingService::class.java).setAction(ACTION_CANCEL), PendingIntent.FLAG_IMMUTABLE)
val quiet = foregroundCodeEntry || stage == Stage.Waiting || stage == Stage.Idle || stage is Stage.Working
val quiet = stage == Stage.Waiting || stage == Stage.Idle || stage is Stage.Working
val builder = Notification.Builder(this, if (quiet) PROGRESS_CHANNEL_ID else CHANNEL_ID)
.setSmallIcon(R.drawable.ic_stat_session)
.setContentIntent(open)
@@ -260,31 +220,19 @@ class WirelessAdbPairingService : Service() {
.setOnlyAlertOnce(true)
.addAction(Notification.Action.Builder(null, getString(R.string.common_cancel), cancel).build())
is Stage.CodeNeeded -> {
val reply = PendingIntent.getService(this, 2,
Intent(this, WirelessAdbPairingService::class.java).setAction(ACTION_CODE),
if (Build.VERSION.SDK_INT >= 31) PendingIntent.FLAG_MUTABLE or PendingIntent.FLAG_UPDATE_CURRENT
else PendingIntent.FLAG_UPDATE_CURRENT)
val input = RemoteInput.Builder(KEY_CODE).setLabel(getString(R.string.adbpair_code_label)).build()
val text = stage.error ?: getString(R.string.adbpair_code_hint)
builder
.setContentTitle(getString(if (foregroundCodeEntry) R.string.adbpair_title_pair
else if (stage.error == null) R.string.adbpair_title_code else R.string.adbpair_title_retry))
.setContentIntent(null)
.setVisibility(Notification.VISIBILITY_SECRET)
.setLocalOnly(true)
.setContentTitle(getString(if (stage.error == null) R.string.adbpair_title_code else R.string.adbpair_title_retry))
.setContentText(text)
.setStyle(Notification.BigTextStyle().bigText(text))
.setOngoing(true)
.setOnlyAlertOnce(foregroundCodeEntry || quietUpdate)
if (!foregroundCodeEntry) {
// Keep the keypad separate from status/install notifications. Android owns
// the heads-up timeout; the drawer remains usable without expanding a group.
builder.setGroup(KEYPAD_GROUP)
.addAction(Notification.Action.Builder(null, getString(R.string.common_cancel), cancel).build())
if (stage.error != null && pairingPort == null) {
builder.setContentText(stage.error)
.setStyle(Notification.BigTextStyle().bigText(stage.error))
} else {
builder.setStyle(Notification.DecoratedCustomViewStyle())
.setCustomBigContentView(pairingKeypad())
.setCustomHeadsUpContentView(pairingKeypad(keyHeightDp = 24))
if (Build.VERSION.SDK_INT >= 31) {
builder.setCustomContentView(pairingKeypad(keyHeightDp = 21))
}
}
}
.addAction(Notification.Action.Builder(null, getString(R.string.adbpair_enter_code), reply).addRemoteInput(input).build())
.addAction(Notification.Action.Builder(null, getString(R.string.common_cancel), cancel).build())
}
is Stage.Working -> builder
.setContentTitle(getString(R.string.adbpair_title_working))
@@ -306,39 +254,14 @@ class WirelessAdbPairingService : Service() {
return builder.build()
}
private fun pairingKeypad(keyHeightDp: Int? = null): RemoteViews = RemoteViews(packageName, R.layout.wireless_pairing_keypad).apply {
val ids = intArrayOf(R.id.pair_key_0, R.id.pair_key_1, R.id.pair_key_2, R.id.pair_key_3, R.id.pair_key_4,
R.id.pair_key_5, R.id.pair_key_6, R.id.pair_key_7, R.id.pair_key_8, R.id.pair_key_9,
R.id.pair_key_delete, R.id.pair_key_submit)
ids.forEachIndexed { key, id ->
if (keyHeightDp != null && Build.VERSION.SDK_INT >= 31) {
// Fit both rows inside the system template's heads-up or collapsed height.
setViewLayoutHeight(id, keyHeightDp.toFloat(), TypedValue.COMPLEX_UNIT_DIP)
setViewLayoutMargin(id, RemoteViews.MARGIN_TOP, 1f, TypedValue.COMPLEX_UNIT_DIP)
setViewLayoutMargin(id, RemoteViews.MARGIN_BOTTOM, 1f, TypedValue.COMPLEX_UNIT_DIP)
setTextViewTextSize(id, TypedValue.COMPLEX_UNIT_SP, if (keyHeightDp < 24) 14f else 15f)
}
val intent = Intent(this@WirelessAdbPairingService, WirelessAdbPairingService::class.java)
.setAction(ACTION_KEYPAD)
.setData(Uri.Builder().scheme("droiddeck-pairing").authority(keypadToken).appendPath(key.toString()).build())
val press = PendingIntent.getService(this@WirelessAdbPairingService, key, intent, PendingIntent.FLAG_IMMUTABLE)
setOnClickPendingIntent(id, press)
}
setTextViewText(R.id.pair_key_code, keypad.display)
setContentDescription(R.id.pair_key_code, getString(R.string.adbpair_keypad_entered, keypad.digits.length))
setBoolean(R.id.pair_key_delete, "setEnabled", keypad.digits.isNotEmpty())
setBoolean(R.id.pair_key_submit, "setEnabled", keypad.ready && pairingPort != null)
}
companion object {
private const val CHANNEL_ID = "wireless-adb-pairing"
private const val PROGRESS_CHANNEL_ID = "wireless-adb-pairing-progress"
private const val NOTIFICATION_ID = 3
private const val KEYPAD_NOTIFICATION_ID = 3403
private const val KEYPAD_GROUP = "wireless-adb-keypad"
private const val PAIRING_TYPE = "_adb-tls-pairing._tcp"
private const val ACTION_KEYPAD = "com.droiddeck.launcher.action.WIRELESS_ADB_KEYPAD"
private const val ACTION_CODE = "com.droiddeck.launcher.action.WIRELESS_ADB_CODE"
private const val ACTION_CANCEL = "com.droiddeck.launcher.action.WIRELESS_ADB_CANCEL"
private const val KEY_CODE = "code"
private const val EXTRA_ENABLE_LIMIT = "enable_limit"
private const val TIMEOUT_MS = 5 * 60_000L
@@ -365,7 +288,7 @@ class WirelessAdbPairingService : Service() {
fun notificationsEnabled(context: Context): Boolean =
context.getSystemService(NotificationManager::class.java)?.areNotificationsEnabled() != false && !channelBlocked(context)
/** Pairing needs this notification channel to show the keypad over Android Settings. */
/** The code is typed into a notification on this channel; a channel the user switched off leaves pairing with nothing to type into. */
fun channelBlocked(context: Context): Boolean =
context.getSystemService(NotificationManager::class.java)?.getNotificationChannel(CHANNEL_ID)?.importance == NotificationManager.IMPORTANCE_NONE
@@ -1,29 +0,0 @@
package com.droiddeck.launcher.core
internal class WirelessPairingKeypad {
var digits = ""
private set
val ready: Boolean get() = digits.length == LENGTH
val display: String get() = digits.padEnd(LENGTH, '–')
fun press(key: Int): Boolean {
val next = when {
key == DELETE -> digits.dropLast(1)
key in 0..9 && !ready -> digits + key
else -> digits
}
if (next == digits) return false
digits = next
return true
}
fun clear() {
digits = ""
}
companion object {
const val LENGTH = 6
const val DELETE = 10
const val SUBMIT = 11
}
}
@@ -14,15 +14,6 @@ object AllFilesAccess {
fun missing(sdk: Int = Build.VERSION.SDK_INT, granted: () -> Boolean = { Environment.isExternalStorageManager() }): Boolean =
sdk >= Build.VERSION_CODES.R && !granted()
fun state(sdk: Int = Build.VERSION.SDK_INT, granted: () -> Boolean = { Environment.isExternalStorageManager() }): String = when {
sdk < Build.VERSION_CODES.R -> "not needed"
granted() -> "granted"
else -> "missing"
}
fun mayHideFilesIn(path: String, sdk: Int = Build.VERSION.SDK_INT, granted: () -> Boolean = { Environment.isExternalStorageManager() }): Boolean =
covers(path) && missing(sdk, granted)
/** Whether reading [path] takes all-files access: shared storage, outside the per-app folders directly under a volume's root, which Android always lets the app use. */
fun covers(path: String): Boolean {
val inside = VOLUME.matchEntire(path)?.groupValues?.get(2) ?: return false
@@ -373,7 +373,7 @@ object AutoComponents {
private const val FINDINGS = "wincomp-findings.json"
private const val DETECTORS = "d3"
private const val DETECTORS = "d4"
internal fun signature(context: Context, game: Library.SteamGame): String {
val folder = game.gameFiles
@@ -42,6 +42,7 @@ object DependencyDetector {
"dotnet45" to ".NET Framework 4.5", "dotnet452" to ".NET Framework 4.5.2",
"dotnet46" to ".NET Framework 4.6", "dotnet472" to ".NET Framework 4.7.2",
"dotnet48" to ".NET Framework 4.8", "dotnet35" to ".NET Framework 3.5",
"dotnetcoredesktop3" to ".NET Desktop 3", "dotnet50" to ".NET 5",
"dotnetcoredesktop6" to ".NET Desktop 6", "dotnetcoredesktop7" to ".NET Desktop 7",
"dotnetcoredesktop8" to ".NET Desktop 8",
)
@@ -50,7 +51,7 @@ object DependencyDetector {
"vcredist2005", "vcredist2008", "vcredist2010", "vcredist2012", "vcredist2013",
"vcredist2015", "vcredist2019", "vcredist2022",
"dotnet35", "dotnet40", "dotnet45", "dotnet452", "dotnet46", "dotnet472", "dotnet48",
"dotnetcoredesktop6", "dotnetcoredesktop7", "dotnetcoredesktop8",
"dotnetcoredesktop3", "dotnet50", "dotnetcoredesktop6", "dotnetcoredesktop7", "dotnetcoredesktop8",
"d3dx9", "d3dx11", "xact", "xact_x64", "xna31", "xna40", "physx", "oalinst", "XLiveRedist",
)
@@ -148,7 +149,7 @@ object DependencyDetector {
val comp = dotnetComponent("$path $name")
return when {
comp != null -> listOf(comp)
isDir -> emptyList()
isDir || CORE_RUNTIME.containsMatchIn(path) -> emptyList()
else -> listOf("dotnet48")
}
}
@@ -172,10 +173,20 @@ object DependencyDetector {
private val D3DX11_RE = Regex("""d3dx11_\d+\.dll""")
private val D3DCOMPILER_RE = Regex("""d3dcompiler_\d+\.dll""")
private fun dotnetComponent(s: String): String? = when {
s.contains("desktop-runtime-8") || Regex("""\b8\.\d""").containsMatchIn(s) -> "dotnetcoredesktop8"
s.contains("desktop-runtime-7") || Regex("""\b7\.\d""").containsMatchIn(s) -> "dotnetcoredesktop7"
s.contains("desktop-runtime-6") || Regex("""\b6\.\d""").containsMatchIn(s) -> "dotnetcoredesktop6"
private val CORE_RUNTIME = Regex("""(?:windowsdesktop|dotnet)-runtime-(\d+)\.""")
private val CORE_RUNTIMES = mapOf(
"3" to "dotnetcoredesktop3", "5" to "dotnet50", "6" to "dotnetcoredesktop6", "7" to "dotnetcoredesktop7", "8" to "dotnetcoredesktop8",
)
private fun dotnetComponent(s: String): String? {
CORE_RUNTIME.find(s)?.let { return CORE_RUNTIMES[it.groupValues[1]] }
return byVersion(s)
}
private fun byVersion(s: String): String? = when {
s.contains("desktop-runtime-8") || Regex("""(?<![\d.])8\.\d""").containsMatchIn(s) -> "dotnetcoredesktop8"
s.contains("desktop-runtime-7") || Regex("""(?<![\d.])7\.\d""").containsMatchIn(s) -> "dotnetcoredesktop7"
s.contains("desktop-runtime-6") || Regex("""(?<![\d.])6\.\d""").containsMatchIn(s) -> "dotnetcoredesktop6"
s.contains("ndp48") || s.contains("fx48") || s.contains("4.8") -> "dotnet48"
s.contains("ndp472") || s.contains("4.7.2") -> "dotnet472"
s.contains("ndp46") || s.contains("4.6") -> "dotnet46"
@@ -14,7 +14,7 @@ internal object DroidDeckHudConfig {
"showLatency" to "1", "showAvg" to "1", "showLow1" to "1", "showLow01" to "0", "showLow001" to "0",
"showEngine" to "1", "showRenderer" to "1",
"showDisplay" to "1", "showHdr" to "1", "showNet" to "1", "showResolution" to "1",
"showProton" to "1", "showUpscale" to "1", "showSession" to "1", "showClock" to "1", "hudOrder" to "",
"showProton" to "1", "showSession" to "1", "showClock" to "1", "hudOrder" to "",
"tempUnit" to "c", "tempBands" to "1", "tempAuto" to "1", "tempRedCpu" to "90", "tempRedGpu" to "90", "tempRedBat" to "48",
)
@@ -287,9 +287,6 @@ class DroidDeckHudHost(context: Context) {
proton = protonName(pid) ?: proton
}
hud.setWineVersion(proton)
hud.setUpscale(com.droiddeck.launcher.session.UpscaleComponent.status(context)?.takeIf { it.active }?.let {
it.backendTag + " " + String.format(java.util.Locale.ROOT, "%.1fms", if (it.npu) it.npuMs else it.gpuMs)
})
hud.setPresentedFps(presentedFps())
}
@@ -74,13 +74,12 @@ enum class DroidDeckHudSize(val token: String, val label: String) {
FULL to listOf(
"showFPS", "showFPSGraph", "showGpuModel", "showDisplay", "showHdr", "showGPULoad", "showGpuTemp",
"showCPUUsage", "showTemp", "showVram", "showRAM", "showBattery", "showBatteryTemp", "showBatteryTime",
"showPower", "showLatency", "showAvg", "showLow1", "showLow01", "showLow001", "showUpscale",
"showPower", "showLatency", "showAvg", "showLow1", "showLow01", "showLow001",
),
TILES to listOf(
"showFPS", "showFPSGraph", "showLatency", "showGPULoad", "showGpuTemp", "showCPUUsage", "showTemp",
"showVram", "showRAM", "showEngine", "showDisplay", "showHdr", "showAvg", "showLow1",
"showLow01", "showLow001", "showGpuModel", "showBattery", "showBatteryTemp", "showBatteryTime", "showPower",
"showUpscale",
),
PILL to listOf(
"showFPS", "showFPSGraph", "showGpuModel", "showGPULoad", "showGpuTemp", "showCPUUsage", "showTemp",
@@ -114,7 +114,6 @@ class DroidDeckHudView(context: Context) : View(context) {
private var gpuModel = ""
private var gpuSpoofName = ""
private var wineVersion = ""
private var upscaleText = ""
private var graphicsWrapper = ""
private var dxvkVersion = ""
private var vkd3dVersion = ""
@@ -284,8 +283,6 @@ class DroidDeckHudView(context: Context) : View(context) {
fun setEngineLabel(s: String?) { if ((s ?: "") != engineLabel) { engineLabel = s ?: ""; post { rebuildAndInvalidate() } } }
fun setGpuModel(s: String?) { if ((s ?: "") != gpuModel) { gpuModel = s ?: ""; post { rebuildAndInvalidate() } } }
fun setWineVersion(s: String?) { if ((s ?: "") != wineVersion) { wineVersion = s ?: ""; post { rebuildAndInvalidate() } } }
/** The in-game upscaler's backend and its time per frame (empty: not running). */
fun setUpscale(s: String?) { if ((s ?: "") != upscaleText) { upscaleText = s ?: ""; post { rebuildAndInvalidate() } } }
fun setResolution(s: String?) { resolution = s ?: "" }
@@ -781,7 +778,6 @@ class DroidDeckHudView(context: Context) : View(context) {
"showHdr" -> "HDR" to colHdr
"showResolution" -> "RES" to colDim
"showProton" -> "PROTON" to colVram
"showUpscale" -> "UPSCALE" to colFps
"showSession" -> "TIME" to colDim
else -> key.removePrefix("show") to colDim
}
@@ -819,7 +815,6 @@ class DroidDeckHudView(context: Context) : View(context) {
"showHdr" -> if (showHdrLine()) hdrValue(valuePx) else listOf(Span("off", colDim, valuePx))
"showResolution" -> listOf(Span(resolutionString(), colValue, valuePx))
"showProton" -> listOf(Span(wineVersion.ifBlank { "—" }, colVram, valuePx))
"showUpscale" -> listOf(Span(upscaleText.ifBlank { "—" }, colValue, valuePx))
"showSession" -> listOf(Span(elapsedString(), colValue, valuePx))
else -> listOf(Span("—", colDim, valuePx))
}
@@ -1,18 +0,0 @@
package com.droiddeck.launcher.session
import android.content.res.Configuration
import androidx.annotation.StringRes
import com.droiddeck.launcher.R
enum class FullscreenMode(@StringRes val label: Int) {
ALWAYS(R.string.widgets_on),
LANDSCAPE_ONLY(R.string.setup_fullscreen_landscape_only),
OFF(R.string.widgets_off);
fun hidesSystemBars(orientation: Int): Boolean =
this == ALWAYS || (this == LANDSCAPE_ONLY && orientation == Configuration.ORIENTATION_LANDSCAPE)
companion object {
fun fromStored(value: String?): FullscreenMode? = entries.firstOrNull { it.name == value }
}
}
@@ -98,13 +98,6 @@ object GameEnvironmentStore {
return config
}
@Synchronized
fun setGameUpscaler(context: Context, scope: String, choice: com.droiddeck.launcher.core.GameUpscaler.Choice?): GameEnvironment.Config {
val config = com.droiddeck.launcher.core.GameUpscaler.withChoice(read(context), scope, choice)
save(context, config)
return config
}
@Synchronized
fun setDefault(context: Context, scope: String, name: String, value: String): Boolean {
val config = read(context)
@@ -259,11 +259,6 @@ object SessionFiles {
"usr/local/lib/droiddeck-gpuload/libVkLayer_droiddeck_gpuload.so" to "usr/local/lib/droiddeck-gpuload/libVkLayer_droiddeck_gpuload.so",
"usr/local/lib/droiddeck-gpuload/VK_LAYER_DROIDDECK_gpu_load.json" to "usr/share/vulkan/implicit_layer.d/droiddeck_gpu_load.json",
)
// The in-game upscaler's layer for PRoot games (UpscaleComponent; off unless DROIDDECK_UPSCALE=1).
val upscaleLayer = listOf(
"usr/local/lib/droiddeck-upscale-layer/libVkLayer_droiddeck_upscale.so" to "usr/local/lib/droiddeck-upscale-layer/libVkLayer_droiddeck_upscale.so",
"usr/local/lib/droiddeck-upscale-layer/VK_LAYER_DROIDDECK_upscale.json" to "usr/share/vulkan/implicit_layer.d/droiddeck_upscale.json",
)
val fexPreloads = listOf("x86_64", "i386").flatMap { arch ->
listOf("libddsession.so", "libfakeinput.so", "libfaultreport.so").map { "$arch/$it" to "usr/local/lib/droiddeck-fex/$arch/$it" }
} + listOf("libvulkan-thunk.so", "libwebkitinput.so").map { "x86_64/$it" to "usr/local/lib/droiddeck-fex/x86_64/$it" }
@@ -286,7 +281,7 @@ object SessionFiles {
"usr/local/lib/droiddeck-pipewire.tzst" to "usr/local/lib/droiddeck-pipewire.tzst",
"usr/local/share/licenses/dwarfs/LICENSE" to "usr/local/share/licenses/dwarfs/LICENSE",
"usr/local/share/licenses/uruntime/LICENSE" to "usr/local/share/licenses/uruntime/LICENSE",
) + mangoapp + xclipse.map { it to it } + maliCompat + msitools.map { it to it } + vr + gpuLoad + upscaleLayer + fexPreloads).filter { (asset, _) ->
) + mangoapp + xclipse.map { it to it } + maliCompat + msitools.map { it to it } + vr + gpuLoad + fexPreloads).filter { (asset, _) ->
val dir = asset.substringBeforeLast('/')
runCatching { context.assets.list("linuxfs/$dir")?.contains(asset.substringAfterLast('/')) == true }.getOrDefault(false)
}
@@ -112,21 +112,10 @@ object SessionPrefs {
else -> false
}
fun launcherFullscreenMode(context: Context): FullscreenMode {
val preferences = prefs(context)
return FullscreenMode.fromStored(preferences.getString("launcherFullscreenMode", null))
?: if (preferences.getBoolean("launcherFullscreen", true)) FullscreenMode.ALWAYS else FullscreenMode.OFF
}
fun launcherFullscreen(context: Context): Boolean = prefs(context).getBoolean("launcherFullscreen", true)
fun setLauncherFullscreenMode(context: Context, mode: FullscreenMode) {
prefs(context).edit().putString("launcherFullscreenMode", mode.name).apply()
}
fun sessionFullscreenMode(context: Context): FullscreenMode =
FullscreenMode.fromStored(prefs(context).getString("sessionFullscreenMode", null)) ?: FullscreenMode.ALWAYS
fun setSessionFullscreenMode(context: Context, mode: FullscreenMode) {
prefs(context).edit().putString("sessionFullscreenMode", mode.name).apply()
fun setLauncherFullscreen(context: Context, on: Boolean) {
prefs(context).edit().putBoolean("launcherFullscreen", on).apply()
}
fun launcherFrost(context: Context): Boolean = prefs(context).getBoolean("launcherFrost", false)
@@ -1137,8 +1137,6 @@ class SessionService : Service() {
if (SessionPrefs.noGlError(this)) guest.add("MESA_NO_ERROR=1")
guest.add("MESA_DISK_CACHE_DATABASE=1")
guest.addAll(GpuStatsComponent.guestEnv(LinuxRuntime.rootDir(this)))
guest.addAll(UpscaleComponent.guestEnv(this))
UpscaleComponent.prepare(this)
guest.add("GLIBC_TUNABLES=glibc.pthread.rseq=0:glibc.malloc.top_pad=16777216")
if (SessionState.mode == MODE_STEAM) guest.add("DD_MANGOAPP=" + (if (SessionPrefs.mangoapp(this)) "1" else "0"))
SessionPaths.current()?.let { SessionArtifacts.markRpcs3Log(it, LinuxRuntime.rootDir(this)) }
@@ -1357,17 +1355,10 @@ class SessionService : Service() {
if (controllersOn) components.add(RumbleComponent().also { it.attach(this) })
val home = File(LinuxRuntime.rootDir(this), "root")
File(home, "Storage").mkdirs()
val addedExeFolders = com.droiddeck.launcher.frontend.AddedExes.list(this).map { File(it.folder) }.distinctBy { it.path }
val addedGameRoots = com.droiddeck.launcher.frontend.AddedGames.roots(this)
val addedFolders = (addedExeFolders + addedGameRoots.map { it.host }).distinctBy { it.path }
for (folder in addedFolders) {
if (com.droiddeck.launcher.files.AllFilesAccess.mayHideFilesIn(folder.path))
Log.w(TAG, "added games: Android may hide .exe files in $folder because All files access is missing")
}
if (sharedStorage != null) {
binds.add(sharedStorage.path + ":/root/Storage")
} else {
for (folder in addedExeFolders) {
for (folder in com.droiddeck.launcher.frontend.AddedExes.list(this).map { File(it.folder) }.distinctBy { it.path }) {
val guest = com.droiddeck.launcher.frontend.AddedGames.guestPath(this, folder) ?: continue
if (!guest.startsWith("/root/Storage/") || !folder.isDirectory) continue
File(LinuxRuntime.rootDir(this), guest.removePrefix("/")).mkdirs()
@@ -1418,7 +1409,7 @@ class SessionService : Service() {
Log.w(TAG, "storage diagnostics: selected library could not be identified; metadata snapshot only")
}
}
for (root in addedGameRoots) {
for (root in com.droiddeck.launcher.frontend.AddedGames.roots(this)) {
if (root.host.isDirectory && root.host.canRead()) {
File(LinuxRuntime.rootDir(this), root.guest.removePrefix("/")).mkdirs()
binds.add(root.host.path + ":" + root.guest)
@@ -12,7 +12,7 @@ object SettingsReset {
private const val TAG = "SettingsReset"
internal val SESSION_KEYS = setOf(
"orientation", "launcherFullscreen", "launcherFullscreenMode", "sessionFullscreenMode", "launcherFrost", "frostWallpaper", "frostCards", "frostTransparency", "frostCardTransparency", "controllerHaptics", "animations", "lowStorageWarning", "theme", "runSteamAtStartup", "startupSession", "addedGamesArt",
"orientation", "launcherFullscreen", "launcherFrost", "frostWallpaper", "frostCards", "frostTransparency", "frostCardTransparency", "controllerHaptics", "animations", "lowStorageWarning", "theme", "runSteamAtStartup", "startupSession", "addedGamesArt",
"drawerWidthDp", "dualScreenMode", "dualScreenSessionMode", "dualScreenLauncher", "dualScreenSessionControls", "androidTextFieldKeyboard",
"soundtracksIngame", "gameStoresSpeedTier", "gameStoresParallel", "storesOpenTab", "storesShowMature",
"storesInstallLanguage",
@@ -1,444 +0,0 @@
package com.droiddeck.launcher.session
import android.content.Context
import android.os.Environment
import android.util.Log
import com.droiddeck.launcher.core.AddonPack
import com.droiddeck.launcher.core.Downloader
import com.droiddeck.launcher.core.GameEnvironment
import com.droiddeck.launcher.core.GameUpscaler
import com.droiddeck.launcher.gpu.SocNames
import com.droiddeck.launcher.runtime.LinuxRuntime
import java.io.File
import java.security.MessageDigest
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
/**
* The in-game upscaler's files on the device (see [GameUpscaler]):
* - the bridge DLLs, built from tools/upscale/bridges, come in the "upscale" add-on pack;
* - the Vulkan layer is in the APK (bionic games) and in the Linux runtime (PRoot games);
* - the parts with no source to build from (AMD's FSR 4 SPIR-V and weights, Intel's XeSS 3 runtime, Qualcomm's
* QNN libraries for the Hexagon NPU) are fetched from Winlator-NeuralScale at a pinned commit and checked against
* the SHA-256 listed here, or copied from a folder of the same files under Download.
* Everything lands under [GUEST_ROOT] in the rootfs, where both PRoot and bionic games read it.
*/
object UpscaleComponent {
private const val TAG = "UpscaleComponent"
const val UPSTREAM = "michaelisomer-cyber/Winlator-NeuralScale"
const val UPSTREAM_COMMIT = "71c140d9e5586f659251c3ebc602f2d21923655c"
const val XESS_COMMIT = "a0ab6b0f770e1a6786b4e68def46b4edb8baafd0"
const val GUEST_ROOT = "/usr/local/lib/droiddeck-upscale"
const val GUEST_RUN = "/run/droiddeck-hud/upscale"
private const val LOCAL_COPY = "droiddeck-upscale"
private const val LAYER_LIBRARY = "libVkLayer_droiddeck_upscale.so"
private const val BRIDGES_STAMP = ".pack"
enum class Group { CORE, XESS, NPU }
data class DataFile(
val group: Group, val relative: String, val upstreamPath: String, val sha256: String, val size: Long,
val commit: String = UPSTREAM_COMMIT,
) {
val url get() = "https://raw.githubusercontent.com/$UPSTREAM/$commit/$upstreamPath"
}
val FILES = listOf(
DataFile(Group.CORE, "fsr4/fsr3_accumulate.spv", "app/src/main/assets/fsr4/fsr3_accumulate.spv", "98054410f4d3b6fad3020b174982a5e68d2fc5a4d546a90f9e13ea646b32c180", 23840L),
DataFile(Group.CORE, "fsr4/fsr3_prepare.spv", "app/src/main/assets/fsr4/fsr3_prepare.spv", "86e99b0e7e83e74729b016c3089deafdc9c2dc09b27305d009a8942dd0fe19da", 15036L),
DataFile(Group.CORE, "fsr4/fsr3_rcas.spv", "app/src/main/assets/fsr4/fsr3_rcas.spv", "13e276049ecc18eb7b53f6de1f76f58eb1a60c6f4251870f3647b20478b05710", 11644L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/fsr411_full_zc_i8.wpack", "app/src/main/assets/fsr4/fsr411_full/performance/fsr411_full_zc_i8.wpack", "8d36bb959d23ede5bb409959736c0d0b718bae58b363779126c0235b0fd10f7c", 137424L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/fsr411_full_zc_s8.wpack", "app/src/main/assets/fsr4/fsr411_full/performance/fsr411_full_zc_s8.wpack", "ef445437e3d48c64f993a60407183f675d05aadd82c7c29b93e61c53308ab28e", 137256L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/initializers.bin", "app/src/main/assets/fsr4/fsr411_full/performance/initializers.bin", "a54e552ff69a3f7199861417f7ae461d1f67f636ab532c6ec9d8ea5d2963735a", 131072L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-00.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-00.spv", "d6a01100a56327713d2f7c1a768e41f8a31f2cadce5f37b7dac81630722ff5a2", 33116L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-01.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-01.spv", "759396dc2eccd731bebac13e8818568c8cc410150d24ed4cc01aa8b5ea873fbb", 58172L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-02.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-02.spv", "bdabc7c28f18c31ac8574856a386a268ae4d866f68a65e72b59bf3bad2235132", 3208L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-03.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-03.spv", "bcb4d1d01e33114c68bb13059577c280bb05b5a3af7218fdbc38e99883e0632d", 108840L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-04.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-04.spv", "d85b605d066d89178994ba835b6c3b267ed771de530117a5b9e6103d49e866e7", 3244L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-05.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-05.spv", "e44f0ccd272e4a85ad38894a38db7adae019d18660b166e6c28e82b328d7cc84", 109048L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-06.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-06.spv", "df469b6481234bf7b964a7c0ecf8a5829d84d1bc34fdb7c72e87014f82e31326", 3208L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-07.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-07.spv", "a873b766b2b8923aeb7d325a61cbea251cbac6450e708a23a7714c553ce577ff", 132572L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-08.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-08.spv", "c4aba5b9cd11100308aa2e3d8a4d39e66713c46c35edbe6496552764459a2228", 3580L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-09.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-09.spv", "d757fd28efbd09259f82918de5d3765784933d5b26eea56babe45fd6fefc5cfa", 190032L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-10.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-10.spv", "295873b3ecbd9db40cc4c50ecf15a72964d5846b96642d2e4743a9333382b557", 3580L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-11.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-11.spv", "73e05c6727408d5b1f472112c5d68060e9db9aaf918e892055e6619d5f0e4edc", 190032L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-12.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-12.spv", "007315c42072370919ac393b63a04a0ac025a802f927b490a6749bd6034c15fd", 3596L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-13.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-13.spv", "020929f63d8a70f90bd628a92c50b4049db89155d5e062bf03eb1e8cb8ee7c60", 497604L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-14.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-14.spv", "f26dc72bbe9ccc70e2cc2dc1f4b2a868baf3c2e470b4e76994f98c50674ec3d8", 4268L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-15.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-15.spv", "9487c52cec7e259f4cb212335e84db43c52902b4e3243afcd34305b95ad1b83b", 79128L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-16.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-16.spv", "55c48a8b7627343d996f7818ee6055e143d3b956b8f65911d6b6c337bd8f72ca", 4268L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-17.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-17.spv", "810636645f52d5b8c019206deb046e954af730fc13edaa6a00ebf66e686c3ac0", 79128L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-18.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-18.spv", "a3d130ad8fc6438766f3cdeb7e062d03291a25f6a5e439f71b905795cfc856ec", 4268L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-19.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-19.spv", "e1b576f7e8cedc46615a90f5d2026a43a525a2e43cfc66b62def8e700f55688a", 84476L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-20.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-20.spv", "70c2b7b4e55d665591b2dca3efddb6e99e6d393020722cec635fb8df3bd81bf1", 3596L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-21.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-21.spv", "bb1798794d6c8b0ad3760059bf36e2c396594226c0835202040a4a515a8beb01", 189952L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-22.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-22.spv", "b0545fc4c1886fa0a6252029eb6e3a2f999974bc0bc89539c8d6005c184d8a6f", 3580L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-23.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-23.spv", "e9aee05cec78f0659fa570bfc0f495a51d00d2bc80c4e99cde4106a3df51c35e", 61308L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-24.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-24.spv", "1e93b681a9264afc07f0ab41086474b3afaa2ff8d37b5b75c9ceae005e21e558", 3260L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-25.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-25.spv", "6292dd68a4da9370c7dabb3b192fe6958b1a12daffd92b7fa80ed6fe231e1e5d", 109064L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-26.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-26.spv", "abc2426ff739d25cba4d271cad08ec9f25056ae197a9727b7b7e72467ba49d28", 3224L),
DataFile(Group.CORE, "fsr4/fsr411_full/performance/pass-27.spv", "app/src/main/assets/fsr4/fsr411_full/performance/pass-27.spv", "fa5fc1de4625915c25a637b091f26f32c398f4985a14392a48505cfac111aaea", 125196L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/initializers.bin", "app/src/main/assets/fsr4/fsr411_full/quality/initializers.bin", "a54e552ff69a3f7199861417f7ae461d1f67f636ab532c6ec9d8ea5d2963735a", 131072L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-00.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-00.spv", "d6a01100a56327713d2f7c1a768e41f8a31f2cadce5f37b7dac81630722ff5a2", 33116L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-01.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-01.spv", "759396dc2eccd731bebac13e8818568c8cc410150d24ed4cc01aa8b5ea873fbb", 58172L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-02.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-02.spv", "bdabc7c28f18c31ac8574856a386a268ae4d866f68a65e72b59bf3bad2235132", 3208L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-03.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-03.spv", "bcb4d1d01e33114c68bb13059577c280bb05b5a3af7218fdbc38e99883e0632d", 108840L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-04.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-04.spv", "d85b605d066d89178994ba835b6c3b267ed771de530117a5b9e6103d49e866e7", 3244L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-05.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-05.spv", "e44f0ccd272e4a85ad38894a38db7adae019d18660b166e6c28e82b328d7cc84", 109048L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-06.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-06.spv", "df469b6481234bf7b964a7c0ecf8a5829d84d1bc34fdb7c72e87014f82e31326", 3208L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-07.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-07.spv", "a873b766b2b8923aeb7d325a61cbea251cbac6450e708a23a7714c553ce577ff", 132572L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-08.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-08.spv", "c4aba5b9cd11100308aa2e3d8a4d39e66713c46c35edbe6496552764459a2228", 3580L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-09.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-09.spv", "d757fd28efbd09259f82918de5d3765784933d5b26eea56babe45fd6fefc5cfa", 190032L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-10.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-10.spv", "295873b3ecbd9db40cc4c50ecf15a72964d5846b96642d2e4743a9333382b557", 3580L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-11.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-11.spv", "73e05c6727408d5b1f472112c5d68060e9db9aaf918e892055e6619d5f0e4edc", 190032L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-12.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-12.spv", "007315c42072370919ac393b63a04a0ac025a802f927b490a6749bd6034c15fd", 3596L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-13.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-13.spv", "020929f63d8a70f90bd628a92c50b4049db89155d5e062bf03eb1e8cb8ee7c60", 497604L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-14.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-14.spv", "f26dc72bbe9ccc70e2cc2dc1f4b2a868baf3c2e470b4e76994f98c50674ec3d8", 4268L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-15.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-15.spv", "9487c52cec7e259f4cb212335e84db43c52902b4e3243afcd34305b95ad1b83b", 79128L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-16.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-16.spv", "55c48a8b7627343d996f7818ee6055e143d3b956b8f65911d6b6c337bd8f72ca", 4268L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-17.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-17.spv", "810636645f52d5b8c019206deb046e954af730fc13edaa6a00ebf66e686c3ac0", 79128L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-18.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-18.spv", "a3d130ad8fc6438766f3cdeb7e062d03291a25f6a5e439f71b905795cfc856ec", 4268L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-19.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-19.spv", "e1b576f7e8cedc46615a90f5d2026a43a525a2e43cfc66b62def8e700f55688a", 84476L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-20.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-20.spv", "70c2b7b4e55d665591b2dca3efddb6e99e6d393020722cec635fb8df3bd81bf1", 3596L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-21.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-21.spv", "bb1798794d6c8b0ad3760059bf36e2c396594226c0835202040a4a515a8beb01", 189952L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-22.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-22.spv", "b0545fc4c1886fa0a6252029eb6e3a2f999974bc0bc89539c8d6005c184d8a6f", 3580L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-23.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-23.spv", "e9aee05cec78f0659fa570bfc0f495a51d00d2bc80c4e99cde4106a3df51c35e", 61308L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-24.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-24.spv", "1e93b681a9264afc07f0ab41086474b3afaa2ff8d37b5b75c9ceae005e21e558", 3260L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-25.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-25.spv", "6292dd68a4da9370c7dabb3b192fe6958b1a12daffd92b7fa80ed6fe231e1e5d", 109064L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-26.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-26.spv", "abc2426ff739d25cba4d271cad08ec9f25056ae197a9727b7b7e72467ba49d28", 3224L),
DataFile(Group.CORE, "fsr4/fsr411_full/quality/pass-27.spv", "app/src/main/assets/fsr4/fsr411_full/quality/pass-27.spv", "fa5fc1de4625915c25a637b091f26f32c398f4985a14392a48505cfac111aaea", 125196L),
DataFile(Group.CORE, "fsr4/fsr412_lite/0000.spv", "app/src/main/assets/fsr4/fsr412_lite/0000.spv", "2ec08c00ba47d5812078073c68622101158762b2e885ae965afee39596243840", 97808L),
DataFile(Group.CORE, "fsr4/fsr412_lite/0001.spv", "app/src/main/assets/fsr4/fsr412_lite/0001.spv", "ff1270ab046cd190e9edf0d76cc5d5fda34a27a2de719e8352b4dcaeeed3e3bb", 3456L),
DataFile(Group.CORE, "fsr4/fsr412_lite/0002.spv", "app/src/main/assets/fsr4/fsr412_lite/0002.spv", "c47c6282830916e9314f0153c4abd782736b6cee3992e8db301937b42ec44141", 120964L),
DataFile(Group.CORE, "fsr4/fsr412_lite/0003.spv", "app/src/main/assets/fsr4/fsr412_lite/0003.spv", "0797d2053df579930c2907a3f1e91c8a39c44cae4e471eca4c243075a787d572", 3492L),
DataFile(Group.CORE, "fsr4/fsr412_lite/0004.spv", "app/src/main/assets/fsr4/fsr412_lite/0004.spv", "e7d3651fb730c8b543aaae332f760d352d555e3f8e5899c055b46fc007c80bbc", 3928L),
DataFile(Group.CORE, "fsr4/fsr412_lite/0005.spv", "app/src/main/assets/fsr4/fsr412_lite/0005.spv", "0bacdbf39bead28f5012ca09a6d8243e501b3328065e29c2b5bdfc93f5ae3ffa", 201880L),
DataFile(Group.CORE, "fsr4/fsr412_lite/0006.spv", "app/src/main/assets/fsr4/fsr412_lite/0006.spv", "f58da749701f226994560878cad3b98f01db0557feea4d9445ae84ed6b2049a2", 3892L),
DataFile(Group.CORE, "fsr4/fsr412_lite/0007.spv", "app/src/main/assets/fsr4/fsr412_lite/0007.spv", "c8088556c624f601cb9adf280ba0a4b6fa54068c1f60a0ebc26c11dad81a44c3", 279304L),
DataFile(Group.CORE, "fsr4/fsr412_lite/0008.spv", "app/src/main/assets/fsr4/fsr412_lite/0008.spv", "9e5f48d397020f1fd8706f554adce0adb88641cd06dd054252f1f2f58f1566e5", 3508L),
DataFile(Group.CORE, "fsr4/fsr412_lite/0009.spv", "app/src/main/assets/fsr4/fsr412_lite/0009.spv", "23cc6f3c09546cbca7c70130de931324f9262d13a5f894ebedac78d0e94ef43f", 104052L),
DataFile(Group.CORE, "fsr4/fsr412_lite/0010.spv", "app/src/main/assets/fsr4/fsr412_lite/0010.spv", "a60c0492e22ae608ba9b7e9d479db03ad198a8d9523edb7b65cc0eaef5829a29", 28988L),
DataFile(Group.CORE, "fsr4/fsr412_lite/0013.spv", "app/src/main/assets/fsr4/fsr412_lite/0013.spv", "05bbe60c6a0310044df99f2e7fe6af0b6644780305c98bc6fd6287de7b954cf0", 57232L),
DataFile(Group.CORE, "fsr4/fsr412_lite/fsr412_lite_zc_i8.wpack", "app/src/main/assets/fsr4/fsr412_lite/fsr412_lite_zc_i8.wpack", "5a00ff5e9a444708ce66b17a12fa8ffc2a3bdbd798399a0d26807de121ab2140", 27440L),
DataFile(Group.CORE, "fsr4/fsr412_lite/fsr412_lite_zc_s8.wpack", "app/src/main/assets/fsr4/fsr412_lite/fsr412_lite_zc_s8.wpack", "f45ab49039ad27041ebc6edd76de54d14246693445e53362d94b4a9514ae65a7", 27272L),
DataFile(Group.CORE, "fsr4/fsr412_lite/weights.bin", "app/src/main/assets/fsr4/fsr412_lite/weights.bin", "4b9898da719dc2dca5dc45fd71dec5f80bdb9886a580fe3038af59efe637d55e", 27392L),
DataFile(Group.CORE, "fsr4/sgsr2_activate.spv", "app/src/main/assets/fsr4/sgsr2_activate.spv", "45aabce377d4cc9522ea9d954d9f069e1618ac0c9656ef2be6fd317369ae3140", 13456L),
DataFile(Group.CORE, "fsr4/sgsr2_convert.spv", "app/src/main/assets/fsr4/sgsr2_convert.spv", "71afffb95978f0dc61d3f39f266eb61e5c803b17574a3595726e4c55bb581872", 14600L),
DataFile(Group.CORE, "fsr4/sgsr2_upscale.spv", "app/src/main/assets/fsr4/sgsr2_upscale.spv", "bf7fe1247894919349fef91f8fa41ee256cb58dd7cf87f682db43108f9dcd1ec", 29748L),
// Upstream dropped Intel's XeSS runtime in cb3ae04e (v5.0-r2); DroidDeck keeps fetching it from a0ab6b0f.
DataFile(Group.XESS, "xess/wl_xess_official.dll", "app/src/main/assets/fsr4_bridge/wl_xess_official.dll", "251659dd84a3e84de67c886a4186e01f3eca49b00641906fe38bb6b807e5d5b7", 77795704L, XESS_COMMIT),
DataFile(Group.NPU, "fsr4/adsp/libQnnHtpV79Skel.so", "app/src/main/assets/fsr4/adsp/libQnnHtpV79Skel.so", "974583f0cdc3d42de7a0633c9b987b160ad033a4cd53be30f9b5480b7e5a3213", 11702104L),
DataFile(Group.NPU, "fsr4/adsp/libQnnHtpV81Skel.so", "app/src/main/assets/fsr4/adsp/libQnnHtpV81Skel.so", "a0b9750d900a0afbba240e3506ba63ba91ec0e7f1b3a44de9afbb6818a665a32", 12606648L),
DataFile(Group.NPU, "jni/libQnnHtp.so", "app/src/main/jniLibs/arm64-v8a/libQnnHtp.so", "6e6da5284060ca4369bb6fd3c6f2b661a9cebabb2cf4cf695cd77f558082265f", 3760136L),
DataFile(Group.NPU, "jni/libQnnHtpNetRunExtensions.so", "app/src/main/jniLibs/arm64-v8a/libQnnHtpNetRunExtensions.so", "9776e906cff859504e9e5fd5f9cbb0ec592d9ae6be312ef0650cb95eb8e3aef6", 1383928L),
DataFile(Group.NPU, "jni/libQnnHtpPrepare.so", "app/src/main/jniLibs/arm64-v8a/libQnnHtpPrepare.so", "cd31f94ae79ad402312e75262297d1e1073f85927d95f7905357a10b1d32a263", 87913152L),
DataFile(Group.NPU, "jni/libQnnHtpV79Stub.so", "app/src/main/jniLibs/arm64-v8a/libQnnHtpV79Stub.so", "b3b4cca02e1f2cb5778ef9f18850814358d62a0b90123b25bb2806731a6af8b3", 754480L),
DataFile(Group.NPU, "jni/libQnnHtpV81Stub.so", "app/src/main/jniLibs/arm64-v8a/libQnnHtpV81Stub.so", "16188365d86ef09a9067e8e04b7fa1c604729d1870219b1bbf04ee904e6c3ffa", 777848L),
DataFile(Group.NPU, "jni/libQnnSystem.so", "app/src/main/jniLibs/arm64-v8a/libQnnSystem.so", "4cd077547a939b131c4733391545d64bdc4f9d0c86de78793335ddd18348789e", 4052904L),
)
sealed interface State {
data object Missing : State
data class Downloading(val progress: Float) : State
data object Ready : State
data class Failed(val message: String) : State
}
private val mutableState = MutableStateFlow<State>(State.Missing)
val state: StateFlow<State> = mutableState.asStateFlow()
private val lock = Any()
@Volatile private var busy = false
fun root(context: Context) = File(LinuxRuntime.rootDir(context), GUEST_ROOT.removePrefix("/"))
fun dataDir(context: Context) = File(root(context), "data")
fun bridgesDir(context: Context) = File(root(context), "bridges")
fun runDir(context: Context) = File(LinuxRuntime.rootDir(context), GUEST_RUN.removePrefix("/"))
/** The NPU this phone has: its Hexagon HTP generation and whether its own QNN libraries run it. */
data class Npu(val arch: String, val systemLibs: Boolean)
private val SYSTEM_QNN = listOf("libQnnHtp.so", "libQnnHtpPrepare.so", "libQnnSystem.so")
private val SYSTEM_STUB = Regex("libQnnHtpV(\\d{2,3})Stub\\.so")
/**
* The HTP generation of the phone's own QNN runtime, when the vendor offers it to apps (listed in
* public.libraries.txt): named by its one libQnnHtpV<NN>Stub.so. Null when absent or ambiguous.
*/
internal fun systemNpuArch(libDir: File = File("/vendor/lib64"), publicList: File = File("/vendor/etc/public.libraries.txt")): String? {
val listed = runCatching {
publicList.readLines().map { it.trim() }.filter { it.isNotEmpty() && !it.startsWith("#") }.map { it.substringBefore(' ') }.toSet()
}.getOrNull() ?: return null
if (!SYSTEM_QNN.all { it in listed && File(libDir, it).isFile }) return null
val archs = libDir.list().orEmpty().filter { it in listed }.mapNotNull { SYSTEM_STUB.matchEntire(it)?.groupValues?.get(1) }.distinct()
return archs.singleOrNull()?.let { "v$it" }
}
private val systemNpu: String? by lazy { runCatching { systemNpuArch() }.getOrNull() }
/**
* This phone's NPU, or null. The phone's own QNN runtime first (any HTP generation, nothing to download);
* else the bundled QNN files: v79 on the Snapdragon 8 Elite, v81 on the 8 Elite Gen 5.
*/
fun npu(model: String = SocNames.model()): Npu? {
systemNpu?.let { return Npu(it, systemLibs = true) }
val soc = SocNames.normalizedModel(model)
val arch = when {
soc.startsWith("SM8750") -> "v79"
soc.startsWith("SM8850") || soc.startsWith("SM8845") -> "v81"
else -> null
} ?: return null
val fastrpc = listOf("/dev/fastrpc-cdsp", "/dev/fastrpc-cdsp-secure", "/dev/adsprpc-smd").any { File(it).exists() }
return Npu(arch, systemLibs = false).takeIf { fastrpc }
}
fun npuArch(model: String = SocNames.model()): String? = npu(model)?.arch
fun groups(engine: GameUpscaler.Engine, npu: Boolean = npuArch() != null): Set<Group> = buildSet {
add(Group.CORE)
if (engine == GameUpscaler.Engine.XESS) add(Group.XESS)
if (engine.npu && npu && UpscaleComponent.npu()?.systemLibs != true) add(Group.NPU)
}
/** The bridge DLLs (tools/upscale/bridges/build.sh), each in both Wine PE folders. */
private val BRIDGE_NAMES = listOf(
"_nvngx.dll", "amd_fidelityfx_dx12.dll", "amd_fidelityfx_loader_dx12.dll", "amd_fidelityfx_upscaler_dx12.dll",
"amd_fidelityfx_upscaler_vk.dll", "amd_fidelityfx_vk.dll", "ffx_fsr2_api_x64.dll", "ffx_fsr3upscaler_x64.dll",
"libxess.dll", "nvapi64.dll", "nvngx.dll", "nvngx_dlss.dll",
)
internal val BRIDGE_FILES = listOf("x86_64-windows", "aarch64-windows").flatMap { arch -> BRIDGE_NAMES.map { "$arch/$it" } }
fun filesReady(context: Context, groups: Set<Group>): Boolean =
FILES.filter { it.group in groups }.all { f -> File(dataDir(context), f.relative).let { it.isFile && it.length() == f.size } }
fun bridgesReady(context: Context): Boolean =
BRIDGE_FILES.all { File(bridgesDir(context), it).let { f -> f.isFile && f.length() > 0 } }
/** Everything a game with [groups] needs: the data files and the bridge DLLs. */
fun ready(context: Context, groups: Set<Group>): Boolean = filesReady(context, groups) && bridgesReady(context)
/** Fetches what [groups] still lack (data files, then the bridge DLLs) in the background. */
fun ensure(context: Context, groups: Set<Group>, onDone: (Boolean) -> Unit = {}) {
val app = context.applicationContext
if (ready(app, groups)) {
mutableState.value = State.Ready
onDone(true)
return
}
synchronized(lock) {
if (busy) return
busy = true
}
Thread({
val ok = try {
val files = filesReady(app, groups) || download(app, groups)
// Staged DLLs are refreshed when the pack or local copy changed; a download only when none are staged.
val bridges = files && (if (bridgesReady(app)) stageBridges(app) else fetchBridges(app))
when {
bridges -> mutableState.value = State.Ready
files -> mutableState.value = State.Failed("upscaler DLLs not installed")
}
bridges
} catch (e: Exception) {
Log.w(TAG, "upscaler files not fetched", e)
mutableState.value = State.Failed(e.message ?: e.javaClass.simpleName)
false
} finally {
synchronized(lock) { busy = false }
}
onDone(ok)
}, "upscale-files").start()
}
private fun download(context: Context, groups: Set<Group>): Boolean {
val wanted = FILES.filter { it.group in groups }
val missing = wanted.filter { f -> File(dataDir(context), f.relative).let { !it.isFile || it.length() != f.size } }
val total = missing.sumOf { it.size }.coerceAtLeast(1L)
var done = 0L
mutableState.value = State.Downloading(0f)
for (f in missing) {
val target = File(dataDir(context), f.relative)
target.parentFile?.mkdirs()
val part = File(target.path + ".part")
val ok = copyLocal(context, f, part) || Downloader.downloadFile(f.url, part, true, f.sha256) { p ->
mutableState.value = State.Downloading(((done + p * f.size) / total).coerceIn(0f, 1f))
}
if (!ok || !part.renameTo(target)) {
part.delete()
val reason = Downloader.lastFailure() ?: "could not fetch ${f.relative}"
mutableState.value = State.Failed(reason)
Log.w(TAG, "upscaler file ${f.relative} not fetched: $reason")
return false
}
if (f.group == Group.NPU) {
target.setReadable(true, false)
target.setExecutable(true, false)
}
done += f.size
mutableState.value = State.Downloading((done.toFloat() / total).coerceIn(0f, 1f))
}
Log.i(TAG, "upscaler files ready (${wanted.size} files, groups $groups)")
return true
}
/**
* Folders that may hold a local copy (same layout as the upstream tree): the app's own external
* files folders, readable without any storage permission, then Download/droiddeck-upscale.
*/
@Suppress("DEPRECATION")
private fun localRoots(context: Context): List<File> =
context.getExternalFilesDirs(null).orEmpty().filterNotNull().map { File(it, LOCAL_COPY) } +
File(Environment.getExternalStorageDirectory(), "Download/$LOCAL_COPY")
/** A local copy of [f] (see [localRoots]), used when its SHA-256 matches. */
private fun copyLocal(context: Context, f: DataFile, part: File): Boolean = localRoots(context).any { root ->
runCatching {
val local = File(root, f.relative)
if (!local.isFile || !local.canRead() || local.length() != f.size || sha256(local) != f.sha256) return@runCatching false
local.inputStream().use { input -> part.outputStream().use { output -> input.copyTo(output, 1 shl 20) } }
sha256(part) == f.sha256
}.getOrDefault(false)
}
private fun sha256(file: File): String {
val digest = MessageDigest.getInstance("SHA-256")
file.inputStream().use { input ->
val buffer = ByteArray(1 shl 20)
while (true) {
val n = input.read(buffer)
if (n < 0) break
digest.update(buffer, 0, n)
}
}
return digest.digest().joinToString("") { "%02x".format(it) }
}
/** The add-on pack's bridges/ (fetched now when there is no local copy), staged into the rootfs. */
private fun fetchBridges(context: Context): Boolean {
val pack = AddonPack.UPSCALE
if (!pack.installed(context) && localBridges(context) == null && pack.available) pack.await(context)
return stageBridges(context)
}
/** Content hash of a local bridges/ tree: CI builds every DLL with the same date, and sizes often stay the same. */
internal fun localVersion(source: File): String {
val digest = MessageDigest.getInstance("SHA-256")
for (name in BRIDGE_FILES) {
digest.update(name.toByteArray())
digest.update(sha256(File(source, name)).toByteArray())
}
return digest.digest().take(8).joinToString("") { "%02x".format(it) }
}
/** A complete, readable bridges/ tree in one of [localRoots]: builds without a published pack. */
private fun localBridges(context: Context): File? = localRoots(context).map { File(it, "bridges") }.firstOrNull { dir ->
runCatching { BRIDGE_FILES.all { File(dir, it).let { f -> f.isFile && f.canRead() && f.length() > 0 } } }.getOrDefault(false)
}
/**
* Copies the bridge DLLs from the add-on pack (or the local tree) into the rootfs, once per version. True only
* when every one of [BRIDGE_FILES] is in place afterwards.
*/
@Synchronized
fun stageBridges(context: Context): Boolean {
val packDir = AddonPack.UPSCALE.takeIf { it.installed(context) }?.dir(context)
val pack = packDir?.let { File(it, "bridges") }
val source = pack?.takeIf { dir -> BRIDGE_FILES.all { File(dir, it).isFile } } ?: localBridges(context)
if (source == null) {
val ready = bridgesReady(context)
if (!ready) Log.w(TAG, "upscaler bridges: no add-on pack and no readable local copy")
return ready
}
val version = if (packDir != null && source == pack) packDir.name else "local-" + localVersion(source)
val target = bridgesDir(context)
val stamp = File(target, BRIDGES_STAMP)
if (bridgesReady(context) && runCatching { stamp.readText() }.getOrNull() == version) return true
var copied = 0
for (name in BRIDGE_FILES) {
val from = File(source, name)
val out = File(target, name)
out.parentFile?.mkdirs()
val staged = File(out.path + ".staged")
val ok = runCatching {
from.inputStream().use { input -> staged.outputStream().use { output -> input.copyTo(output) } }
staged.length() == from.length() && staged.renameTo(out)
}.getOrDefault(false)
staged.delete()
if (ok) copied++ else Log.w(TAG, "upscaler bridge $name not staged from $source")
}
val ok = copied == BRIDGE_FILES.size && bridgesReady(context)
if (ok) runCatching { stamp.writeText(version) }
Log.i(TAG, "upscaler bridges staged from $version: $copied/${BRIDGE_FILES.size} files")
return ok
}
/** The bionic layer's manifest (the layer itself is the APK's native library). */
fun bionicLayerDir(context: Context): File {
val dir = File(context.filesDir, "upscale/layer")
val library = File(context.applicationInfo.nativeLibraryDir, LAYER_LIBRARY)
val manifest = """{
"file_format_version": "1.0.0",
"layer": {
"name": "VK_LAYER_DROIDDECK_upscale",
"type": "GLOBAL",
"library_path": "${library.absolutePath}",
"api_version": "1.3.275",
"implementation_version": "1",
"description": "DroidDeck in-game upscaler (FSR 4, XeSS 3, Hexagon NPU)",
"enable_environment": { "DROIDDECK_UPSCALE": "1" },
"disable_environment": { "DROIDDECK_UPSCALE_DISABLE": "1" }
}
}
"""
runCatching {
dir.mkdirs()
val file = File(dir, "VK_LAYER_DROIDDECK_upscale.json")
if (!file.isFile || file.readText() != manifest) file.writeText(manifest)
}.onFailure { Log.w(TAG, "could not write the upscaler layer manifest", it) }
return dir
}
/** Session-wide guest variables: whether NPU engines can run here (and its HTP generation), and the bionic layer's manifest folder. */
fun guestEnv(context: Context): List<String> {
runCatching { runDir(context).mkdirs() }
val here = npu()
return listOfNotNull(
"DROIDDECK_UPSCALE_NPU=" + (if (here != null) "1" else "0"),
here?.let { "DROIDDECK_UPSCALE_HTP_ARCH=${it.arch}" },
"DROIDDECK_UPSCALE_LAYER=" + bionicLayerDir(context).absolutePath,
)
}
/** Fetches what the games set to use the upscaler need, at session start. */
fun prepare(context: Context) {
val config = runCatching { GameEnvironmentStore.read(context) }.getOrNull() ?: return
val choices = config.games.keys.mapNotNull { GameUpscaler.choice(config, it) }
if (choices.isEmpty()) return
// Runs on the session-start thread, before the game copies the DLLs: ensure() returns at once when DLLs are
// staged, so a newer pack or local copy is staged here.
if (bridgesReady(context)) runCatching { stageBridges(context) }.onFailure { Log.w(TAG, "upscaler DLLs not refreshed", it) }
val npu = npuArch() != null
ensure(context, choices.flatMap { groups(it.engine, npu) }.toSet())
}
/** Live switch while a game runs: the layer polls this file (fsr4_layer.c read_live_ctrl). */
fun writeControl(context: Context, engine: GameUpscaler.Engine, sharpness: Int, npuSync: Boolean, enabled: Boolean = true) {
runCatching {
val dir = runDir(context).apply { mkdirs() }
val ctrl = File(dir, "ctrl")
val staged = File(dir, "ctrl.tmp")
val effective = GameUpscaler.effectiveEngine(engine, npuArch() != null)
staged.writeText(GameUpscaler.controlText(effective, sharpness, npuSync, enabled))
staged.renameTo(ctrl)
}.onFailure { Log.w(TAG, "could not write the upscaler control file", it) }
}
/** What the layer reports, if it wrote in the last few seconds. */
fun status(context: Context, nowMs: Long = System.currentTimeMillis()): GameUpscaler.Status? {
val file = File(runDir(context), "status")
if (!file.isFile || nowMs - file.lastModified() > 5000) return null
return runCatching { GameUpscaler.parseStatus(file.readText()) }.getOrNull()
}
fun anyGame(config: GameEnvironment.Config): Boolean = config.games.keys.any { GameUpscaler.choice(config, it) != null }
}
@@ -67,18 +67,13 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.withContext
@Composable
private fun agentPanelFrame(): Modifier =
Modifier.fillMaxWidth().clip(Shape14).background(MaterialTheme.colorScheme.surface)
.border(1.dp, LocalPalette.current.line, Shape14).padding(horizontal = 14.dp, vertical = 10.dp)
/** The model, reasoning effort, permissions and plan mode for the next turns; a conversation keeps going with whatever is chosen. */
@Composable
internal fun AgentModelPicker() {
val context = LocalContext.current
val pal = LocalPalette.current
val models = remember(AgentHost.harness) { AgentHost.models(context) }
Column(agentPanelFrame(), verticalArrangement = Arrangement.spacedBy(10.dp)) {
Column(Modifier.fillMaxWidth().padding(bottom = 10.dp), verticalArrangement = Arrangement.spacedBy(10.dp)) {
Row(horizontalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier.horizontalScroll(rememberScrollState())) {
val choices = listOf(AgentHarness.Model("", stringResource(R.string.agent_model_default))) + models
for (choice in choices) {
@@ -274,8 +269,12 @@ internal fun AgentProcessList(modifier: Modifier) {
@Composable
internal fun AgentUsage() {
val context = LocalContext.current
val colors = MaterialTheme.colorScheme
val pal = LocalPalette.current
Column(agentPanelFrame(), verticalArrangement = Arrangement.spacedBy(8.dp)) {
Column(
Modifier.fillMaxWidth().clip(Shape14).background(colors.surface).border(1.dp, pal.line, Shape14).padding(horizontal = 14.dp, vertical = 10.dp),
verticalArrangement = Arrangement.spacedBy(8.dp),
) {
if (AgentHost.window > 0) UsageRow(
stringResource(R.string.agent_usage_context),
stringResource(R.string.agent_usage_of, tokens(AgentHost.context), tokens(AgentHost.window)),
@@ -211,7 +211,6 @@ private val METRICS = listOf(
HudMetric("showNet", R.string.hud_metric_network),
HudMetric("showResolution", R.string.hud_metric_resolution),
HudMetric("showProton", R.string.hud_metric_proton),
HudMetric("showUpscale", R.string.hud_metric_upscale),
HudMetric("showSession", R.string.hud_metric_session),
HudMetric("showClock", R.string.hud_metric_clock),
)
@@ -88,7 +88,6 @@ import com.droiddeck.launcher.input.SecondScreenDisplay
import com.droiddeck.launcher.core.DownloadSource
import com.droiddeck.launcher.core.PhantomProcessLimit
import com.droiddeck.launcher.core.PhantomProcessStatus
import com.droiddeck.launcher.session.FullscreenMode
import com.droiddeck.launcher.session.SessionPrefs
import kotlin.math.roundToInt
import kotlinx.coroutines.withTimeoutOrNull
@@ -177,8 +176,7 @@ class FrontEndState(
val orientation: Int = android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE,
val launcherOrientation: Int = android.content.pm.ActivityInfo.SCREEN_ORIENTATION_USER,
val homePage: String = com.droiddeck.launcher.core.AppUiPrefs.HOME_PAGE_STEAM,
val launcherFullscreenMode: FullscreenMode = FullscreenMode.ALWAYS,
val sessionFullscreenMode: FullscreenMode = FullscreenMode.ALWAYS,
val launcherFullscreen: Boolean = true,
val launcherFrost: Boolean = false,
val frostWallpaper: Boolean = true,
val frostCards: Boolean = true,
@@ -278,7 +276,7 @@ class FrontEndActions(
val onShareSessionLog: (File) -> Unit = {},
val onSaveSessionLog: (File) -> Unit = {},
val onDeleteSessionLog: (File, () -> Unit) -> Unit = { _, done -> done() },
val onClearLogs: (() -> Unit) -> Unit = {},
val onClearLogs: () -> Unit = {},
val onResetSettings: () -> Unit = {},
val onOffline: () -> Unit,
val onOfflineAuto: () -> Unit = {},
@@ -290,8 +288,7 @@ class FrontEndActions(
val onOrientation: (Int) -> Unit = {},
val onLauncherOrientation: (Int) -> Unit = {},
val onHomePage: (String) -> Unit = {},
val onLauncherFullscreenMode: (FullscreenMode) -> Unit = {},
val onSessionFullscreenMode: (FullscreenMode) -> Unit = {},
val onLauncherFullscreen: (Boolean) -> Unit = {},
val onLauncherFrost: (Boolean) -> Unit = {},
val onFrostWallpaper: (Boolean) -> Unit = {},
val onFrostCards: (Boolean) -> Unit = {},
@@ -714,12 +711,9 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com
if (anyFocused) return
}
}
val launcherFullscreen = s.launcherFullscreenMode.hidesSystemBars(
androidx.compose.ui.platform.LocalConfiguration.current.orientation,
)
androidx.compose.foundation.layout.BoxWithConstraints(
modifier = Modifier.fillMaxSize().background(if (LocalFrost.current != null) Color.Transparent else colors.background)
.windowInsetsPadding(if (launcherFullscreen) WindowInsets.displayCutout else WindowInsets.systemBars)
.windowInsetsPadding(if (s.launcherFullscreen) WindowInsets.displayCutout else WindowInsets.systemBars)
.onFocusChanged { anyFocused = it.hasFocus },
) {
val bottomNavigation = maxHeight > maxWidth
@@ -85,7 +85,6 @@ import com.droiddeck.launcher.core.DeviceSupport
import com.droiddeck.launcher.core.DownloadSource
import com.droiddeck.launcher.core.PhantomProcessLimit
import com.droiddeck.launcher.core.PhantomProcessStatus
import com.droiddeck.launcher.session.FullscreenMode
import com.droiddeck.launcher.session.SessionPrefs
import com.droiddeck.launcher.stores.download.StoreDownloadTier
import com.droiddeck.launcher.R
@@ -587,17 +586,11 @@ internal fun SetupPanel(
SessionPrefs.setOrientation(ctx, "desktop", value)
},
)
val fullscreenModes = FullscreenMode.entries.map { it to stringResource(it.label) }
ChoiceRow(
host, "launcher-fullscreen", stringResource(R.string.setup_launcher_fullscreen),
stringResource(R.string.setup_fullscreen_on),
fullscreenModes, s.launcherFullscreenMode, onPick = a.onLauncherFullscreenMode,
)
ChoiceRow(
host, "session-fullscreen", stringResource(R.string.setup_session_fullscreen),
stringResource(R.string.setup_fullscreen_on),
fullscreenModes, s.sessionFullscreenMode, onPick = a.onSessionFullscreenMode,
)
ToggleRow(
host, "launcher-fullscreen", stringResource(R.string.setup_fullscreen),
if (s.launcherFullscreen) stringResource(R.string.setup_fullscreen_on) else stringResource(R.string.setup_fullscreen_off),
s.launcherFullscreen,
) { a.onLauncherFullscreen(it) }
ToggleRow(
host, "page-swipe", stringResource(R.string.setup_page_swipe),
stringResource(R.string.setup_page_swipe_hint), PageSwipe.on,
@@ -685,102 +678,89 @@ internal fun SetupPanel(
}
}
DEVELOPER_TAB -> {
var manageLogs by rememberSaveable { mutableStateOf(false) }
val devContext = LocalContext.current
SettingsGroup(stringResource(R.string.dev_tools_title)) {
ToggleRow(host, "developer-tools", stringResource(R.string.dev_tools_show), stringResource(R.string.dev_tools_hint), DeveloperTools.on, sideBySide = true) {
DeveloperTools.set(ctx, it)
ToggleRow(host, "developer-tools", stringResource(R.string.dev_tools_title), stringResource(R.string.dev_tools_hint), DeveloperTools.on) {
DeveloperTools.set(devContext, it)
}
if (DeveloperTools.on) ToggleRow(host, "agent-commands", stringResource(R.string.setup_agent_commands), stringResource(R.string.setup_agent_commands_hint), s.agentCommands, sideBySide = true) { a.onAgentCommands() }
if (DeveloperTools.on && com.droiddeck.launcher.agent.AgentHost.available) {
ToggleRow(host, "agent-pet", stringResource(R.string.rail_agent), stringResource(R.string.dev_harness_overlay_hint), AgentPet.enabled, sideBySide = true) {
AgentPet.set(ctx, it)
}
if (AgentPet.enabled && !AgentPet.allowed && AgentPet.usesOverlayWindows(com.droiddeck.launcher.session.QuestExperimental.isSupported())) ActionRow(
stringResource(R.string.setup_agent_pet_float), stringResource(R.string.setup_agent_pet_float_hint),
stringResource(R.string.setup_agent_pet_allow), onClick = { AgentPet.requestFloating(ctx) }, sideBySide = true,
)
}
}
if (DeveloperTools.on) SettingsGroup(stringResource(R.string.dev_group_previews)) {
ActionRow(
if (DeveloperTools.on) ActionRow(
stringResource(R.string.dev_ui_zoo), stringResource(R.string.dev_ui_zoo_hint), stringResource(R.string.dev_ui_zoo_open),
onClick = { DevPreview.zoo = true }, modifier = Modifier.testTag("dev-ui-zoo"), sideBySide = true,
onClick = { DevPreview.zoo = true }, modifier = Modifier.testTag("dev-ui-zoo"),
)
ToggleRow(
if (DeveloperTools.on) ToggleRow(
host, "preview-shortcuts", stringResource(R.string.dev_preview_shortcuts), stringResource(R.string.dev_preview_shortcuts_hint),
DevPreview.shortcuts, sideBySide = true,
) { DevPreview.setShortcuts(ctx, it) }
DevPreview.shortcuts,
) { DevPreview.setShortcuts(devContext, it) }
}
SettingsGroup(stringResource(R.string.dev_group_diagnostics)) {
ToggleRow(host, "logs", stringResource(R.string.setup_logs), stringResource(R.string.setup_logs_hint), s.logsEnabled, sideBySide = true) { a.onLogs() }
SettingsGroup(stringResource(R.string.dev_group_logs)) {
ToggleRow(host, "logs", stringResource(R.string.setup_logs), stringResource(R.string.setup_logs_hint), s.logsEnabled) { a.onLogs() }
if (DeveloperTools.on) ToggleRow(
host, "enhanced-diagnostics", stringResource(R.string.setup_enhanced_diagnostics),
stringResource(R.string.setup_enhanced_diagnostics_hint), s.enhancedDiagnosticsArmed, sideBySide = true,
stringResource(R.string.setup_enhanced_diagnostics_hint), s.enhancedDiagnosticsArmed,
) { a.onEnhancedDiagnostics() }
ToggleRow(
host, "game-debug-logs", stringResource(R.string.setup_game_debug_logs),
stringResource(if (s.gameDebugLogsNeedsRestart) R.string.setup_game_debug_logs_restart else R.string.setup_game_debug_logs_hint),
s.gameDebugLogsEnabled,
enabled = s.logsEnabled, sideBySide = true,
enabled = s.logsEnabled,
) { a.onGameDebugLogs() }
if (DeveloperTools.on) ToggleRow(host, "vacdiag", stringResource(R.string.setup_vac_diag), stringResource(R.string.setup_vac_diag_hint), s.vacDiagnostics, sideBySide = true) { a.onVacDiagnostics() }
if (DeveloperTools.on) ToggleRow(host, "graphics-logs", stringResource(R.string.setup_graphics_logs), stringResource(R.string.setup_graphics_logs_hint), s.graphicsLogs, sideBySide = true) { a.onGraphicsLogs() }
if (DeveloperTools.on && !s.adreno && com.droiddeck.launcher.session.SessionPrefs.steamGpuCompositingAllowed()) ToggleRow(host, "steam-gpu-drawing", stringResource(R.string.setup_steam_gpu_drawing), stringResource(R.string.setup_steam_gpu_drawing_hint), s.steamGpuDrawing, sideBySide = true) { a.onSteamGpuDrawing() }
}
SettingsGroup(stringResource(R.string.dev_group_log_files)) {
ActionRow(stringResource(R.string.setup_latest_logs), stringResource(R.string.drawer_logs_hint), stringResource(R.string.drawer_share_logs), a.onShareLogs,
progress = com.droiddeck.launcher.session.SessionLogShare.progress, sideBySide = true)
ActionRow(
stringResource(R.string.setup_saved_logs), stringResource(R.string.dev_log_manage_hint),
stringResource(if (manageLogs) R.string.common_close else R.string.setup_manage),
onClick = { manageLogs = !manageLogs }, sideBySide = true,
)
if (manageLogs) {
Text(stringResource(R.string.setup_log_sessions), fontSize = 13.sp, fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.padding(horizontal = 14.dp, vertical = 10.dp))
Text(stringResource(R.string.setup_log_export_hint), fontSize = 12.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(start = 14.dp, end = 14.dp, bottom = 8.dp))
val sessionLogs = remember(ctx, logsRefresh) { com.droiddeck.launcher.session.SessionLogShare.sessions(ctx).asReversed() }
if (sessionLogs.isEmpty()) {
Text(stringResource(R.string.setup_log_empty), fontSize = 13.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(horizontal = 14.dp, vertical = 10.dp))
if (DeveloperTools.on) ToggleRow(host, "vacdiag", stringResource(R.string.setup_vac_diag), stringResource(R.string.setup_vac_diag_hint), s.vacDiagnostics) { a.onVacDiagnostics() }
if (DeveloperTools.on) ToggleRow(host, "agent-commands", stringResource(R.string.setup_agent_commands), null, s.agentCommands) { a.onAgentCommands() }
if (DeveloperTools.on && com.droiddeck.launcher.agent.AgentHost.available) {
val agentContext = androidx.compose.ui.platform.LocalContext.current
ToggleRow(host, "agent-pet", stringResource(R.string.setup_agent_pet), stringResource(R.string.setup_agent_pet_hint), AgentPet.enabled) {
AgentPet.set(agentContext, it)
}
sessionLogs.forEach { folder ->
val active = folder == com.droiddeck.launcher.session.SessionPaths.current()
var details by remember(folder) { mutableStateOf<com.droiddeck.launcher.session.SessionLogShare.Details?>(null) }
LaunchedEffect(folder, logsRefresh) {
details = kotlinx.coroutines.withContext(kotlinx.coroutines.Dispatchers.IO) {
com.droiddeck.launcher.session.SessionLogShare.details(folder)
}
}
Column(Modifier.fillMaxWidth().padding(horizontal = 14.dp, vertical = 8.dp)) {
Text(folder.name, fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = MaterialTheme.colorScheme.onBackground,
maxLines = 1, overflow = TextOverflow.Ellipsis)
details?.let { detail ->
Text(
stringResource(R.string.setup_log_size_date,
android.text.format.Formatter.formatShortFileSize(ctx, detail.sizeBytes),
"${android.text.format.DateFormat.getDateFormat(ctx).format(java.util.Date(detail.modifiedAt))} ${android.text.format.DateFormat.getTimeFormat(ctx).format(java.util.Date(detail.modifiedAt))}"),
fontSize = 12.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
if (active) Text(stringResource(R.string.setup_log_current), fontSize = 12.sp, color = MaterialTheme.colorScheme.primary)
Row(Modifier.fillMaxWidth().padding(top = 6.dp), horizontalArrangement = Arrangement.spacedBy(8.dp)) {
SecondaryButton(stringResource(R.string.setup_log_share), enabled = com.droiddeck.launcher.session.SessionLogShare.progress == null, compact = true, modifier = Modifier.weight(1f)) { a.onShareSessionLog(folder) }
SecondaryButton(stringResource(R.string.setup_log_save), enabled = com.droiddeck.launcher.session.SessionLogShare.progress == null, compact = true, modifier = Modifier.weight(1f)) { a.onSaveSessionLog(folder) }
SecondaryButton(stringResource(R.string.setup_log_delete), compact = true, enabled = !active, modifier = Modifier.weight(1f)) { deleteSessionLogs = folder }
}
}
androidx.compose.material3.HorizontalDivider()
}
ActionRow(stringResource(R.string.setup_saved_logs_hint, com.droiddeck.launcher.session.SessionPaths.KEEP_SESSIONS),
null, stringResource(R.string.setup_clear_logs),
onClick = { a.onClearLogs { logsRefresh++ } }, sideBySide = true)
if (AgentPet.enabled && !AgentPet.allowed && AgentPet.usesOverlayWindows(com.droiddeck.launcher.session.QuestExperimental.isSupported())) ActionRow(
stringResource(R.string.setup_agent_pet_float), stringResource(R.string.setup_agent_pet_float_hint),
stringResource(R.string.setup_agent_pet_allow), onClick = { AgentPet.requestFloating(agentContext) },
)
}
}
SettingsGroup(stringResource(R.string.dev_group_reset)) {
if (DeveloperTools.on) ToggleRow(host, "graphics-logs", stringResource(R.string.setup_graphics_logs), stringResource(R.string.setup_graphics_logs_hint), s.graphicsLogs) { a.onGraphicsLogs() }
if (DeveloperTools.on && !s.adreno && com.droiddeck.launcher.session.SessionPrefs.steamGpuCompositingAllowed()) ToggleRow(host, "steam-gpu-drawing", stringResource(R.string.setup_steam_gpu_drawing), stringResource(R.string.setup_steam_gpu_drawing_hint), s.steamGpuDrawing) { a.onSteamGpuDrawing() }
ActionRow(stringResource(R.string.setup_latest_logs), stringResource(R.string.drawer_logs_hint), stringResource(R.string.drawer_share_logs), a.onShareLogs,
progress = com.droiddeck.launcher.session.SessionLogShare.progress)
androidx.compose.material3.HorizontalDivider()
Text(stringResource(R.string.setup_log_sessions), fontSize = 13.sp, fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.padding(horizontal = 14.dp, vertical = 10.dp))
Text(stringResource(R.string.setup_log_export_hint), fontSize = 12.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(start = 14.dp, end = 14.dp, bottom = 8.dp))
val sessionLogs = remember(ctx, logsRefresh) { com.droiddeck.launcher.session.SessionLogShare.sessions(ctx).asReversed() }
if (sessionLogs.isEmpty()) {
Text(stringResource(R.string.setup_log_empty), fontSize = 13.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(horizontal = 14.dp, vertical = 10.dp))
}
sessionLogs.forEach { folder ->
val active = folder == com.droiddeck.launcher.session.SessionPaths.current()
var details by remember(folder) { mutableStateOf<com.droiddeck.launcher.session.SessionLogShare.Details?>(null) }
LaunchedEffect(folder, logsRefresh) {
details = kotlinx.coroutines.withContext(kotlinx.coroutines.Dispatchers.IO) {
com.droiddeck.launcher.session.SessionLogShare.details(folder)
}
}
Column(Modifier.fillMaxWidth().padding(horizontal = 14.dp, vertical = 8.dp)) {
Text(folder.name, fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = MaterialTheme.colorScheme.onBackground,
maxLines = 1, overflow = TextOverflow.Ellipsis)
details?.let { detail ->
Text(
stringResource(R.string.setup_log_size_date,
android.text.format.Formatter.formatShortFileSize(ctx, detail.sizeBytes),
"${android.text.format.DateFormat.getDateFormat(ctx).format(java.util.Date(detail.modifiedAt))} ${android.text.format.DateFormat.getTimeFormat(ctx).format(java.util.Date(detail.modifiedAt))}"),
fontSize = 12.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
if (active) Text(stringResource(R.string.setup_log_current), fontSize = 12.sp, color = MaterialTheme.colorScheme.primary)
Row(Modifier.fillMaxWidth().padding(top = 6.dp), horizontalArrangement = Arrangement.spacedBy(8.dp)) {
SecondaryButton(stringResource(R.string.setup_log_share), enabled = com.droiddeck.launcher.session.SessionLogShare.progress == null, compact = true, modifier = Modifier.weight(1f)) { a.onShareSessionLog(folder) }
SecondaryButton(stringResource(R.string.setup_log_save), enabled = com.droiddeck.launcher.session.SessionLogShare.progress == null, compact = true, modifier = Modifier.weight(1f)) { a.onSaveSessionLog(folder) }
SecondaryButton(stringResource(R.string.setup_log_delete), compact = true, enabled = !active, modifier = Modifier.weight(1f)) { deleteSessionLogs = folder }
}
}
androidx.compose.material3.HorizontalDivider()
}
ActionRow(stringResource(R.string.setup_saved_logs), stringResource(R.string.setup_saved_logs_hint, com.droiddeck.launcher.session.SessionPaths.KEEP_SESSIONS), stringResource(R.string.setup_clear_logs), a.onClearLogs)
ActionRow(stringResource(R.string.setup_reset_settings), stringResource(R.string.setup_reset_settings_hint),
stringResource(R.string.setup_reset_settings_button), a.onResetSettings, sideBySide = true)
stringResource(R.string.setup_reset_settings_button), a.onResetSettings)
}
}
GLASSES_TAB -> GlassesSetupPanel()
@@ -1134,39 +1114,6 @@ internal fun GameSettingsMenus(host: MenuHost, game: com.droiddeck.launcher.fron
save { com.droiddeck.launcher.session.GameEnvironmentStore.setGameResolution(it, scope, choice) }
}
var editResolution by remember(scope) { mutableStateOf(false) }
val upKey = "game-settings-upscale"
val upEngineKey = "game-settings-upscale-engine"
val upSharpKey = "game-settings-upscale-sharp"
val upscale = current?.let { com.droiddeck.launcher.core.GameUpscaler.choice(it, scope) }
val npuHere = remember { com.droiddeck.launcher.session.UpscaleComponent.npuArch() != null }
val upFiles by com.droiddeck.launcher.session.UpscaleComponent.state.collectAsState()
val modeLabels = mapOf(
com.droiddeck.launcher.core.GameUpscaler.Mode.FSR_XESS to stringResource(R.string.game_upscaler_mode_fsr),
com.droiddeck.launcher.core.GameUpscaler.Mode.DLSS to stringResource(R.string.game_upscaler_mode_dlss),
com.droiddeck.launcher.core.GameUpscaler.Mode.NATIVE_FSR4 to stringResource(R.string.game_upscaler_mode_native),
)
val engineLabels = mapOf(
com.droiddeck.launcher.core.GameUpscaler.Engine.FSR4_LITE_GPU to stringResource(R.string.game_upscaler_engine_fsr4_lite),
com.droiddeck.launcher.core.GameUpscaler.Engine.FSR4_FULL_GPU to stringResource(R.string.game_upscaler_engine_fsr4_full),
com.droiddeck.launcher.core.GameUpscaler.Engine.XESS to stringResource(R.string.game_upscaler_engine_xess),
com.droiddeck.launcher.core.GameUpscaler.Engine.BASIC to stringResource(R.string.game_upscaler_engine_basic),
com.droiddeck.launcher.core.GameUpscaler.Engine.SGSR2 to stringResource(R.string.game_upscaler_engine_sgsr2),
com.droiddeck.launcher.core.GameUpscaler.Engine.FSR4_NPU to stringResource(R.string.game_upscaler_engine_fsr4_npu),
com.droiddeck.launcher.core.GameUpscaler.Engine.FSR4_LITE_NPU to stringResource(R.string.game_upscaler_engine_fsr4_lite_npu),
)
val upOff = stringResource(R.string.game_upscaler_off)
val filesLabel = when (val f = upFiles) {
is com.droiddeck.launcher.session.UpscaleComponent.State.Downloading -> stringResource(R.string.game_upscaler_files_downloading, (f.progress * 100).toInt())
is com.droiddeck.launcher.session.UpscaleComponent.State.Failed -> stringResource(R.string.game_upscaler_files_failed, f.message)
else -> if (upscale != null && com.droiddeck.launcher.session.UpscaleComponent.ready(appContext,
com.droiddeck.launcher.session.UpscaleComponent.groups(upscale.engine, npuHere)))
stringResource(R.string.game_upscaler_files_ready) else stringResource(R.string.game_upscaler_files_missing)
}
fun pickUpscale(choice: com.droiddeck.launcher.core.GameUpscaler.Choice?) {
save { com.droiddeck.launcher.session.GameEnvironmentStore.setGameUpscaler(it, scope, choice) }
if (choice != null) com.droiddeck.launcher.session.UpscaleComponent.ensure(appContext,
com.droiddeck.launcher.session.UpscaleComponent.groups(choice.engine, npuHere))
}
AnchoredMenu(host.open == key, onDismiss = { if (host.open == key) host.open = null }, title = stringResource(R.string.game_settings_menu_title, game.name)) { first ->
MenuItem(stringResource(R.string.game_no_steam_title), checked = noSteam, enabled = ready,
detail = stringResource(R.string.game_no_steam_detail), focusRequester = first) {
@@ -1198,37 +1145,6 @@ internal fun GameSettingsMenus(host: MenuHost, game: com.droiddeck.launcher.fron
},
trailing = { Text("›", fontSize = 16.sp, color = colors.onSurfaceVariant) },
) { host.open = syncKey }
MenuItem(
stringResource(R.string.game_upscaler_title), checked = false, enabled = ready,
detail = upscale?.let { modeLabels[it.mode] } ?: upOff,
trailing = { Text("›", fontSize = 16.sp, color = colors.onSurfaceVariant) },
) { host.open = upKey }
if (upscale != null) {
MenuItem(
stringResource(R.string.game_upscaler_engine), checked = false, enabled = ready,
detail = engineLabels[com.droiddeck.launcher.core.GameUpscaler.effectiveEngine(upscale.engine, npuHere)],
trailing = { Text("›", fontSize = 16.sp, color = colors.onSurfaceVariant) },
) { host.open = upEngineKey }
MenuItem(
stringResource(R.string.game_upscaler_sharpness), checked = false, enabled = ready,
detail = stringResource(R.string.game_upscaler_sharpness_value, upscale.sharpness),
trailing = { Text("›", fontSize = 16.sp, color = colors.onSurfaceVariant) },
) { host.open = upSharpKey }
if (upscale.mode == com.droiddeck.launcher.core.GameUpscaler.Mode.DLSS) {
MenuItem(stringResource(R.string.game_upscaler_sigfix), checked = upscale.signatureFix, enabled = ready) {
pickUpscale(upscale.copy(signatureFix = !upscale.signatureFix))
}
}
if (upscale.engine.npu && npuHere) {
MenuItem(stringResource(R.string.game_upscaler_npu_sync), checked = upscale.npuSync, enabled = ready) {
pickUpscale(upscale.copy(npuSync = !upscale.npuSync))
}
}
MenuItem(stringResource(R.string.game_upscaler_files), checked = false, enabled = ready, detail = filesLabel) {
com.droiddeck.launcher.session.UpscaleComponent.ensure(appContext,
com.droiddeck.launcher.session.UpscaleComponent.groups(upscale.engine, npuHere))
}
}
}
MenuItem(stringResource(R.string.game_settings_default), checked = false, enabled = ready,
detail = stringResource(R.string.game_settings_default_detail)) {
@@ -1245,36 +1161,6 @@ internal fun GameSettingsMenus(host: MenuHost, game: com.droiddeck.launcher.fron
}
}
}
AnchoredMenu(host.open == upKey, onDismiss = { if (host.open == upKey) host.open = null }, title = stringResource(R.string.game_upscaler_title)) { first ->
MenuItem(upOff, checked = upscale == null, enabled = ready, focusRequester = first) {
host.open = key
pickUpscale(null)
}
com.droiddeck.launcher.core.GameUpscaler.Mode.entries.forEach { mode ->
MenuItem(modeLabels.getValue(mode), checked = upscale?.mode == mode, enabled = ready) {
host.open = key
pickUpscale((upscale ?: com.droiddeck.launcher.core.GameUpscaler.Choice(mode)).copy(mode = mode))
}
}
}
AnchoredMenu(host.open == upEngineKey, onDismiss = { if (host.open == upEngineKey) host.open = null }, title = stringResource(R.string.game_upscaler_engine)) { first ->
com.droiddeck.launcher.core.GameUpscaler.Engine.entries.filter { !it.npu || npuHere }.forEachIndexed { index, engine ->
MenuItem(engineLabels.getValue(engine), checked = upscale?.engine == engine, enabled = ready && upscale != null,
focusRequester = if (index == 0) first else null) {
host.open = key
upscale?.let { pickUpscale(it.copy(engine = engine)) }
}
}
}
AnchoredMenu(host.open == upSharpKey, onDismiss = { if (host.open == upSharpKey) host.open = null }, title = stringResource(R.string.game_upscaler_sharpness)) { first ->
com.droiddeck.launcher.core.GameUpscaler.sharpnessSteps.forEachIndexed { index, value ->
MenuItem(stringResource(R.string.game_upscaler_sharpness_value, value), checked = upscale?.sharpness == value,
enabled = ready && upscale != null, focusRequester = if (index == 0) first else null) {
host.open = key
upscale?.let { pickUpscale(it.copy(sharpness = value)) }
}
}
}
AnchoredMenu(host.open == resKey, onDismiss = { if (host.open == resKey) host.open = null }, title = stringResource(R.string.game_res_title)) { first ->
MenuItem(matchScreen, checked = resolution == null, enabled = ready, focusRequester = first) { pickResolution(null) }
com.droiddeck.launcher.core.GameResolution.scales.forEach { scale ->
@@ -177,7 +177,6 @@ import com.droiddeck.launcher.gpu.ScreenEffectLooks
import com.droiddeck.launcher.gpu.Cardboard
import com.droiddeck.launcher.gpu.SteamVr
import com.droiddeck.launcher.gpu.ScreenEffects
import com.droiddeck.launcher.session.FullscreenMode
import com.droiddeck.launcher.session.SessionPrefs
import com.droiddeck.launcher.session.ComponentsManager
import com.droiddeck.launcher.input.PC_KEY_GROUP_IDS
@@ -407,8 +406,6 @@ class DrawerActions(
val paused: Boolean = false,
val orientation: Int = android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE,
val onOrientation: (Int) -> Unit = {},
val fullscreenMode: FullscreenMode = FullscreenMode.ALWAYS,
val onFullscreenMode: (FullscreenMode) -> Unit = {},
val onResume: () -> Unit = {},
val onPipAutoEnter: (Boolean) -> Unit = {},
val unfoldedControls: Boolean? = null,
@@ -1012,10 +1009,6 @@ private fun DrawerDisplayPage(host: MenuHost, a: DrawerActions, track: (String)
if (a.gameZoomAvailable) GameZoomRow(a.gameZoom, track, a.onGameZoom)
ChoiceRow(host, "orientation", stringResource(R.string.setup_session_orientation), null,
orientations, a.orientation, chipModifier = track("orientation"), onPick = a.onOrientation)
ChoiceRow(host, "session-fullscreen", stringResource(R.string.setup_session_fullscreen),
stringResource(R.string.setup_fullscreen_on),
FullscreenMode.entries.map { it to stringResource(it.label) }, a.fullscreenMode,
chipModifier = track("session-fullscreen"), onPick = a.onFullscreenMode)
if (a.steam) PicturePositionRow(host, a.picturePosition, track("picture-position"), onPick = a.onPicturePosition)
}
val filters = SessionPrefs.upscalerChoices(LocalContext.current)
@@ -1113,7 +1106,6 @@ private fun DrawerGamePage(host: MenuHost, a: DrawerActions, track: (String) ->
color = colors.onSurfaceVariant, modifier = Modifier.padding(horizontal = 10.dp, vertical = 8.dp))
}
TextureFilteringGroup(host, a, track)
if (a.steam || a.direct) DrawerUpscalerGroup(host, a, track)
ComponentsDrawerPage(host, a, track)
ComponentDownloadsDrawerGroup(
host = host,
@@ -1918,52 +1910,6 @@ private fun TextureFilteringGroup(host: MenuHost, a: DrawerActions, track: (Stri
}
}
/** The selected game's in-game upscaler: engine and sharpness switch live (the layer polls its control file). */
@Composable
private fun DrawerUpscalerGroup(host: MenuHost, a: DrawerActions, track: (String) -> Modifier) {
val appId = a.selectedGameProfileId ?: return
val context = LocalContext.current.applicationContext
val scope = appId.toString()
var choice by remember(scope) {
mutableStateOf(runCatching { com.droiddeck.launcher.core.GameUpscaler.choice(com.droiddeck.launcher.session.GameEnvironmentStore.read(context), scope) }.getOrNull())
}
val current = choice ?: return
val npuHere = remember { com.droiddeck.launcher.session.UpscaleComponent.npuArch() != null }
var status by remember { mutableStateOf<com.droiddeck.launcher.core.GameUpscaler.Status?>(null) }
LaunchedEffect(scope) {
while (true) {
status = kotlinx.coroutines.withContext(kotlinx.coroutines.Dispatchers.IO) { com.droiddeck.launcher.session.UpscaleComponent.status(context) }
delay(1000)
}
}
val engines = com.droiddeck.launcher.core.GameUpscaler.Engine.entries.filter { !it.npu || npuHere }.map { engine ->
engine to stringResource(when (engine) {
com.droiddeck.launcher.core.GameUpscaler.Engine.FSR4_LITE_GPU -> R.string.game_upscaler_engine_fsr4_lite
com.droiddeck.launcher.core.GameUpscaler.Engine.FSR4_FULL_GPU -> R.string.game_upscaler_engine_fsr4_full
com.droiddeck.launcher.core.GameUpscaler.Engine.XESS -> R.string.game_upscaler_engine_xess
com.droiddeck.launcher.core.GameUpscaler.Engine.BASIC -> R.string.game_upscaler_engine_basic
com.droiddeck.launcher.core.GameUpscaler.Engine.SGSR2 -> R.string.game_upscaler_engine_sgsr2
com.droiddeck.launcher.core.GameUpscaler.Engine.FSR4_NPU -> R.string.game_upscaler_engine_fsr4_npu
com.droiddeck.launcher.core.GameUpscaler.Engine.FSR4_LITE_NPU -> R.string.game_upscaler_engine_fsr4_lite_npu
})
}
val sharpness = com.droiddeck.launcher.core.GameUpscaler.sharpnessSteps.map { it to stringResource(R.string.game_upscaler_sharpness_value, it) }
fun applyChoice(next: com.droiddeck.launcher.core.GameUpscaler.Choice) {
choice = next
Thread({
com.droiddeck.launcher.session.UpscaleComponent.writeControl(context, next.engine, next.sharpness, next.npuSync)
runCatching { com.droiddeck.launcher.session.GameEnvironmentStore.setGameUpscaler(context, scope, next) }
}, "upscale-live").start()
}
SettingsGroup(stringResource(R.string.game_upscaler_title)) {
ChoiceRow(host, "upscale-engine", stringResource(R.string.game_upscaler_engine),
status?.let { "${it.backendTag} · ${it.render} → ${it.output} · " + String.format(java.util.Locale.ROOT, "%.1f ms", if (it.npu) it.npuMs else it.gpuMs) },
engines, current.engine, chipModifier = track("upscale-engine")) { engine -> applyChoice(current.copy(engine = engine)) }
ChoiceRow(host, "upscale-sharpness", stringResource(R.string.game_upscaler_sharpness), null,
sharpness, current.sharpness, chipModifier = track("upscale-sharpness")) { value -> applyChoice(current.copy(sharpness = value)) }
}
}
private fun signed(v: Int) = if (v > 0) "+$v" else "$v"
@Composable
@@ -116,8 +116,7 @@ internal object SettingsIndex {
s(SettingsSection.LAUNCHER, R.string.setup_home, "home screen", "launcher"),
s(SettingsSection.LAUNCHER, R.string.setup_launcher_orientation, "rotate", "portrait"),
s(SettingsSection.LAUNCHER, R.string.setup_session_orientation, "rotate", "portrait"),
s(SettingsSection.LAUNCHER, R.string.setup_launcher_fullscreen, "status bar", "navigation bar", "portrait"),
s(SettingsSection.LAUNCHER, R.string.setup_session_fullscreen, "status bar", "navigation bar", "portrait"),
s(SettingsSection.LAUNCHER, R.string.setup_fullscreen),
s(SettingsSection.LAUNCHER, R.string.setup_page_swipe, "gesture"),
s(SettingsSection.LAUNCHER, R.string.setup_controller_haptics, "vibration", "rumble"),
s(SettingsSection.LAUNCHER, R.string.setup_dual_screen_launcher, "thor", "second screen", "bottom screen"),
@@ -131,8 +130,7 @@ internal object SettingsIndex {
s(SettingsSection.DEVELOPER, R.string.setup_game_debug_logs, "logs", "wine", "proton"),
SettingsEntry(SettingsPlace.SETTINGS, R.string.setup_enhanced_diagnostics, section = SettingsSection.DEVELOPER, words = listOf("logs"), developer = true),
s(SettingsSection.DEVELOPER, R.string.setup_reset_settings, "default"),
s(SettingsSection.DEVELOPER, R.string.dev_tools_show, "agent", "ai", "claude", "codex"),
SettingsEntry(SettingsPlace.SETTINGS, R.string.setup_agent_commands, section = SettingsSection.DEVELOPER, words = listOf("debugging tools", "cli"), developer = true),
s(SettingsSection.DEVELOPER, R.string.dev_tools_title, "agent", "ai", "claude", "codex"),
SettingsEntry(SettingsPlace.SETTINGS, R.string.setup_graphics_logs, section = SettingsSection.DEVELOPER, words = listOf("logs", "gpu"), developer = true),
d(R.string.drawer_page_display, R.string.drawer_frame_limit, "fps", "cap", "limit", "non-steam", "desktop"),
@@ -526,7 +526,7 @@ fun SettingsGroup(title: String, compact: Boolean = false, detail: String? = nul
}
@Composable
fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hintLines: Int? = null, stacked: Boolean = false, tightControlSpacing: Boolean = false, sideBySide: Boolean = false, control: @Composable () -> Unit) {
fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hintLines: Int? = null, stacked: Boolean = false, tightControlSpacing: Boolean = false, control: @Composable () -> Unit) {
val compact = LocalCompactSettings.current
val colors = MaterialTheme.colorScheme
val pal = LocalPalette.current
@@ -536,7 +536,7 @@ fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hint
lineHeight = if (compact) 14.sp else androidx.compose.ui.unit.TextUnit.Unspecified,
minLines = hintLines ?: 1, maxLines = hintLines ?: Int.MAX_VALUE, overflow = TextOverflow.Ellipsis)
}
if (compact && !stacked && !sideBySide) Column(
if (compact && !stacked) Column(
modifier = Modifier.searchTarget(label).fillMaxWidth().background(bg).padding(horizontal = 10.dp, vertical = 6.dp),
) {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
@@ -545,7 +545,7 @@ fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hint
control()
}
if (hint != null || hintLines != null) hintText(11.sp)
} else if (stacked || (LocalNarrowPane.current && !sideBySide)) Column(
} else if (stacked || LocalNarrowPane.current) Column(
modifier = Modifier.searchTarget(label).fillMaxWidth().background(bg).padding(
horizontal = if (compact) 10.dp else 14.dp,
vertical = if (tightControlSpacing) 2.dp else if (compact) 6.dp else 12.dp),
@@ -613,8 +613,8 @@ fun UncertainMark(description: String) {
}
@Composable
fun ToggleRow(host: MenuHost, key: String, label: String, hint: String?, checked: Boolean, enabled: Boolean = true, chipModifier: Modifier = Modifier, sideBySide: Boolean = false, onChange: (Boolean) -> Unit) =
SettingsRow(label, hint, sideBySide = sideBySide) {
fun ToggleRow(host: MenuHost, key: String, label: String, hint: String?, checked: Boolean, enabled: Boolean = true, chipModifier: Modifier = Modifier, onChange: (Boolean) -> Unit) =
SettingsRow(label, hint) {
ToggleSwitch(checked, enabled, label, chipModifier.testTag("setting-$key")) { host.open = null; onChange(it) }
}
@@ -774,10 +774,8 @@ fun MultiRow(
}
@Composable
fun ActionRow(label: String, hint: String?, button: String, onClick: () -> Unit, progress: Float? = null, modifier: Modifier = Modifier, sideBySide: Boolean = false) {
SettingsRow(label, hint, sideBySide = sideBySide) {
SecondaryButton(button, compact = sideBySide, modifier = modifier, progress = progress, onClick = onClick)
}
fun ActionRow(label: String, hint: String?, button: String, onClick: () -> Unit, progress: Float? = null, modifier: Modifier = Modifier) {
SettingsRow(label, hint) { SecondaryButton(button, modifier = modifier, progress = progress, onClick = onClick) }
}
@Composable
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="#AAB6C8" />
<item android:color="#F4F7FC" />
</selector>
@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<shape><corners android:radius="7dp" /><solid android:color="#303845" /></shape>
</item>
<item android:state_pressed="true">
<shape><corners android:radius="7dp" /><solid android:color="#556783" /></shape>
</item>
<item android:state_focused="true">
<shape><corners android:radius="7dp" /><solid android:color="#414E62" /><stroke android:width="2dp" android:color="#A7CCFF" /></shape>
</item>
<item>
<shape><corners android:radius="7dp" /><solid android:color="#414E62" /></shape>
</item>
</selector>
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:radius="10dp" />
<solid android:color="#202630" />
</shape>
@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="horizontal" android:gravity="center_vertical" android:layoutDirection="ltr"
android:background="@drawable/wireless_pairing_panel" android:paddingHorizontal="3dp" android:paddingVertical="1dp">
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical">
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<Button style="@style/DroidDeckPairKey" android:id="@+id/pair_key_1" android:text="1" />
<Button style="@style/DroidDeckPairKey" android:id="@+id/pair_key_2" android:text="2" />
<Button style="@style/DroidDeckPairKey" android:id="@+id/pair_key_3" android:text="3" />
</LinearLayout>
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<Button style="@style/DroidDeckPairKey" android:id="@+id/pair_key_7" android:text="7" />
<Button style="@style/DroidDeckPairKey" android:id="@+id/pair_key_8" android:text="8" />
<Button style="@style/DroidDeckPairKey" android:id="@+id/pair_key_9" android:text="9" />
</LinearLayout>
</LinearLayout>
<TextView android:id="@+id/pair_key_code"
android:layout_width="76dp" android:layout_height="38dp"
android:gravity="center" android:maxLines="1" android:scrollHorizontally="false"
android:fontFamily="monospace" android:textStyle="bold"
android:includeFontPadding="false" android:textColor="#F4F7FC"
android:autoSizeTextType="uniform" android:autoSizeMinTextSize="10sp"
android:autoSizeMaxTextSize="17sp" android:autoSizeStepGranularity="1sp" />
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical">
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<Button style="@style/DroidDeckPairKey" android:id="@+id/pair_key_4" android:text="4" />
<Button style="@style/DroidDeckPairKey" android:id="@+id/pair_key_5" android:text="5" />
<Button style="@style/DroidDeckPairKey" android:id="@+id/pair_key_6" android:text="6" />
</LinearLayout>
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<Button style="@style/DroidDeckPairKey" android:id="@+id/pair_key_0" android:text="0" />
<Button style="@style/DroidDeckPairKey" android:id="@+id/pair_key_delete" android:text="⌫" android:contentDescription="@string/adbpair_keypad_delete" />
<Button style="@style/DroidDeckPairKey" android:id="@+id/pair_key_submit" android:text="✓" android:contentDescription="@string/agent_action_pair" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
+2
View File
@@ -891,6 +891,7 @@
<string name="setup_game_debug_logs_hint">تضمين بيانات تشخيص Proton وWine والرسومات عند تشغيل اللعبة التالية. قد يقلّل الأداء ويستهلك مساحة تخزين أكبر.</string>
<string name="setup_game_debug_logs_restart">أعِد تشغيل هذه الجلسة لحفظ سجلات تصحيح الألعاب</string>
<string name="setup_logging_update_failed">تعذّر تحديث التسجيل. تحقّق من المفتاح وحاول مرة أخرى.</string>
<string name="setup_agent_commands">أدوات تصحيح الأخطاء</string>
<string name="setup_graphics_logs">سجلات رسوميات مفصلة</string>
<string name="setup_steam_gpu_drawing">واجهة Steam: الرسم عبر GPU</string>
<string name="setup_steam_gpu_drawing_hint">مع زوج مشغّلات Xclipse، ترسم Steam صفحاتها برمجيًا (أظهر الرسم عبر GPU مربعات مشوهة). شغّله للحصول على واجهة Steam أسرع إذا بدت الصورة سليمة على هذا الهاتف.</string>
@@ -2418,6 +2419,7 @@
<string name="adbpair_waiting_text">فعِّل تصحيح الأخطاء اللاسلكي، ثم اضغط على «إقران الجهاز برمز الإقران».</string>
<string name="adbpair_waiting_long">فعِّل تصحيح الأخطاء اللاسلكي، ثم اضغط على «إقران الجهاز برمز الإقران». ابقَ في الإعدادات: يُكتب الرمز في هذا الإشعار.</string>
<string name="adbpair_code_label">رمز الإقران المكوَّن من 6 أرقام</string>
<string name="adbpair_code_hint">اضغط على «إدخال الرمز» وأدخِل الأرقام الستة الظاهرة في الإعدادات.</string>
<string name="adbpair_title_code">أدخِل رمز إقران Wi-Fi</string>
<string name="adbpair_title_retry">أعِد تجربة الرمز</string>
<string name="adbpair_enter_code">إدخال الرمز</string>
@@ -909,6 +909,7 @@
<string name="setup_game_debug_logs_hint">Incluye diagnósticos de Proton, Wine y gráficos en el próximo inicio de un juego. Puede reducir el rendimiento y usar más almacenamiento.</string>
<string name="setup_game_debug_logs_restart">Reinicia esta sesión para guardar los registros de depuración de juegos</string>
<string name="setup_logging_update_failed">No se pudo actualizar el registro. Revisa el interruptor e inténtalo de nuevo.</string>
<string name="setup_agent_commands">Herramientas de depuración</string>
<string name="setup_graphics_logs">Registros detallados de gráficos</string>
<string name="setup_steam_gpu_drawing">Interfaz de Steam: dibujo con GPU</string>
<string name="setup_steam_gpu_drawing_hint">Con el par de controladores Xclipse, Steam dibuja sus páginas por software (el dibujo con GPU mostraba mosaicos con errores). Actívalo para una interfaz de Steam más rápida si se ve bien en este teléfono.</string>
@@ -2410,6 +2411,7 @@
<string name="adbpair_waiting_text">Activa la Depuración inalámbrica y toca “Vincular dispositivo con código de vinculación”.</string>
<string name="adbpair_waiting_long">Activa la Depuración inalámbrica y toca “Vincular dispositivo con código de vinculación”. Quédate en Ajustes: el código se ingresa en esta notificación.</string>
<string name="adbpair_code_label">Código de vinculación de 6 dígitos</string>
<string name="adbpair_code_hint">Toca Ingresar código y escribe los 6 dígitos que muestra Ajustes.</string>
<string name="adbpair_title_code">Ingresa el código de vinculación Wi-Fi</string>
<string name="adbpair_title_retry">Vuelve a probar el código</string>
<string name="adbpair_enter_code">Ingresar código</string>
+2
View File
@@ -879,6 +879,7 @@
<string name="setup_game_debug_logs_hint">Включва диагностика на Proton, Wine и графиката при следващото стартиране на игра. Може да намали производителността и да заеме повече място.</string>
<string name="setup_game_debug_logs_restart">Рестартирайте тази сесия, за да запазите дневниците за дебъгване на игри</string>
<string name="setup_logging_update_failed">Записването в дневник не можа да бъде променено. Проверете превключвателя и опитайте пак.</string>
<string name="setup_agent_commands">Инструменти за отстраняване на грешки</string>
<string name="setup_graphics_logs">Подробни дневници за графиката</string>
<string name="setup_steam_gpu_drawing">Интерфейс на Steam: изрисуване чрез GPU</string>
<string name="setup_steam_gpu_drawing_hint">При двойката драйвери Xclipse Steam изрисува страниците си софтуерно (изрисуването чрез GPU даваше разбити плочки). Включи за по-бърз интерфейс на Steam, ако изглежда правилно на този телефон.</string>
@@ -2314,6 +2315,7 @@
<string name="adbpair_waiting_text">Включи безжичното отстраняване на грешки, после докосни „Чифтосване на устройство с код за чифтосване“.</string>
<string name="adbpair_waiting_long">Включи безжичното отстраняване на грешки, после докосни „Чифтосване на устройство с код за чифтосване“. Остани в Настройки: кодът ще се появи в това известие.</string>
<string name="adbpair_code_label">6-цифрен код за чифтосване</string>
<string name="adbpair_code_hint">Докосни „Въвеждане на код“ и напиши 6-те цифри, показани в Настройки.</string>
<string name="adbpair_title_code">Въведи кода за чифтосване по Wi-Fi</string>
<string name="adbpair_title_retry">Опитай кода отново</string>
<string name="adbpair_enter_code">Въвеждане на код</string>
+2
View File
@@ -885,6 +885,7 @@
<string name="setup_game_debug_logs_hint">Při dalším spuštění hry zahrnout diagnostiku Protonu, Wine a grafiky. Může snížit výkon a zabrat více úložiště.</string>
<string name="setup_game_debug_logs_restart">Pro ukládání ladicích protokolů her restartujte tuto relaci</string>
<string name="setup_logging_update_failed">Protokolování se nepodařilo změnit. Zkontrolujte přepínač a zkuste to znovu.</string>
<string name="setup_agent_commands">Nástroje pro ladění</string>
<string name="setup_graphics_logs">Podrobné protokoly grafiky</string>
<string name="setup_steam_gpu_drawing">Rozhraní Steam: vykreslování na GPU</string>
<string name="setup_steam_gpu_drawing_hint">S párem ovladačů Xclipse vykresluje Steam své stránky softwarově (vykreslování na GPU zobrazovalo poškozené dlaždice). Pokud na tomto telefonu vypadá správně, zapněte tuto možnost pro rychlejší rozhraní Steam.</string>
@@ -2366,6 +2367,7 @@
<string name="adbpair_waiting_text">Zapněte bezdrátové ladění a pak klepněte na „Párování zařízení pomocí párovacího kódu“.</string>
<string name="adbpair_waiting_long">Zapněte bezdrátové ladění a pak klepněte na „Párování zařízení pomocí párovacího kódu“. Zůstaňte v Nastavení: kód se zobrazí v tomto oznámení.</string>
<string name="adbpair_code_label">6místný párovací kód</string>
<string name="adbpair_code_hint">Klepněte na Zadat kód a napište 6 číslic zobrazených v Nastavení.</string>
<string name="adbpair_title_code">Zadejte párovací kód Wi-Fi</string>
<string name="adbpair_title_retry">Zkusit kód znovu</string>
<string name="adbpair_enter_code">Zadat kód</string>
+2
View File
@@ -879,6 +879,7 @@
<string name="setup_game_debug_logs_hint">Medtag Proton-, Wine- og grafikdiagnostik ved næste spilstart. Kan reducere ydelsen og bruge mere lagerplads.</string>
<string name="setup_game_debug_logs_restart">Genstart denne session for at gemme fejlfindingslogs for spil</string>
<string name="setup_logging_update_failed">Kunne ikke opdatere logning. Tjek kontakten, og prøv igen.</string>
<string name="setup_agent_commands">Fejlfindingsværktøjer</string>
<string name="setup_graphics_logs">Detaljerede grafiklogfiler</string>
<string name="setup_steam_gpu_drawing">Steam-brugerflade: GPU-tegning</string>
<string name="setup_steam_gpu_drawing_hint">Med Xclipse-driverparret tegner Steam sine sider i software (GPU-tegning gav ødelagte fliser). Slå til for en hurtigere Steam-brugerflade, hvis det ser rigtigt ud på denne telefon.</string>
@@ -2314,6 +2315,7 @@
<string name="adbpair_waiting_text">Tænd Trådløs fejlretning, og tryk derefter på „Par enhed med parringskode“.</string>
<string name="adbpair_waiting_long">Tænd Trådløs fejlretning, og tryk derefter på „Par enhed med parringskode“. Bliv i Indstillinger: koden vises i denne notifikation.</string>
<string name="adbpair_code_label">6-cifret parringskode</string>
<string name="adbpair_code_hint">Tryk på Indtast kode, og skriv de 6 cifre, der vises i Indstillinger.</string>
<string name="adbpair_title_code">Indtast Wi-Fi-parringskoden</string>
<string name="adbpair_title_retry">Forsøg koden igen</string>
<string name="adbpair_enter_code">Indtast kode</string>
+2
View File
@@ -879,6 +879,7 @@
<string name="setup_game_debug_logs_hint">Beim nächsten Spielstart Diagnosen von Proton, Wine und Grafik einschließen. Kann die Leistung mindern und mehr Speicher belegen.</string>
<string name="setup_game_debug_logs_restart">Starte diese Sitzung neu, um Spiel-Debug-Logs zu speichern</string>
<string name="setup_logging_update_failed">Protokollierung konnte nicht aktualisiert werden. Prüfe den Schalter und versuch es erneut.</string>
<string name="setup_agent_commands">Debugging-Tools</string>
<string name="setup_graphics_logs">Detaillierte Grafik-Protokolle</string>
<string name="setup_steam_gpu_drawing">Steam-Oberfläche: Zeichnen mit der GPU</string>
<string name="setup_steam_gpu_drawing_hint">Mit dem Xclipse-Treiberpaar zeichnet Steam seine Seiten per Software (Zeichnen mit der GPU zeigte fehlerhafte Kacheln). Für eine schnellere Steam-Oberfläche einschalten, wenn die Darstellung auf diesem Telefon stimmt.</string>
@@ -2306,6 +2307,7 @@
<string name="adbpair_waiting_text">Aktiviere Debugging über WLAN und tippe dann auf „Gerät mit Kopplungscode koppeln“.</string>
<string name="adbpair_waiting_long">Aktiviere Debugging über WLAN und tippe dann auf „Gerät mit Kopplungscode koppeln“. Bleib in den Einstellungen: Der Code wird in dieser Benachrichtigung eingegeben.</string>
<string name="adbpair_code_label">6-stelliger Kopplungscode</string>
<string name="adbpair_code_hint">Tippe auf „Code eingeben“ und gib die 6 Ziffern aus den Einstellungen ein.</string>
<string name="adbpair_title_code">WLAN-Kopplungscode eingeben</string>
<string name="adbpair_title_retry">Code noch einmal eingeben</string>
<string name="adbpair_enter_code">Code eingeben</string>
+2
View File
@@ -879,6 +879,7 @@
<string name="setup_game_debug_logs_hint">Συμπερίληψη διαγνωστικών Proton, Wine και γραφικών στην επόμενη εκκίνηση παιχνιδιού. Μπορεί να μειώσει την απόδοση και να χρησιμοποιήσει περισσότερο χώρο.</string>
<string name="setup_game_debug_logs_restart">Επανεκκινήστε αυτή τη συνεδρία για να αποθηκεύσετε αρχεία καταγραφής εντοπισμού σφαλμάτων παιχνιδιών</string>
<string name="setup_logging_update_failed">Δεν ήταν δυνατή η ενημέρωση της καταγραφής. Ελέγξτε τον διακόπτη και δοκιμάστε ξανά.</string>
<string name="setup_agent_commands">Εργαλεία εντοπισμού σφαλμάτων</string>
<string name="setup_graphics_logs">Λεπτομερή αρχεία καταγραφής γραφικών</string>
<string name="setup_steam_gpu_drawing">Διεπαφή Steam: σχεδίαση με GPU</string>
<string name="setup_steam_gpu_drawing_hint">Με το ζεύγος προγραμμάτων οδήγησης Xclipse, το Steam σχεδιάζει τις σελίδες του μέσω λογισμικού (η σχεδίαση με GPU εμφάνιζε σπασμένα πλακίδια). Ενεργοποιήστε το για ταχύτερη διεπαφή Steam, αν φαίνεται σωστή σε αυτό το τηλέφωνο.</string>
@@ -2314,6 +2315,7 @@
<string name="adbpair_waiting_text">Ενεργοποιήστε τον ασύρματο εντοπισμό σφαλμάτων και πατήστε «Σύζευξη συσκευής με κωδικό σύζευξης».</string>
<string name="adbpair_waiting_long">Ενεργοποιήστε τον ασύρματο εντοπισμό σφαλμάτων και πατήστε «Σύζευξη συσκευής με κωδικό σύζευξης». Παραμείνετε στις Ρυθμίσεις: ο κωδικός εμφανίζεται σε αυτή την ειδοποίηση.</string>
<string name="adbpair_code_label">Εξαψήφιος κωδικός σύζευξης</string>
<string name="adbpair_code_hint">Πατήστε Εισαγωγή κωδικού και πληκτρολογήστε τα 6 ψηφία που εμφανίζονται στις Ρυθμίσεις.</string>
<string name="adbpair_title_code">Εισαγάγετε τον κωδικό σύζευξης Wi-Fi</string>
<string name="adbpair_title_retry">Δοκιμάστε ξανά τον κωδικό</string>
<string name="adbpair_enter_code">Εισαγωγή κωδικού</string>
+2
View File
@@ -882,6 +882,7 @@
<string name="setup_game_debug_logs_hint">Incluye diagnósticos de Proton, Wine y gráficos en el próximo inicio de un juego. Puede reducir el rendimiento y usar más almacenamiento.</string>
<string name="setup_game_debug_logs_restart">Reinicia esta sesión para guardar los registros de depuración de juegos</string>
<string name="setup_logging_update_failed">No se ha podido actualizar el registro. Comprueba el interruptor y vuelve a intentarlo.</string>
<string name="setup_agent_commands">Herramientas de depuración</string>
<string name="setup_graphics_logs">Registros detallados de gráficos</string>
<string name="setup_steam_gpu_drawing">Interfaz de Steam: dibujo con GPU</string>
<string name="setup_steam_gpu_drawing_hint">Con el par de controladores Xclipse, Steam dibuja sus páginas por software (el dibujo con GPU mostraba teselas corruptas). Activa esta opción para una interfaz de Steam más rápida si se ve bien en este teléfono.</string>
@@ -2340,6 +2341,7 @@
<string name="adbpair_waiting_text">Activa la Depuración inalámbrica y toca “Vincular dispositivo con código de vinculación”.</string>
<string name="adbpair_waiting_long">Activa la Depuración inalámbrica y toca “Vincular dispositivo con código de vinculación”. Quédate en Ajustes: el código se introduce en esta notificación.</string>
<string name="adbpair_code_label">Código de vinculación de 6 dígitos</string>
<string name="adbpair_code_hint">Toca Introducir código y escribe los 6 dígitos que muestra Ajustes.</string>
<string name="adbpair_title_code">Introduce el código de vinculación Wi-Fi</string>
<string name="adbpair_title_retry">Vuelve a probar el código</string>
<string name="adbpair_enter_code">Introducir código</string>
+2
View File
@@ -879,6 +879,7 @@
<string name="setup_game_debug_logs_hint">Sisällytä Protonin, Winen ja grafiikan diagnostiikka seuraavaan pelin käynnistykseen. Voi heikentää suorituskykyä ja käyttää enemmän tallennustilaa.</string>
<string name="setup_game_debug_logs_restart">Käynnistä tämä istunto uudelleen tallentaaksesi pelien vianmäärityslokit</string>
<string name="setup_logging_update_failed">Lokitusta ei voitu päivittää. Tarkista kytkin ja yritä uudelleen.</string>
<string name="setup_agent_commands">Vianmääritystyökalut</string>
<string name="setup_graphics_logs">Yksityiskohtaiset grafiikkalokit</string>
<string name="setup_steam_gpu_drawing">Steam-käyttöliittymä: GPU-piirto</string>
<string name="setup_steam_gpu_drawing_hint">Xclipse-ajuriparin kanssa Steam piirtää sivunsa ohjelmistollisesti (GPU-piirto näytti rikkinäisiä laattoja). Ota käyttöön nopeampaa Steam-käyttöliittymää varten, jos käyttöliittymä näyttää tässä puhelimessa virheettömältä.</string>
@@ -2314,6 +2315,7 @@
<string name="adbpair_waiting_text">Ota langaton virheenkorjaus käyttöön ja napauta ”Yhdistä laite paritunnuksella”.</string>
<string name="adbpair_waiting_long">Ota langaton virheenkorjaus käyttöön ja napauta ”Yhdistä laite paritunnuksella”. Pysy Asetuksissa: koodi syötetään tähän ilmoitukseen.</string>
<string name="adbpair_code_label">6-numeroinen paritunnus</string>
<string name="adbpair_code_hint">Napauta Syötä koodi ja kirjoita Asetuksissa näkyvät 6 numeroa.</string>
<string name="adbpair_title_code">Anna Wi-Fi-paritunnus</string>
<string name="adbpair_title_retry">Yritä koodia uudelleen</string>
<string name="adbpair_enter_code">Syötä koodi</string>
+2
View File
@@ -882,6 +882,7 @@
<string name="setup_game_debug_logs_hint">Inclure les diagnostics Proton, Wine et graphiques au prochain lancement d\'un jeu. Peut réduire les performances et utiliser plus de stockage.</string>
<string name="setup_game_debug_logs_restart">Redémarrez cette session pour enregistrer les journaux de débogage des jeux</string>
<string name="setup_logging_update_failed">Impossible de modifier la journalisation. Vérifiez l\'interrupteur et réessayez.</string>
<string name="setup_agent_commands">Outils de débogage</string>
<string name="setup_graphics_logs">Journaux graphiques détaillés</string>
<string name="setup_steam_gpu_drawing">Interface Steam : rendu GPU</string>
<string name="setup_steam_gpu_drawing_hint">Avec la paire de pilotes Xclipse, Steam dessine ses pages en logiciel : le rendu GPU produisait des tuiles corrompues. Activez cette option pour accélérer l\'interface Steam si l\'affichage est correct sur ce téléphone.</string>
@@ -2339,6 +2340,7 @@
<string name="adbpair_waiting_text">Activez le débogage sans fil, puis appuyez sur « Associer l\'appareil avec un code d\'appairage ».</string>
<string name="adbpair_waiting_long">Activez le débogage sans fil, puis appuyez sur « Associer l\'appareil avec un code d\'appairage ». Restez dans les paramètres : le code se saisit dans cette notification.</string>
<string name="adbpair_code_label">Code d\'appairage à 6 chiffres</string>
<string name="adbpair_code_hint">Appuyez sur « Saisir le code » et tapez les 6 chiffres affichés dans les paramètres.</string>
<string name="adbpair_title_code">Saisissez le code d\'appairage Wi-Fi</string>
<string name="adbpair_title_retry">Saisissez à nouveau le code</string>
<string name="adbpair_enter_code">Saisir le code</string>
+2
View File
@@ -879,6 +879,7 @@
<string name="setup_game_debug_logs_hint">अगली बार गेम लॉन्च होने पर Proton, Wine और ग्राफ़िक्स डायग्नोस्टिक्स शामिल करें। परफ़ॉर्मेंस घटा सकता है और ज़्यादा स्टोरेज ले सकता है।</string>
<string name="setup_game_debug_logs_restart">गेम डीबग लॉग सेव करने के लिए यह सेशन रीस्टार्ट करें</string>
<string name="setup_logging_update_failed">लॉगिंग अपडेट नहीं हो सकी। स्विच जांचें और फिर कोशिश करें।</string>
<string name="setup_agent_commands">डिबगिंग टूल</string>
<string name="setup_graphics_logs">विस्तृत ग्राफ़िक्स लॉग</string>
<string name="setup_steam_gpu_drawing">Steam इंटरफ़ेस: GPU ड्रॉइंग</string>
<string name="setup_steam_gpu_drawing_hint">Xclipse ड्राइवर जोड़ी के साथ, Steam अपने पेज सॉफ़्टवेयर से ड्रॉ करता है (GPU ड्रॉइंग में टाइलें टूटी हुई दिखीं)। अगर इस फ़ोन पर ठीक दिखे, तो तेज़ Steam इंटरफ़ेस के लिए इसे चालू करें।</string>
@@ -2314,6 +2315,7 @@
<string name="adbpair_waiting_text">वायरलेस डीबगिंग चालू करें, फिर “Pair device with pairing code” पर टैप करें।</string>
<string name="adbpair_waiting_long">वायरलेस डीबगिंग चालू करें, फिर “Pair device with pairing code” पर टैप करें। Settings में बने रहें: कोड इस नोटिफ़िकेशन में आता है।</string>
<string name="adbpair_code_label">6 अंकों का पेयरिंग कोड</string>
<string name="adbpair_code_hint">Enter code पर टैप करें और Settings में दिखाए गए 6 अंक टाइप करें।</string>
<string name="adbpair_title_code">Wi-Fi पेयरिंग कोड डालें</string>
<string name="adbpair_title_retry">कोड फिर से आज़माएं</string>
<string name="adbpair_enter_code">कोड डालें</string>
+2
View File
@@ -879,6 +879,7 @@
<string name="setup_game_debug_logs_hint">Proton-, Wine- és grafikai diagnosztika a következő játékindításkor. Csökkentheti a teljesítményt, és több tárhelyet használ.</string>
<string name="setup_game_debug_logs_restart">Indítsa újra ezt a munkamenetet a játék-hibakeresési naplók mentéséhez</string>
<string name="setup_logging_update_failed">Nem sikerült frissíteni a naplózást. Ellenőrizze a kapcsolót, és próbálja újra.</string>
<string name="setup_agent_commands">Hibakeresési eszközök</string>
<string name="setup_graphics_logs">Részletes grafikai naplók</string>
<string name="setup_steam_gpu_drawing">Steam felület: GPU-rajzolás</string>
<string name="setup_steam_gpu_drawing_hint">Az Xclipse illesztőprogram-párral a Steam szoftveresen rajzolja az oldalait (a GPU-rajzolás hibás csempéket eredményezett). Kapcsolja be a gyorsabb Steam-felületért, ha ezen a telefonon jól néz ki.</string>
@@ -2314,6 +2315,7 @@
<string name="adbpair_waiting_text">Kapcsolja be a vezeték nélküli hibakeresést, majd koppintson az „Eszköz párosítása párosítási kóddal” lehetőségre.</string>
<string name="adbpair_waiting_long">Kapcsolja be a vezeték nélküli hibakeresést, majd koppintson az „Eszköz párosítása párosítási kóddal” lehetőségre. Maradjon a Beállításokban: a kód ebbe az értesítésbe kerül.</string>
<string name="adbpair_code_label">6 számjegyű párosítási kód</string>
<string name="adbpair_code_hint">Koppintson a Kód megadására, és írja be a Beállításokban megjelenő 6 számjegyet.</string>
<string name="adbpair_title_code">Adja meg a Wi-Fi párosítási kódot</string>
<string name="adbpair_title_retry">Próbálja meg újra a kódot</string>
<string name="adbpair_enter_code">Kód megadása</string>
+2
View File
@@ -876,6 +876,7 @@
<string name="setup_game_debug_logs_hint">Sertakan diagnostik Proton, Wine, dan grafis pada peluncuran gim berikutnya. Dapat mengurangi performa dan memakai lebih banyak penyimpanan.</string>
<string name="setup_game_debug_logs_restart">Mulai ulang sesi ini untuk menyimpan log debug gim</string>
<string name="setup_logging_update_failed">Tidak dapat memperbarui pencatatan log. Periksa tombolnya lalu coba lagi.</string>
<string name="setup_agent_commands">Alat debug</string>
<string name="setup_graphics_logs">Log grafis rinci</string>
<string name="setup_steam_gpu_drawing">Antarmuka Steam: rendering GPU</string>
<string name="setup_steam_gpu_drawing_hint">Dengan pasangan driver Xclipse, Steam menggambar halamannya secara perangkat lunak (rendering GPU menampilkan ubin yang rusak). Aktifkan untuk antarmuka Steam yang lebih cepat jika tampilannya terlihat benar di ponsel ini.</string>
@@ -2289,6 +2290,7 @@
<string name="adbpair_waiting_text">Aktifkan Debugging nirkabel, lalu ketuk “Pasangkan perangkat dengan kode pemasangan”.</string>
<string name="adbpair_waiting_long">Aktifkan Debugging nirkabel, lalu ketuk “Pasangkan perangkat dengan kode pemasangan”. Tetap di Setelan: kodenya akan muncul di notifikasi ini.</string>
<string name="adbpair_code_label">Kode pemasangan 6 digit</string>
<string name="adbpair_code_hint">Ketuk Masukkan kode dan ketikkan 6 digit yang ditampilkan di Setelan.</string>
<string name="adbpair_title_code">Masukkan kode pemasangan Wi-Fi</string>
<string name="adbpair_title_retry">Coba kode lagi</string>
<string name="adbpair_enter_code">Masukkan kode</string>
+2
View File
@@ -882,6 +882,7 @@
<string name="setup_game_debug_logs_hint">Includi la diagnostica di Proton, Wine e grafica al prossimo avvio di un gioco. Può ridurre le prestazioni e occupare più spazio.</string>
<string name="setup_game_debug_logs_restart">Riavvia questa sessione per salvare i log di debug dei giochi</string>
<string name="setup_logging_update_failed">Impossibile aggiornare i log. Controlla l\'interruttore e riprova.</string>
<string name="setup_agent_commands">Strumenti di debug</string>
<string name="setup_graphics_logs">Log grafici dettagliati</string>
<string name="setup_steam_gpu_drawing">Interfaccia Steam: rendering GPU</string>
<string name="setup_steam_gpu_drawing_hint">Con la coppia di driver Xclipse, Steam disegna le pagine via software (il rendering GPU mostrava riquadri danneggiati). Attivala per un\'interfaccia Steam più veloce, se su questo telefono appare corretta.</string>
@@ -2331,6 +2332,7 @@
<string name="adbpair_waiting_text">Attiva Debug wireless, poi tocca “Accoppia dispositivo con codice di accoppiamento”.</string>
<string name="adbpair_waiting_long">Attiva Debug wireless, poi tocca “Accoppia dispositivo con codice di accoppiamento”. Resta in Impostazioni: il codice va inserito in questa notifica.</string>
<string name="adbpair_code_label">Codice di accoppiamento a 6 cifre</string>
<string name="adbpair_code_hint">Tocca Inserisci codice e digita le 6 cifre mostrate in Impostazioni.</string>
<string name="adbpair_title_code">Inserisci il codice di accoppiamento Wi-Fi</string>
<string name="adbpair_title_retry">Riprova con il codice</string>
<string name="adbpair_enter_code">Inserisci codice</string>
+2
View File
@@ -876,6 +876,7 @@
<string name="setup_game_debug_logs_hint">次回のゲーム起動時にProton、Wine、グラフィックスの診断情報を含めます。パフォーマンスが低下し、ストレージを多く使用する場合があります。</string>
<string name="setup_game_debug_logs_restart">ゲームのデバッグログを保存するにはこのセッションを再起動してください</string>
<string name="setup_logging_update_failed">ログ設定を更新できませんでした。スイッチを確認して、もう一度お試しください。</string>
<string name="setup_agent_commands">デバッグツール</string>
<string name="setup_graphics_logs">詳細なグラフィックスログ</string>
<string name="setup_steam_gpu_drawing">Steam インターフェース: GPU 描画</string>
<string name="setup_steam_gpu_drawing_hint">Xclipse ドライバーの組み合わせでは、Steam はソフトウェアでページを描画します (GPU 描画ではタイルが乱れました)。この端末で表示が正しければ、オンにすると Steam インターフェースが高速化します。</string>
@@ -2289,6 +2290,7 @@
<string name="adbpair_waiting_text">ワイヤレスデバッグをオンにして、「ペアリングコードでデバイスをペア設定」をタップしてください。</string>
<string name="adbpair_waiting_long">ワイヤレスデバッグをオンにして、「ペアリングコードでデバイスをペア設定」をタップしてください。設定画面のままにしてください:コードはこの通知に入力します。</string>
<string name="adbpair_code_label">6桁のペアリングコード</string>
<string name="adbpair_code_hint">「コードを入力」をタップし、設定に表示された6桁の数字を入力してください。</string>
<string name="adbpair_title_code">Wi-Fiペアリングコードを入力</string>
<string name="adbpair_title_retry">コードをもう一度入力</string>
<string name="adbpair_enter_code">コードを入力</string>
+2
View File
@@ -876,6 +876,7 @@
<string name="setup_game_debug_logs_hint">다음 게임 실행 시 Proton, Wine 및 그래픽 진단 정보를 포함합니다. 성능이 저하되고 저장 공간을 더 사용할 수 있습니다.</string>
<string name="setup_game_debug_logs_restart">게임 디버그 로그를 저장하려면 이 세션을 다시 시작하세요</string>
<string name="setup_logging_update_failed">로깅을 업데이트할 수 없습니다. 스위치를 확인하고 다시 시도하세요.</string>
<string name="setup_agent_commands">디버깅 도구</string>
<string name="setup_graphics_logs">상세 그래픽 로그</string>
<string name="setup_steam_gpu_drawing">Steam 인터페이스: GPU 렌더링</string>
<string name="setup_steam_gpu_drawing_hint">Xclipse 드라이버 조합에서는 Steam 페이지를 소프트웨어로 그립니다(GPU 렌더링에서는 타일이 깨져 보였습니다). 이 기기에서 정상적으로 보인다면 더 빠른 Steam 인터페이스를 위해 켜세요.</string>
@@ -2289,6 +2290,7 @@
<string name="adbpair_waiting_text">무선 디버깅을 켠 다음 “페어링 코드로 기기 페어링”을 탭하세요.</string>
<string name="adbpair_waiting_long">무선 디버깅을 켠 다음 “페어링 코드로 기기 페어링”을 탭하세요. 코드는 이 알림에 입력하므로 설정 화면에 머물러 있으세요.</string>
<string name="adbpair_code_label">6자리 페어링 코드</string>
<string name="adbpair_code_hint">\"코드 입력\"을 탭하고 설정에 표시된 6자리 숫자를 입력하세요.</string>
<string name="adbpair_title_code">Wi-Fi 페어링 코드 입력</string>
<string name="adbpair_title_retry">코드를 다시 입력하세요</string>
<string name="adbpair_enter_code">코드 입력</string>
+2
View File
@@ -876,6 +876,7 @@
<string name="setup_game_debug_logs_hint">Sertakan diagnostik Proton, Wine dan grafik pada pelancaran permainan seterusnya. Boleh mengurangkan prestasi dan menggunakan lebih banyak storan.</string>
<string name="setup_game_debug_logs_restart">Mulakan semula sesi ini untuk menyimpan log nyahpepijat permainan</string>
<string name="setup_logging_update_failed">Tidak dapat mengemas kini pengelogan. Semak suis dan cuba lagi.</string>
<string name="setup_agent_commands">Alatan penyahpepijatan</string>
<string name="setup_graphics_logs">Log grafik terperinci</string>
<string name="setup_steam_gpu_drawing">Antara muka Steam: pelukisan GPU</string>
<string name="setup_steam_gpu_drawing_hint">Dengan pasangan pemacu Xclipse, Steam melukis halamannya melalui perisian (pelukisan GPU menghasilkan jubin yang cacat). Hidupkan untuk antara muka Steam yang lebih pantas jika hasilnya kelihatan betul pada telefon ini.</string>
@@ -2289,6 +2290,7 @@
<string name="adbpair_waiting_text">Hidupkan Debugging Wayarles, kemudian ketik “Gandingkan peranti dengan kod gandingan”.</string>
<string name="adbpair_waiting_long">Hidupkan Debugging Wayarles, kemudian ketik “Gandingkan peranti dengan kod gandingan”. Kekal dalam Tetapan: kod akan masuk dalam pemberitahuan ini.</string>
<string name="adbpair_code_label">Kod gandingan 6 digit</string>
<string name="adbpair_code_hint">Ketik Masukkan kod dan taip 6 digit yang dipaparkan dalam Tetapan.</string>
<string name="adbpair_title_code">Masukkan kod gandingan Wi-Fi</string>
<string name="adbpair_title_retry">Cuba kod itu sekali lagi</string>
<string name="adbpair_enter_code">Masukkan kod</string>
+2
View File
@@ -879,6 +879,7 @@
<string name="setup_game_debug_logs_hint">Ta med diagnostikk for Proton, Wine og grafikk ved neste spillstart. Kan redusere ytelsen og bruke mer lagringsplass.</string>
<string name="setup_game_debug_logs_restart">Start denne sesjonen på nytt for å lagre feilsøkingslogger for spill</string>
<string name="setup_logging_update_failed">Kunne ikke oppdatere loggingen. Sjekk bryteren og prøv igjen.</string>
<string name="setup_agent_commands">Feilsøkingsverktøy</string>
<string name="setup_graphics_logs">Detaljerte grafikklogger</string>
<string name="setup_steam_gpu_drawing">Steam-grensesnitt: GPU-tegning</string>
<string name="setup_steam_gpu_drawing_hint">Med Xclipse-driverparet tegner Steam sidene sine i programvare (GPU-tegning viste ødelagte fliser). Slå på for et raskere Steam-grensesnitt hvis det ser riktig ut på denne telefonen.</string>
@@ -2314,6 +2315,7 @@
<string name="adbpair_waiting_text">Slå på trådløs feilsøking, og trykk så på «Par enhet med koblingskode».</string>
<string name="adbpair_waiting_long">Slå på trådløs feilsøking, og trykk så på «Par enhet med koblingskode». Hold deg i Innstillinger: koden kommer i denne varslingen.</string>
<string name="adbpair_code_label">6-tallers koblingskode</string>
<string name="adbpair_code_hint">Trykk på Skriv inn kode og skriv de 6 tallene som vises i Innstillinger.</string>
<string name="adbpair_title_code">Skriv inn Wi-Fi-koblingskoden</string>
<string name="adbpair_title_retry">Prøv koden igjen</string>
<string name="adbpair_enter_code">Skriv inn kode</string>
+2
View File
@@ -879,6 +879,7 @@
<string name="setup_game_debug_logs_hint">Neem bij de volgende gamestart diagnostiek van Proton, Wine en graphics op. Kan de prestaties verlagen en meer opslag gebruiken.</string>
<string name="setup_game_debug_logs_restart">Start deze sessie opnieuw om debuglogs van games op te slaan</string>
<string name="setup_logging_update_failed">Kan logging niet bijwerken. Controleer de schakelaar en probeer het opnieuw.</string>
<string name="setup_agent_commands">Hulpmiddelen voor debuggen</string>
<string name="setup_graphics_logs">Gedetailleerde grafische logboeken</string>
<string name="setup_steam_gpu_drawing">Steam-interface: GPU-tekenen</string>
<string name="setup_steam_gpu_drawing_hint">Met het Xclipse-driverpaar tekent Steam zijn pagina\'s in software (GPU-tekenen liet gebroken tegels zien). Schakel dit in voor een snellere Steam-interface als het op deze telefoon goed uitziet.</string>
@@ -2314,6 +2315,7 @@
<string name="adbpair_waiting_text">Schakel draadloze foutopsporing in en tik vervolgens op “Apparaat koppelen met koppelcode”.</string>
<string name="adbpair_waiting_long">Schakel draadloze foutopsporing in en tik vervolgens op “Apparaat koppelen met koppelcode”. Blijf in Instellingen: de code komt in deze melding.</string>
<string name="adbpair_code_label">Koppelcode van 6 cijfers</string>
<string name="adbpair_code_hint">Tik op Code invoeren en typ de 6 cijfers die in Instellingen worden getoond.</string>
<string name="adbpair_title_code">Voer de Wi-Fi-koppelcode in</string>
<string name="adbpair_title_retry">Probeer de code opnieuw</string>
<string name="adbpair_enter_code">Code invoeren</string>
+2
View File
@@ -885,6 +885,7 @@
<string name="setup_game_debug_logs_hint">Dołącz diagnostykę Proton, Wine i grafiki przy następnym uruchomieniu gry. Może obniżyć wydajność i zająć więcej miejsca.</string>
<string name="setup_game_debug_logs_restart">Uruchom ponownie tę sesję, aby zapisywać logi debugowania gier</string>
<string name="setup_logging_update_failed">Nie udało się zmienić logowania. Sprawdź przełącznik i spróbuj ponownie.</string>
<string name="setup_agent_commands">Narzędzia debugowania</string>
<string name="setup_graphics_logs">Szczegółowe logi graficzne</string>
<string name="setup_steam_gpu_drawing">Interfejs Steam: rysowanie przez GPU</string>
<string name="setup_steam_gpu_drawing_hint">Z parą sterowników Xclipse Steam rysuje swoje strony programowo (rysowanie przez GPU dawało uszkodzone kafelki). Włącz, aby przyspieszyć interfejs Steam, jeśli na tym telefonie wygląda poprawnie.</string>
@@ -2366,6 +2367,7 @@
<string name="adbpair_waiting_text">Włącz Debugowanie bezprzewodowe, a potem dotknij „Sparuj urządzenie za pomocą kodu parowania”.</string>
<string name="adbpair_waiting_long">Włącz Debugowanie bezprzewodowe, a potem dotknij „Sparuj urządzenie za pomocą kodu parowania”. Pozostań w Ustawieniach: kod wpiszesz w tym powiadomieniu.</string>
<string name="adbpair_code_label">6-cyfrowy kod parowania</string>
<string name="adbpair_code_hint">Dotknij „Wpisz kod” i podaj 6 cyfr widocznych w Ustawieniach.</string>
<string name="adbpair_title_code">Wpisz kod parowania Wi-Fi</string>
<string name="adbpair_title_retry">Spróbuj wpisać kod ponownie</string>
<string name="adbpair_enter_code">Wpisz kod</string>
@@ -882,6 +882,7 @@
<string name="setup_game_debug_logs_hint">Inclui diagnósticos do Proton, do Wine e de gráficos no próximo arranque de um jogo. Pode reduzir o desempenho e ocupar mais armazenamento.</string>
<string name="setup_game_debug_logs_restart">Reinicie esta sessão para guardar os registos de depuração dos jogos</string>
<string name="setup_logging_update_failed">Não foi possível atualizar os registos. Verifique o interruptor e tente novamente.</string>
<string name="setup_agent_commands">Ferramentas de depuração</string>
<string name="setup_graphics_logs">Registos gráficos detalhados</string>
<string name="setup_steam_gpu_drawing">Interface do Steam: desenho pela GPU</string>
<string name="setup_steam_gpu_drawing_hint">Com o par de controladores Xclipse, o Steam desenha as suas páginas por software (o desenho pela GPU mostrou mosaicos com falhas). Ative para uma interface do Steam mais rápida se esta parecer correta neste telemóvel.</string>
@@ -2346,6 +2347,7 @@
<string name="adbpair_waiting_text">Ative a depuração sem fios e toque em «Sincronizar dispositivo com código de sincronização».</string>
<string name="adbpair_waiting_long">Ative a depuração sem fios e toque em «Sincronizar dispositivo com código de sincronização». Fique nas Definições: o código é introduzido nesta notificação.</string>
<string name="adbpair_code_label">Código de sincronização de 6 dígitos</string>
<string name="adbpair_code_hint">Toque em Introduzir código e escreva os 6 dígitos mostrados nas Definições.</string>
<string name="adbpair_title_code">Introduza o código de sincronização Wi-Fi</string>
<string name="adbpair_title_retry">Introduza o código novamente</string>
<string name="adbpair_enter_code">Introduzir código</string>
+2
View File
@@ -889,6 +889,7 @@
<string name="setup_game_debug_logs_hint">Inclui diagnósticos do Proton, do Wine e de gráficos na próxima inicialização do jogo. Pode reduzir o desempenho e usar mais armazenamento.</string>
<string name="setup_game_debug_logs_restart">Reinicie esta sessão para salvar os logs de depuração dos jogos</string>
<string name="setup_logging_update_failed">Não foi possível atualizar os logs. Verifique a chave e tente novamente.</string>
<string name="setup_agent_commands">Ferramentas de depuração</string>
<string name="setup_graphics_logs">Logs detalhados de gráficos</string>
<string name="setup_steam_gpu_drawing">Interface do Steam: renderização pela GPU</string>
<string name="setup_steam_gpu_drawing_hint">Com o par de drivers Xclipse, o Steam renderiza suas páginas por software (a renderização pela GPU apresentou blocos quebrados). Ative para ter uma interface do Steam mais rápida se ela aparecer corretamente neste telefone.</string>
@@ -2354,6 +2355,7 @@
<string name="adbpair_waiting_text">Ative a depuração por Wi-Fi e toque em “Parear o dispositivo com um código de pareamento”.</string>
<string name="adbpair_waiting_long">Ative a depuração por Wi-Fi e toque em “Parear o dispositivo com um código de pareamento”. Fique nas Configurações: o código é digitado nesta notificação.</string>
<string name="adbpair_code_label">Código de pareamento de 6 dígitos</string>
<string name="adbpair_code_hint">Toque em Digitar código e insira os 6 dígitos mostrados nas Configurações.</string>
<string name="adbpair_title_code">Digite o código de pareamento por Wi-Fi</string>
<string name="adbpair_title_retry">Tente o código de novo</string>
<string name="adbpair_enter_code">Digitar código</string>
+2
View File
@@ -882,6 +882,7 @@
<string name="setup_game_debug_logs_hint">Include diagnosticare Proton, Wine și grafică la următoarea lansare a unui joc. Poate reduce performanța și folosește mai mult spațiu.</string>
<string name="setup_game_debug_logs_restart">Repornește această sesiune pentru a salva jurnalele de depanare</string>
<string name="setup_logging_update_failed">Jurnalizarea nu a putut fi actualizată. Verifică comutatorul și încearcă din nou.</string>
<string name="setup_agent_commands">Instrumente de depanare</string>
<string name="setup_graphics_logs">Jurnale detaliate de grafică</string>
<string name="setup_steam_gpu_drawing">Interfața Steam: desenare GPU</string>
<string name="setup_steam_gpu_drawing_hint">Cu perechea de drivere Xclipse, Steam își desenează paginile în software (desenarea GPU a afișat dale stricate). Activează pentru o interfață Steam mai rapidă dacă arată corect pe acest telefon.</string>
@@ -2340,6 +2341,7 @@
<string name="adbpair_waiting_text">Activează Depanarea wireless, apoi apasă „Asociază dispozitivul cu un cod de asociere”.</string>
<string name="adbpair_waiting_long">Activează Depanarea wireless, apoi apasă „Asociază dispozitivul cu un cod de asociere”. Rămâi în Setări: codul apare în această notificare.</string>
<string name="adbpair_code_label">Cod de asociere din 6 cifre</string>
<string name="adbpair_code_hint">Apasă Introdu codul și scrie cele 6 cifre arătate în Setări.</string>
<string name="adbpair_title_code">Introdu codul de asociere Wi-Fi</string>
<string name="adbpair_title_retry">Încearcă codul din nou</string>
<string name="adbpair_enter_code">Introdu codul</string>
+2
View File
@@ -885,6 +885,7 @@
<string name="setup_game_debug_logs_hint">Добавлять диагностику Proton, Wine и графики при следующем запуске игры. Может снизить производительность и занять больше места.</string>
<string name="setup_game_debug_logs_restart">Перезапустите сессию, чтобы сохранять журналы отладки игр</string>
<string name="setup_logging_update_failed">Не удалось обновить журналирование. Проверьте переключатель и повторите попытку.</string>
<string name="setup_agent_commands">Инструменты отладки</string>
<string name="setup_graphics_logs">Подробные журналы графики</string>
<string name="setup_steam_gpu_drawing">Интерфейс Steam: отрисовка на GPU</string>
<string name="setup_steam_gpu_drawing_hint">С парой драйверов Xclipse Steam отрисовывает страницы программно (при отрисовке на GPU появлялись битые тайлы). Включите, чтобы ускорить интерфейс Steam, если на этом телефоне он выглядит корректно.</string>
@@ -2367,6 +2368,7 @@
<string name="adbpair_waiting_text">Включите отладку по Wi-Fi и нажмите «Сопряжение устройства с помощью кода».</string>
<string name="adbpair_waiting_long">Включите отладку по Wi-Fi и нажмите «Сопряжение устройства с помощью кода». Не выходите из Настроек: код вводится в этом уведомлении.</string>
<string name="adbpair_code_label">6-значный код сопряжения</string>
<string name="adbpair_code_hint">Нажмите «Ввести код» и введите 6 цифр, показанных в Настройках.</string>
<string name="adbpair_title_code">Введите код сопряжения Wi-Fi</string>
<string name="adbpair_title_retry">Введите код еще раз</string>
<string name="adbpair_enter_code">Ввести код</string>
+2
View File
@@ -879,6 +879,7 @@
<string name="setup_game_debug_logs_hint">Ta med diagnostik för Proton, Wine och grafik vid nästa spelstart. Kan sänka prestandan och använda mer lagringsutrymme.</string>
<string name="setup_game_debug_logs_restart">Starta om sessionen för att spara felsökningsloggar för spel</string>
<string name="setup_logging_update_failed">Det gick inte att uppdatera loggningen. Kontrollera reglaget och försök igen.</string>
<string name="setup_agent_commands">Felsökningsverktyg</string>
<string name="setup_graphics_logs">Detaljerade grafikloggar</string>
<string name="setup_steam_gpu_drawing">Steam-gränssnitt: GPU-ritning</string>
<string name="setup_steam_gpu_drawing_hint">Med Xclipse-drivrutinsparet ritar Steam sina sidor i mjukvara (GPU-ritning gav trasiga rutor). Slå på för ett snabbare Steam-gränssnitt om det ser rätt ut på den här telefonen.</string>
@@ -2314,6 +2315,7 @@
<string name="adbpair_waiting_text">Slå på trådlös felsökning och tryck sedan på ”Parkoppla enhet med parkopplingskod”.</string>
<string name="adbpair_waiting_long">Slå på trådlös felsökning och tryck sedan på ”Parkoppla enhet med parkopplingskod”. Stanna kvar i Inställningar: koden skrivs in i den här aviseringen.</string>
<string name="adbpair_code_label">6-siffrig parkopplingskod</string>
<string name="adbpair_code_hint">Tryck på Ange kod och skriv de 6 siffrorna som visas i Inställningar.</string>
<string name="adbpair_title_code">Ange Wi-Fi-parkopplingskoden</string>
<string name="adbpair_title_retry">Försök med koden igen</string>
<string name="adbpair_enter_code">Ange kod</string>
+2
View File
@@ -876,6 +876,7 @@
<string name="setup_game_debug_logs_hint">รวมข้อมูลวินิจฉัยของ Proton, Wine และกราฟิกในการเปิดเกมครั้งถัดไป อาจลดประสิทธิภาพและใช้พื้นที่จัดเก็บมากขึ้น</string>
<string name="setup_game_debug_logs_restart">รีสตาร์ทเซสชันนี้เพื่อบันทึกบันทึกดีบักของเกม</string>
<string name="setup_logging_update_failed">อัปเดตการบันทึกไม่ได้ ตรวจสอบสวิตช์แล้วลองใหม่</string>
<string name="setup_agent_commands">เครื่องมือดีบัก</string>
<string name="setup_graphics_logs">บันทึกกราฟิกโดยละเอียด</string>
<string name="setup_steam_gpu_drawing">อินเทอร์เฟซ Steam: วาดด้วย GPU</string>
<string name="setup_steam_gpu_drawing_hint">ด้วยไดรเวอร์คู่ Xclipse Steam จะวาดหน้าเพจด้วยซอฟต์แวร์ (การวาดด้วย GPU ทำให้ภาพแตกเป็นชิ้น) เปิดตัวเลือกนี้เพื่อให้อินเทอร์เฟซ Steam เร็วขึ้นหากดูปกติบนเครื่องนี้</string>
@@ -2289,6 +2290,7 @@
<string name="adbpair_waiting_text">เปิด Wireless debugging แล้วแตะ “Pair device with pairing code”</string>
<string name="adbpair_waiting_long">เปิด Wireless debugging แล้วแตะ “Pair device with pairing code” อยู่ในการตั้งค่าต่อไป: รหัสจะอยู่ในการแจ้งเตือนนี้</string>
<string name="adbpair_code_label">รหัสจับคู่ 6 หลัก</string>
<string name="adbpair_code_hint">แตะกรอกรหัสแล้วพิมพ์ตัวเลข 6 หลักที่แสดงในการตั้งค่า</string>
<string name="adbpair_title_code">กรอกรหัสจับคู่ Wi-Fi</string>
<string name="adbpair_title_retry">ลองกรอกรหัสอีกครั้ง</string>
<string name="adbpair_enter_code">กรอกรหัส</string>
+2
View File
@@ -879,6 +879,7 @@
<string name="setup_game_debug_logs_hint">Sonraki oyun başlatmada Proton, Wine ve grafik tanılamalarını ekler. Performansı düşürebilir ve daha fazla depolama kullanabilir.</string>
<string name="setup_game_debug_logs_restart">Oyun hata ayıklama günlüklerini kaydetmek için bu oturumu yeniden başlatın</string>
<string name="setup_logging_update_failed">Günlük kaydı güncellenemedi. Anahtarı kontrol edip tekrar deneyin.</string>
<string name="setup_agent_commands">Hata ayıklama araçları</string>
<string name="setup_graphics_logs">Ayrıntılı grafik günlükleri</string>
<string name="setup_steam_gpu_drawing">Steam arayüzü: GPU ile çizim</string>
<string name="setup_steam_gpu_drawing_hint">Xclipse sürücü ikilisi kullanıldığında Steam, sayfalarını yazılımla çizer (GPU ile çizimde bozuk döşemeler görüldü). Bu telefonda düzgün görünüyorsa daha hızlı bir Steam arayüzü için açın.</string>
@@ -2306,6 +2307,7 @@
<string name="adbpair_waiting_text">Kablosuz hata ayıklamayı açın, sonra “Eşleştirme koduyla cihaz eşle” seçeneğine dokunun.</string>
<string name="adbpair_waiting_long">Kablosuz hata ayıklamayı açın, sonra “Eşleştirme koduyla cihaz eşle” seçeneğine dokunun. Ayarlar\'dan çıkmayın: kod bu bildirime gelir.</string>
<string name="adbpair_code_label">6 haneli eşleştirme kodu</string>
<string name="adbpair_code_hint">Kodu gir\'e dokunun ve Ayarlar\'da gösterilen 6 haneyi yazın.</string>
<string name="adbpair_title_code">Wi-Fi eşleştirme kodunu girin</string>
<string name="adbpair_title_retry">Kodu yeniden deneyin</string>
<string name="adbpair_enter_code">Kodu gir</string>
+2
View File
@@ -885,6 +885,7 @@
<string name="setup_game_debug_logs_hint">Додавати діагностику Proton, Wine і графіки під час наступного запуску гри. Може знизити продуктивність і зайняти більше місця.</string>
<string name="setup_game_debug_logs_restart">Перезапустіть цей сеанс, щоб зберігати журнали налагодження ігор</string>
<string name="setup_logging_update_failed">Не вдалося оновити журналювання. Перевірте перемикач і спробуйте ще раз.</string>
<string name="setup_agent_commands">Засоби діагностики</string>
<string name="setup_graphics_logs">Детальні журнали графіки</string>
<string name="setup_steam_gpu_drawing">Інтерфейс Steam: малювання на GPU</string>
<string name="setup_steam_gpu_drawing_hint">Із парою драйверів Xclipse Steam малює свої сторінки програмно (малювання на GPU давало пошкоджені фрагменти). Увімкніть для швидшого інтерфейсу Steam, якщо на цьому телефоні все виглядає правильно.</string>
@@ -2366,6 +2367,7 @@
<string name="adbpair_waiting_text">Увімкніть бездротове налагодження, потім торкніться «Прив’язати пристрій за кодом прив’язки».</string>
<string name="adbpair_waiting_long">Увімкніть бездротове налагодження, потім торкніться «Прив’язати пристрій за кодом прив’язки». Залишайтеся в «Налаштуваннях»: код з’явиться в цьому сповіщенні.</string>
<string name="adbpair_code_label">6-значний код прив’язки</string>
<string name="adbpair_code_hint">Торкніться «Ввести код» і введіть 6 цифр, показаних у «Налаштуваннях».</string>
<string name="adbpair_title_code">Введіть код прив’язки Wi-Fi</string>
<string name="adbpair_title_retry">Спробуйте код ще раз</string>
<string name="adbpair_enter_code">Ввести код</string>
+2
View File
@@ -876,6 +876,7 @@
<string name="setup_game_debug_logs_hint">Thêm chẩn đoán Proton, Wine và đồ họa vào lần khởi chạy game tiếp theo. Có thể giảm hiệu năng và tốn thêm bộ nhớ.</string>
<string name="setup_game_debug_logs_restart">Khởi động lại phiên này để lưu nhật ký gỡ lỗi game</string>
<string name="setup_logging_update_failed">Không thể cập nhật ghi nhật ký. Hãy kiểm tra công tắc rồi thử lại.</string>
<string name="setup_agent_commands">Công cụ gỡ lỗi</string>
<string name="setup_graphics_logs">Nhật ký đồ họa chi tiết</string>
<string name="setup_steam_gpu_drawing">Giao diện Steam: vẽ bằng GPU</string>
<string name="setup_steam_gpu_drawing_hint">Với cặp driver Xclipse, Steam vẽ các trang bằng phần mềm (vẽ bằng GPU làm vỡ các ô hiển thị). Bật để có giao diện Steam nhanh hơn nếu hình hiển thị đúng trên máy này.</string>
@@ -2289,6 +2290,7 @@
<string name="adbpair_waiting_text">Bật Gỡ lỗi qua mạng không dây, rồi nhấn “Pair device with pairing code”.</string>
<string name="adbpair_waiting_long">Bật Gỡ lỗi qua mạng không dây, rồi nhấn “Pair device with pairing code”. Ở lại trong Settings: mã sẽ hiện trong thông báo này.</string>
<string name="adbpair_code_label">Mã ghép nối 6 số</string>
<string name="adbpair_code_hint">Nhấn Enter code và nhập 6 số hiện trong Settings.</string>
<string name="adbpair_title_code">Nhập mã ghép nối Wi-Fi</string>
<string name="adbpair_title_retry">Thử lại mã</string>
<string name="adbpair_enter_code">Nhập mã</string>
@@ -876,6 +876,7 @@
<string name="setup_game_debug_logs_hint">在下次启动游戏时包含 Proton、Wine 和图形诊断信息。可能降低性能并占用更多存储空间。</string>
<string name="setup_game_debug_logs_restart">重启此会话以保存游戏调试日志</string>
<string name="setup_logging_update_failed">无法更新日志设置。请检查开关后重试。</string>
<string name="setup_agent_commands">调试工具</string>
<string name="setup_graphics_logs">详细图形日志</string>
<string name="setup_steam_gpu_drawing">Steam 界面:GPU 绘制</string>
<string name="setup_steam_gpu_drawing_hint">使用 Xclipse 驱动组合时,Steam 以软件方式绘制页面(GPU 绘制会出现图块错乱)。若在这台手机上画面正常,开启即可获得更快的 Steam 界面。</string>
@@ -2366,6 +2367,7 @@
<string name="adbpair_waiting_text">开启无线调试,然后点按“使用配对码配对设备”。</string>
<string name="adbpair_waiting_long">开启无线调试,然后点按“使用配对码配对设备”。请停留在“设置”中:配对码在此通知中输入。</string>
<string name="adbpair_code_label">6 位配对码</string>
<string name="adbpair_code_hint">点按“输入配对码”,然后输入“设置”中显示的 6 位数字。</string>
<string name="adbpair_title_code">输入 Wi-Fi 配对码</string>
<string name="adbpair_title_retry">请重新输入配对码</string>
<string name="adbpair_enter_code">输入配对码</string>
@@ -875,6 +875,7 @@
<string name="setup_game_debug_logs_hint">在下次啟動遊戲時加入 Proton、Wine 和圖形診斷資訊。可能降低效能並佔用更多儲存空間。</string>
<string name="setup_game_debug_logs_restart">重新啟動此會話以儲存遊戲偵錯記錄</string>
<string name="setup_logging_update_failed">無法更新記錄設定。請檢查開關後再試一次。</string>
<string name="setup_agent_commands">偵錯工具</string>
<string name="setup_graphics_logs">詳細圖形記錄</string>
<string name="setup_steam_gpu_drawing">Steam 介面:GPU 繪製</string>
<string name="setup_steam_gpu_drawing_hint">使用 Xclipse 驅動程式組合時,Steam 會以軟件繪製頁面(GPU 繪製曾出現圖塊破損)。若在這部手機上顯示正常,可開啟以加快 Steam 介面。</string>
@@ -2288,6 +2289,7 @@
<string name="adbpair_waiting_text">開啟無線偵錯,然後輕按「使用配對碼配對裝置」。</string>
<string name="adbpair_waiting_long">開啟無線偵錯,然後輕按「使用配對碼配對裝置」。請留在「設定」中:配對碼需在此通知中輸入。</string>
<string name="adbpair_code_label">6 位數配對碼</string>
<string name="adbpair_code_hint">輕按「輸入配對碼」,然後輸入「系統設定」中顯示的 6 位數字。</string>
<string name="adbpair_title_code">輸入 Wi-Fi 配對碼</string>
<string name="adbpair_title_retry">請再次輸入配對碼</string>
<string name="adbpair_enter_code">輸入配對碼</string>
@@ -875,6 +875,7 @@
<string name="setup_game_debug_logs_hint">在下次啟動遊戲時加入 Proton、Wine 和圖形診斷資訊。可能降低效能並佔用更多儲存空間。</string>
<string name="setup_game_debug_logs_restart">重新啟動此工作階段以儲存遊戲偵錯日誌</string>
<string name="setup_logging_update_failed">無法更新日誌設定。請檢查開關後再試一次。</string>
<string name="setup_agent_commands">偵錯工具</string>
<string name="setup_graphics_logs">詳細圖形記錄</string>
<string name="setup_steam_gpu_drawing">Steam 介面:GPU 繪製</string>
<string name="setup_steam_gpu_drawing_hint">使用 Xclipse 驅動程式組合時,Steam 會改用軟體繪製頁面(GPU 繪製曾出現圖塊破損)。若這支手機上顯示正常,開啟此選項可加快 Steam 介面。</string>
@@ -2288,6 +2289,7 @@
<string name="adbpair_waiting_text">開啟無線偵錯,然後點擊「使用配對碼配對裝置」。</string>
<string name="adbpair_waiting_long">開啟無線偵錯,然後點擊「使用配對碼配對裝置」。請留在「設定」中:配對碼要輸入在這則通知裡。</string>
<string name="adbpair_code_label">6 位數配對碼</string>
<string name="adbpair_code_hint">點擊「輸入配對碼」,然後輸入「Android 設定」中顯示的 6 位數字。</string>
<string name="adbpair_title_code">輸入 Wi-Fi 配對碼</string>
<string name="adbpair_title_retry">請再次輸入配對碼</string>
<string name="adbpair_enter_code">輸入配對碼</string>
@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- SystemUI can inflate RemoteViews with a different theme. Pair each key's foreground with its background. -->
<style name="DroidDeckPairKey" parent="@android:style/Widget.Material.Button.Borderless">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">34dp</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_margin">2dp</item>
<item name="android:minWidth">0dp</item>
<item name="android:minHeight">0dp</item>
<item name="android:padding">0dp</item>
<item name="android:background">@drawable/wireless_pairing_key</item>
<item name="android:backgroundTint">@null</item>
<item name="android:textColor">@color/wireless_pairing_key_text</item>
<item name="android:textSize">17sp</item>
<item name="android:textStyle">bold</item>
<item name="android:includeFontPadding">false</item>
</style>
</resources>
+6 -40
View File
@@ -541,28 +541,6 @@
<string name="game_steam_with">Starts with Steam</string>
<string name="game_steam_without">Starts without Steam</string>
<string name="game_res_title">Game resolution</string>
<string name="game_upscaler_title">In-game upscaler</string>
<string name="game_upscaler_off">Off</string>
<string name="game_upscaler_mode_fsr">FSR and XeSS games</string>
<string name="game_upscaler_mode_dlss">DLSS games</string>
<string name="game_upscaler_mode_native">Native FSR 4</string>
<string name="game_upscaler_engine">Upscaler</string>
<string name="game_upscaler_engine_fsr4_lite">FSR 4 Lite</string>
<string name="game_upscaler_engine_fsr4_full">FSR 4</string>
<string name="game_upscaler_engine_xess">XeSS 3</string>
<string name="game_upscaler_engine_basic">Basic temporal</string>
<string name="game_upscaler_engine_sgsr2">Snapdragon GSR 2</string>
<string name="game_upscaler_engine_fsr4_npu">FSR 4 on NPU</string>
<string name="game_upscaler_engine_fsr4_lite_npu">FSR 4 Lite on NPU</string>
<string name="game_upscaler_sharpness">Sharpness</string>
<string name="game_upscaler_sharpness_value">%1$d%%</string>
<string name="game_upscaler_sigfix">DLSS signature fix</string>
<string name="game_upscaler_npu_sync">NPU sync</string>
<string name="game_upscaler_files">Upscaler files</string>
<string name="game_upscaler_files_ready">Ready</string>
<string name="game_upscaler_files_missing">Not downloaded</string>
<string name="game_upscaler_files_downloading">Downloading %1$d%%</string>
<string name="game_upscaler_files_failed">Failed: %1$s</string>
<string name="game_settings_card">Settings</string>
<string name="game_settings_menu_title">%1$s Settings</string>
<string name="game_settings_default">Default</string>
@@ -797,7 +775,6 @@
<string name="hud_metric_network">Network</string>
<string name="hud_metric_resolution">Resolution</string>
<string name="hud_metric_proton">Proton version</string>
<string name="hud_metric_upscale">In-game upscaler</string>
<string name="hud_metric_session">Session time</string>
<string name="hud_metric_clock">Clock</string>
<string name="hud_group_temps">Temperatures</string>
@@ -999,8 +976,7 @@
<string name="setup_game_debug_logs_hint">Include Proton, Wine and graphics diagnostics on the next game launch. Turns itself off when that session ends. Can reduce performance and use more storage.</string>
<string name="setup_game_debug_logs_restart">Restart this session to save game debug logs</string>
<string name="setup_logging_update_failed">Couldn\'t update logging. Check the switch and try again.</string>
<string name="setup_agent_commands" translatable="false">droiddeckctl</string>
<string name="setup_agent_commands_hint">Allow command-line control of DroidDeck sessions, input, and logs.</string>
<string name="setup_agent_commands">Debugging tools</string>
<string name="setup_graphics_logs">Detailed graphics logs</string>
<string name="setup_steam_gpu_drawing">Steam interface: GPU drawing</string>
<string name="setup_steam_gpu_drawing_hint">With the Xclipse driver pair, Steam draws its pages in software (GPU drawing showed broken tiles). Turn on for a faster Steam interface if it looks right on this phone.</string>
@@ -1066,9 +1042,6 @@
<string name="setup_orientation_landscape">Landscape</string>
<string name="setup_orientation_reverse">Reverse landscape</string>
<string name="setup_fullscreen">Fullscreen</string>
<string name="setup_launcher_fullscreen">Launcher fullscreen</string>
<string name="setup_session_fullscreen">Session fullscreen</string>
<string name="setup_fullscreen_landscape_only">Landscape only</string>
<string name="setup_fullscreen_on">Hides the Android status and navigation bars</string>
<string name="setup_fullscreen_off">Shows the Android status and navigation bars</string>
<string name="setup_page_swipe">Swipe between pages</string>
@@ -1495,7 +1468,7 @@
<string name="gate_needs_wifi">Wireless debugging needs Wi-Fi. Any network works; it doesn\'t need internet.</string>
<string name="gate_step1">Open Settings → Developer options → Wireless debugging and turn it on</string>
<string name="gate_step2">Tap “Pair device with pairing code”</string>
<string name="gate_step3">Tap ▼ to keep the keypad open. Swipe down if it closes.</string>
<string name="gate_step3">Type the code into the DroidDeck notification</string>
<string name="pairguide_build_number">In About phone, tap Build number 7 times</string>
<string name="pairguide_wireless">Turn on Wireless debugging</string>
<string name="pairguide_pair">Open Wireless debugging, then tap “Pair device with pairing code”</string>
@@ -2666,11 +2639,10 @@
<string name="adbpair_waiting_text">Turn on Wireless debugging, then tap “Pair device with pairing code”.</string>
<string name="adbpair_waiting_long">Turn on Wireless debugging, then tap “Pair device with pairing code”. Stay in Settings: the code goes in this notification.</string>
<string name="adbpair_code_label">6-digit pairing code</string>
<string name="adbpair_keypad_entered">%1$d of 6 digits entered</string>
<string name="adbpair_keypad_delete">Delete last digit</string>
<string name="adbpair_code_hint">Tap Enter code and type the 6 digits shown in Settings.</string>
<string name="adbpair_title_code">Enter the Wi-Fi pairing code</string>
<string name="adbpair_title_retry">Try the code again</string>
<string name="adbpair_enter_code">Tap ✓ to pair</string>
<string name="adbpair_enter_code">Enter code</string>
<string name="adbpair_title_working">Setting up Steam</string>
<string name="adbpair_title_done">Steam is ready</string>
<string name="adbpair_done_text">Tap to go back to DroidDeck. You can turn Wireless debugging off now.</string>
@@ -4484,12 +4456,7 @@
<string name="settings_place_drawer">In-game menu</string>
<string name="settings_place_sheet">Steam or Desktop options (swipe up)</string>
<string name="settings_place_steam_qam">Steam quick menu (•••)</string>
<string name="dev_group_diagnostics">Diagnostics</string>
<string name="dev_group_previews">UI previews</string>
<string name="dev_group_log_files">Log files</string>
<string name="dev_group_reset">Reset</string>
<string name="dev_log_manage_hint">Share, save, or delete individual session logs.</string>
<string name="dev_harness_overlay_hint">Show Dev Harness over the launcher and games.</string>
<string name="dev_group_logs">Logs</string>
<string name="dev_ui_zoo">UI zoo</string>
<string name="dev_ui_zoo_hint">Screens that are hard to reach, shown only when you pick one</string>
<string name="dev_ui_zoo_open">Open</string>
@@ -4538,8 +4505,7 @@
<string name="rail_sync">Syncthing</string>
<string name="downloads_settings">Download settings</string>
<string name="dev_tools_title">Developer tools</string>
<string name="dev_tools_show">Show developer tools</string>
<string name="dev_tools_hint">Show advanced testing and diagnostics controls.</string>
<string name="dev_tools_hint">Agent, graphics logs and other tools for testing DroidDeck</string>
<string name="sheet_lip">Options</string>
<string name="sheet_scope_steam">Steam defaults · used each time Steam starts</string>
<string name="sheet_scope_desktop">Desktop defaults · used each time Desktop starts</string>
@@ -1,77 +0,0 @@
package com.droiddeck.launcher.core
import org.junit.Assert.*
import org.junit.Test
class GameUpscalerTest {
@Test fun aChoiceRoundTripsThroughTheGameEnvironment() {
val choice = GameUpscaler.Choice(GameUpscaler.Mode.DLSS, GameUpscaler.Engine.XESS, 70, npuSync = true, signatureFix = true)
val config = GameUpscaler.withChoice(GameEnvironment.Config(), "42", choice)
assertEquals(choice, GameUpscaler.choice(config, "42"))
assertNull(GameUpscaler.choice(config, "43"))
}
@Test fun offRemovesOnlyTheUpscalerEntries() {
val start = GameEnvironment.Config().withEntries("42", mapOf("FEX_MULTIBLOCK" to "0"))
val on = GameUpscaler.withChoice(start, "42", GameUpscaler.Choice(GameUpscaler.Mode.FSR_XESS))
val off = GameUpscaler.withChoice(on, "42", null)
assertEquals(mapOf("FEX_MULTIBLOCK" to "0"), off.games["42"])
}
@Test fun theSignatureFixIsOnlyKeptForDlss() {
val fsr = GameUpscaler.entries(GameUpscaler.Choice(GameUpscaler.Mode.FSR_XESS, signatureFix = true))
assertFalse(fsr.containsKey(GameUpscaler.SIGFIX))
val dlss = GameUpscaler.entries(GameUpscaler.Choice(GameUpscaler.Mode.DLSS, signatureFix = true))
assertEquals("1", dlss[GameUpscaler.SIGFIX])
}
@Test fun unknownValuesFallBackToDefaults() {
val config = GameEnvironment.Config().withEntries("7", mapOf(
GameUpscaler.MODE to "fsr", GameUpscaler.ENGINE to "bogus", GameUpscaler.SHARPNESS to "250"))
val choice = GameUpscaler.choice(config, "7")!!
assertEquals(GameUpscaler.DEFAULT_ENGINE, choice.engine)
assertEquals(100, choice.sharpness)
assertNull(GameUpscaler.choice(GameEnvironment.Config().withEntries("7", mapOf(GameUpscaler.MODE to "x")), "7"))
}
@Test fun npuEnginesRunOnTheGpuWithoutAnNpu() {
assertEquals(GameUpscaler.Engine.FSR4_FULL_GPU, GameUpscaler.effectiveEngine(GameUpscaler.Engine.FSR4_NPU, false))
assertEquals(GameUpscaler.Engine.FSR4_LITE_GPU, GameUpscaler.effectiveEngine(GameUpscaler.Engine.FSR4_LITE_NPU, false))
assertEquals(GameUpscaler.Engine.FSR4_NPU, GameUpscaler.effectiveEngine(GameUpscaler.Engine.FSR4_NPU, true))
assertEquals(GameUpscaler.Engine.XESS, GameUpscaler.effectiveEngine(GameUpscaler.Engine.XESS, false))
}
@Test fun fsr40NpuChoicesSavedEarlierRunFullFsr4OnTheNpu() {
val config = GameEnvironment.Config().withEntries("7", mapOf(
GameUpscaler.MODE to "fsr", GameUpscaler.ENGINE to "fsr4_0_npu"))
assertEquals(GameUpscaler.Engine.FSR4_NPU, GameUpscaler.choice(config, "7")!!.engine)
assertEquals("fsr4_1_full_npu", GameUpscaler.Engine.FSR4_NPU.id)
assertEquals(GameUpscaler.Engine.SGSR2, GameUpscaler.Engine.byId("sgsr2_gpu"))
}
@Test fun dlssGamesHaveTheSignatureFixOnUnlessSwitchedOff() {
val saved = GameEnvironment.Config().withEntries("7", mapOf(GameUpscaler.MODE to "dlss"))
assertTrue(GameUpscaler.choice(saved, "7")!!.signatureFix)
assertEquals("1", GameUpscaler.entries(GameUpscaler.Choice(GameUpscaler.Mode.DLSS))[GameUpscaler.SIGFIX])
val off = GameUpscaler.entries(GameUpscaler.Choice(GameUpscaler.Mode.DLSS, signatureFix = false))
assertEquals("0", off[GameUpscaler.SIGFIX])
val reread = GameUpscaler.choice(GameEnvironment.Config().withEntries("7", off), "7")!!
assertFalse(reread.signatureFix)
}
@Test fun theControlFileUsesTheLayersKeys() {
assertEquals("enabled=1\nbackend=fsr4_1_lite_gpu\nsharpness=0.55\nnpu_sync=0\n",
GameUpscaler.controlText(GameUpscaler.Engine.FSR4_LITE_GPU, 55, npuSync = false, enabled = true))
}
@Test fun theLayersStatusFileParses() {
val status = GameUpscaler.parseStatus(
"layer=1\nengine=fsr4\nbackend=fsr4_1_lite_gpu\nbackend_tag=FSR4.1-Lite-GPU\nactive=1\nnpu=0\n" +
"render=960x540\noutput=1920x1080\ngpu_us=3250\nhtp_us=0\nreason=ok\nts_ms=99\n")!!
assertTrue(status.active)
assertEquals("FSR4.1-Lite-GPU", status.backendTag)
assertEquals(3.25f, status.gpuMs, 0.001f)
assertEquals("1920x1080", status.output)
assertNull(GameUpscaler.parseStatus("active=1\n"))
}
}
@@ -1,57 +0,0 @@
package com.droiddeck.launcher.core
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test
class WirelessAdbReconnectTest {
private val local = WirelessAdbFix.LOOPBACK
private val old = 35555
private val current = 36666
@Test
fun localPortRotationWithoutMdnsUsesPairedKeyFallback() {
var scanned = false
val result = WirelessAdbFix.chooseConnectPort(
local, old, property = { old }, advertised = { accept ->
check(!accept(old))
null
}, answers = { it == old }, authenticatedLocal = {
scanned = true
current
},
)
assertEquals(current, result)
check(scanned)
}
@Test
fun localPortFromPropertyAvoidsDiscoveryAndScan() {
val result = WirelessAdbFix.chooseConnectPort(
local, old, property = { current }, advertised = { error("unexpected NSD") },
answers = { it == current }, authenticatedLocal = { error("unexpected scan") },
)
assertEquals(current, result)
}
@Test
fun staleLocalAdvertisementDoesNotBlockNextValidPort() {
val result = WirelessAdbFix.chooseConnectPort(
local, old, property = { null },
advertised = { accept -> listOf(old, 35000, current).firstOrNull(accept) },
answers = { it == current }, authenticatedLocal = { error("unexpected scan") },
)
assertEquals(current, result)
}
@Test
fun remoteSavedConnectNeverUsesLocalPropertyOrScan() {
val result = WirelessAdbFix.chooseConnectPort(
"203.0.113.10", old, property = { error("unexpected local property") },
advertised = { accept -> listOf(old).firstOrNull(accept) },
answers = { error("unexpected local reachability check") },
authenticatedLocal = { error("unexpected loopback scan") },
)
assertNull(result)
}
}
@@ -1,38 +0,0 @@
package com.droiddeck.launcher.core
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
class WirelessPairingKeypadTest {
@Test fun sixDigitsKeepLeadingZeroesAndRejectExtraKeys() {
val pad = WirelessPairingKeypad()
assertFalse(pad.ready)
listOf(0, 0, 1, 2, 3, 4).forEach { assertTrue(pad.press(it)) }
assertTrue(pad.ready)
assertFalse(pad.press(5))
assertFalse(pad.press(WirelessPairingKeypad.SUBMIT))
assertEquals("001234", pad.digits)
}
@Test fun deleteLetsYouCorrectTheLastDigit() {
val pad = WirelessPairingKeypad()
assertFalse(pad.press(WirelessPairingKeypad.DELETE))
"321987".forEach { pad.press(it.digitToInt()) }
assertTrue(pad.press(WirelessPairingKeypad.DELETE))
assertFalse(pad.ready)
assertEquals("32198–", pad.display)
assertTrue(pad.press(6))
assertEquals("321986", pad.digits)
}
@Test fun startingAnotherAttemptClearsTheCode() {
val pad = WirelessPairingKeypad()
assertFalse(pad.press(-1))
pad.press(7)
pad.clear()
assertEquals("", pad.digits)
assertEquals("––––––", pad.display)
}
}
@@ -1,6 +1,5 @@
package com.droiddeck.launcher.files
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
@@ -38,26 +37,4 @@ class AllFilesAccessTest {
assertFalse(AllFilesAccess.covers("/storage/1A2B-3C4D/Android/obb/com.droiddeck.launcher"))
assertFalse(AllFilesAccess.covers("/data/user/0/com.droiddeck.launcher/files"))
}
@Test
fun stateNamesWhatTheReportShows() {
assertEquals("not needed", AllFilesAccess.state(sdk = 29) { false })
assertEquals("missing", AllFilesAccess.state(sdk = 34) { false })
assertEquals("granted", AllFilesAccess.state(sdk = 34) { true })
}
@Test
fun sharedStorageMayHideFilesOnlyWithoutAccess() {
assertTrue(AllFilesAccess.mayHideFilesIn("/storage/emulated/0", sdk = 34) { false })
assertTrue(AllFilesAccess.mayHideFilesIn("/storage/1A2B-3C4D/Games", sdk = 34) { false })
assertFalse(AllFilesAccess.mayHideFilesIn("/storage/emulated/0", sdk = 34) { true })
assertFalse(AllFilesAccess.mayHideFilesIn("/storage/emulated/0", sdk = 29) { false })
}
@Test
fun appFoldersAndPrivateStorageNeverHideFiles() {
assertFalse(AllFilesAccess.mayHideFilesIn("/storage/emulated/0/Android/data/com.droiddeck.launcher/files", sdk = 34) { false })
assertFalse(AllFilesAccess.mayHideFilesIn("/data/user/0/com.droiddeck.launcher/files/Games", sdk = 34) { false })
assertFalse(AllFilesAccess.mayHideFilesIn("/mnt/media_rw/1A2B-3C4D", sdk = 34) { false })
}
}
@@ -15,4 +15,29 @@ class DependencyDetectorTest {
File(folder, "_CommonRedist/vcredist/2013/vcredist_x64.exe").writeText("x")
assertEquals(listOf("vcredist2013"), DependencyDetector.detect(folder).map { it.componentName })
}
@Test fun dotNetRuntimeInstallersMapToTheirOwnRuntime() {
assertEquals(listOf("dotnetcoredesktop3"), DependencyDetector.componentsFor("%INSTALLDIR%\\DotNetCore\\windowsdesktop-runtime-3.1.8-win-x64.exe"))
assertEquals(listOf("dotnetcoredesktop3"), DependencyDetector.componentsFor("_CommonRedist/DotNet/dotnet-runtime-3.1.32-win-x64.exe"))
assertEquals(listOf("dotnet50"), DependencyDetector.componentsFor("_CommonRedist/windowsdesktop-runtime-5.0.17-win-x64.exe"))
assertEquals(listOf("dotnetcoredesktop6"), DependencyDetector.componentsFor("_CommonRedist/windowsdesktop-runtime-6.0.16-win-x64.exe"))
assertEquals(listOf("dotnetcoredesktop8"), DependencyDetector.componentsFor("_CommonRedist/windowsdesktop-runtime-8.0.4-win-x64.exe"))
assertEquals(emptyList<String>(), DependencyDetector.componentsFor("_CommonRedist/windowsdesktop-runtime-9.0.0-win-x64.exe"))
}
@Test fun dotNetFrameworkInstallersKeepTheirMapping() {
assertEquals(listOf("dotnet48"), DependencyDetector.componentsFor("_CommonRedist/DotNet/4.8/ndp48-x86-x64-allos-enu.exe"))
assertEquals(listOf("dotnet472"), DependencyDetector.componentsFor("_CommonRedist/DotNet/4.7.2/NDP472-KB4054530-x86-x64-AllOS-ENU.exe"))
assertEquals(listOf("dotnet46"), DependencyDetector.componentsFor("_CommonRedist/DotNet/4.6.2/NDP462-KB3151800-x86-x64-AllOS-ENU.exe"))
assertEquals(listOf("dotnet40"), DependencyDetector.componentsFor("_CommonRedist/DotNet/dotNetFx40_Full_x86_x64.exe"))
assertEquals(listOf("dotnetcoredesktop6"), DependencyDetector.componentsFor("_CommonRedist/DotNet/6.0/setup_dotnet.exe"))
assertEquals(listOf("dotnet48"), DependencyDetector.componentsFor("_CommonRedist/DotNet/setup_dotnet.exe"))
}
@Test fun aBundledDesktopRuntimeFolderIsNotTakenForTheFramework() {
val folder = tmp.newFolder("Game")
File(folder, "DotNetCore").mkdirs()
File(folder, "DotNetCore/windowsdesktop-runtime-3.1.8-win-x64.exe").writeText("x")
assertEquals(listOf("dotnetcoredesktop3"), DependencyDetector.detect(folder).map { it.componentName })
}
}
@@ -97,6 +97,32 @@ class WinComponentDetectorsTest {
assertEquals(emptyList<Pair<String, String>>(), SteamRedists.installScript(File(steamapps, "missing")))
}
@Test fun aDesktopRuntimeTheInstallScriptRunsIsInstalledInsteadOfTheFramework() {
val steamapps = tmp.newFolder("steamapps")
val game = File(steamapps, "common/Launcher Game").apply { mkdirs() }
File(steamapps, "appmanifest_435150.acf").writeText("\"AppState\"\n{\n\t\"SharedDepots\"\n\t{\n\t\t\"228988\"\t\t\"228980\"\n\t\t\"228990\"\t\t\"228980\"\n\t}\n}\n")
File(game, "installscript.vdf").writeText(
"""
"InstallScript"
{
"Run Process"
{
"DotNetCore"
{
"HasRunKey" "HKEY_LOCAL_MACHINE\\Software\\Valve\\Steam\\Apps\\435150"
"process 1" "%INSTALLDIR%\\DotNetCore\\windowsdesktop-runtime-3.1.8-win-x64.exe"
"command 1" "/install /quiet /norestart"
}
}
}
""".trimIndent(),
)
val context = androidx.test.core.app.ApplicationProvider.getApplicationContext<android.content.Context>()
val found = WinCompSources.steamList(context, game, 435150, "Launcher Game", auto = true)
assertEquals(listOf("vcredist2019_dll", "d3dx9", "dotnetcoredesktop3"), found.map { it.component })
assertTrue(found.all { it.auto && it.origin == WinCompSources.Origin.STEAM })
}
@Test fun thePrefixCountsOnlyWhatDroidDeckDidNotPutThere() {
val compat = tmp.newFolder("compatdata", "409710")
val pfx = File(compat, "pfx")
@@ -1,37 +0,0 @@
package com.droiddeck.launcher.session
import java.io.File
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotEquals
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
class UpscaleBridgeVersionTest {
@get:Rule val tmp = TemporaryFolder()
private fun tree(name: String, nvngx: String): File {
val dir = tmp.newFolder(name)
for (file in UpscaleComponent.BRIDGE_FILES) {
File(dir, file).apply { parentFile?.mkdirs() }.writeText(if (file.endsWith("/nvngx.dll")) nvngx else file)
}
return dir
}
@Test fun aChangedDllWithTheSameSizeAndDateIsANewVersion() {
val old = tree("old", "aaaa")
val new = tree("new", "bbbb")
for (file in UpscaleComponent.BRIDGE_FILES) {
File(old, file).setLastModified(0)
File(new, file).setLastModified(0)
}
assertNotEquals(UpscaleComponent.localVersion(old), UpscaleComponent.localVersion(new))
}
@Test fun theSameFilesWithOtherDatesAreTheSameVersion() {
val a = tree("a", "same")
val b = tree("b", "same")
File(b, UpscaleComponent.BRIDGE_FILES.first()).setLastModified(1_000_000)
assertEquals(UpscaleComponent.localVersion(a), UpscaleComponent.localVersion(b))
}
}
@@ -1,42 +0,0 @@
package com.droiddeck.launcher.session
import java.io.File
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
class UpscaleComponentNpuTest {
@get:Rule val tmp = TemporaryFolder()
private val runtime = listOf("libQnnHtp.so", "libQnnHtpPrepare.so", "libQnnSystem.so")
private fun vendor(libs: List<String>, listed: List<String> = libs): Pair<File, File> {
val dir = tmp.newFolder("lib64")
libs.forEach { File(dir, it).writeText("") }
val list = tmp.newFile("public.libraries.txt")
list.writeText("# vendor libraries apps may load\n" + listed.joinToString("\n") { "$it 64" } + "\n")
return dir to list
}
@Test fun thePhonesOwnRuntimeNamesItsHtpGeneration() {
val (dir, list) = vendor(runtime + listOf("libQnnHtpV85Stub.so", "libcdsprpc.so"))
assertEquals("v85", UpscaleComponent.systemNpuArch(dir, list))
}
@Test fun librariesTheVendorDoesNotOfferToAppsDoNotCount() {
val libs = runtime + "libQnnHtpV85Stub.so"
val (dir, list) = vendor(libs, listed = libs - "libQnnHtpPrepare.so")
assertNull(UpscaleComponent.systemNpuArch(dir, list))
}
@Test fun twoStubGenerationsAreAmbiguous() {
val (dir, list) = vendor(runtime + listOf("libQnnHtpV79Stub.so", "libQnnHtpV81Stub.so"))
assertNull(UpscaleComponent.systemNpuArch(dir, list))
}
@Test fun noPublicLibraryListMeansNoSystemRuntime() {
assertNull(UpscaleComponent.systemNpuArch(tmp.newFolder("empty"), File(tmp.root, "missing.txt")))
}
}
+4 -4
View File
@@ -40,7 +40,7 @@ Player controls and observations work over authorized ADB on any build: `state`,
`resume`, `wait`, `launch`, `quit`, `focus`, `input`, `ui`, `logs`, `screenshot`, `record`, `pacing`,
`thermal`, `displays`, `wake`, `glasses` (except `glasses raw`), and `access`.
**Setup > Developer > droiddeckctl** is off by default in every build, including debug builds.
**Setup > Developer > Debugging tools** is off by default in every build, including debug builds.
It enables `run`, `guest`, `cdp`, all `env` operations, `override`, `prefs`, and `glasses raw`. The
toggle switches directly without a confirmation dialog. The bridge refuses to change it through `ui`
or preference writes. The existing preference key, `setting-agent-commands` test tag, JSON command
@@ -233,7 +233,7 @@ and returns its exit code with the last 160 KiB of stdout and stderr (`--timeout
`cloud down|up <store> <id>` syncs one game's cloud saves now, without launching it, with the
`result`, `files`, `bytes`, `reason`, `conflicts` and `detail` the game page shows; `--force` takes
that side over conflicts. The store id is the one in the game's install record (`library` shows
it). Both need Setup > Developer > droiddeckctl.
it). Both need Setup > Developer > Debugging tools.
`input pad` writes to the session's virtual pad, the one the guest sees, and never reaches the app's
own key handling. To test how DroidDeck's own screens treat a controller (menu focus and outlines,
@@ -243,13 +243,13 @@ controller, and presses the buttons in order: `a b x y lb rb select start guide
d-pad `up down left right`. `--hold` (120 ms) is how long each stays down and `--gap` (400 ms) the
pause after it; a d-pad press always waits at least 20 ms, so Android sees each release before
the next press. The device exists only while the command runs, takes about a second to appear, and
works without a session or Setup > Developer > droiddeckctl. Its name does not start with
works without a session or Setup > Developer > Debugging tools. Its name does not start with
`uinput-`, which the app treats as a system virtual device. `UINPUT_UNAVAILABLE` and `UINPUT_FAILED`
mean the same as for `input pen`.
`input pen` does not go through the app. It registers a virtual pen with `adb shell uinput -`, so
Android's own input reader makes the stylus events, as for a built-in pen, and it works on whatever
is on screen, without a session or Setup > Developer > droiddeckctl. Positions are fractions of
is on screen, without a session or Setup > Developer > Debugging tools. Positions are fractions of
the screen as shown; `dumpsys input` gives the frame, rotation and size of the display Android maps
internal touchscreens to. `hover` comes near and glides to `--to`; `tap`, `stroke` and `button`
hover for `--hover-ms` (80) before and after the touch or the button press. Each takes
+1 -1
View File
@@ -35,6 +35,6 @@ plays without sound rather than louder, and plays nothing if that fails too. Cov
Selecting a movie here sets `bootMovieApplyNext`, so the next session stages the movie as `bigpicture_startup.webm` and
points both sections at it, over a movie Steam had picked; otherwise a movie picked in Steam is left alone and taken over as
the choice here without being staged over Steam's own setting. Settings > Boot movie > Installed has a report button that
writes what Steam and DroidDeck know to `Download/DroidDeck/boot-movie-report.txt`; it only shows while droiddeckctl is on.
writes what Steam and DroidDeck know to `Download/DroidDeck/boot-movie-report.txt`; it only shows while Debugging tools is on.
A movie larger than 1920x1080 (4K and the like) is never copied or remuxed as it is: import and staging always convert it
(the converter scales to at most 1280x720), because such movies have made Steam crash while it starts.
+1 -1
View File
@@ -325,7 +325,7 @@ or repeatedly hit a path the wrappers cannot resolve.
### Opt-in tracer profiling
With **Setup > Developer > droiddeckctl** enabled, queue profiling for one session:
With **Setup > Developer > Debugging tools** enabled, queue profiling for one session:
```sh
tools/droiddeckctl proot-profile enable --slow-us 1000
+1 -1
View File
@@ -499,7 +499,7 @@ handed-off daemons. With only the hook's handoffs off (`DD_SPAWN_DAEMONS=0`), RE
runs in workers (`GuestWorkers.enabled`: the native userland, Android 11+, and the
`childProcessHandoff` session preference, on by default). It does not block Steam. Turning the
preference off (`droiddeckctl prefs set session childProcessHandoff false --type bool`, with
Setup > Developer > droiddeckctl on; see `docs/agent-control.md`) brings back
Setup > Developer > Debugging tools on; see `docs/agent-control.md`) brings back
the old behavior and the old requirement.
### C. Plan
-220
View File
@@ -7,221 +7,6 @@ the timeline, then lessons and backlog. Companion to the README (what the app *d
---
## 2026-12-05 - `feat/neural-upscaler`: brought up to main, stall fix device-proven in Hellblade (+10-12 %)
- **Why:** user 12-05 ~17:4x EST: "bring our npu upscaling branch up to main and install it". The branch was 56
commits behind main. The phone's DroidDeck had been moved to the Preview build of main `423f600d` at 17:45 EST
through DroidDeck's own Updates screen, so the earlier test build (`97188d37`) was no longer installed.
- **Built:** backup ref `refs/backup/20261205/feat-neural-upscaler-before-main-sync` (= `18102ef5`); merge of main
`423f600d` = `898b6376`, no conflicts. Files changed on both sides: SessionService.kt, FrontEndSetup.kt,
SessionOverlay.kt, strings.xml, droiddeck-game-env, test_game_environment.py (234 tests OK locally, isolated
env). Main did not touch `tools/bionic-runtime/tool`, so the bionic patch script still applies. Test branch
`test/neural-upscaler-rm12` = `f80d581e` (merge + the debuggable commit, never merge).
- **CI:** Build APK 47579062115 (headSha `f80d581e`) green, all jobs (skips = the usual cached / PR-only steps);
Unit tests 47579064807 (headSha `898b6376`) green.
- **Installed (Red Magic, 12-05 18:02 EST):** `/sdcard/Download/DroidDeck-upscale-rm12-f80d581e-pubg.apk`, sha256
`79242728...`, signer b241ea7d, debuggable; installed base.apk hash == staged; `run-as` works; crash buffer empty
after install. DroidDeck-Bionic r104 `proton` + `bionic/launch.sh` on the phone == branch (`edb9c6c6` /
`e8890a4f`), 24 bridge DLLs present. Proof level: installed, app not opened, no game run yet.
- **Stall fix:** committed `69f4d4ad` (GPU waits on a host-set event in the next frame; Full + Lite NPU paths;
`DROIDDECK_UPSCALE_NPU_CPU_WAIT=1` = old wait). Compiles clean (glibc build + Android-target clang syntax check).
Test branch `test/neural-upscaler-rm12-gpuwait` = `9aa10e10`, Build APK 47579674322 green (both layer copies carry
the change). Installed on the Red Magic 12-05 18:30 EST (user: "install it"): `DroidDeck-upscale-rm12-9aa10e10-pubg.apk`,
sha256 `26d315a4...`, installed hash == staged, debuggable, crash buffer empty. No game run yet (user: "no
cyberpunk yet"). Proof level: installed, not device-tested.
- **Test games + engine round (user 12-05 ~19:5x EST: "test each upscale, record metrics and acquire screenshots"):**
user installed Hi-Fi RUSH (DLSS + XeSS files) and Hellblade: Senua's Sacrifice (DLSS file) from DroidDeck's Xbox
store and ran both on DroidDeck-Bionic r104 (upscaler was off then). Set: Hellblade (game id 3789431815) mode
`dlss`, Hi-Fi RUSH (3167215550) mode `fsr` (XeSS route), engine `fsr4_1_full_npu`, log on; settings backup
`/root/src/npu-rm/game-environment.json.bak-1205e`. Plan per game: enable DLSS/XeSS in the game's options, then
`engine-round.sh` (live switch: off, fsr3_gpu, xess3_gpu, sgsr2_gpu, Lite GPU/NPU, Full GPU/NPU, NPU sync) with fps,
GPU/NPU ms, GPU load, temperatures and 2 screenshots per engine (phone Download/upscaler-test-20261205), then a
relaunch with `DROIDDECK_UPSCALE_NPU_CPU_WAIT=1` for the NPU engines. Resume: rerun the round on a running game;
restore settings from the backup at the end.
- **Hi-Fi RUSH round 1 (20:00-20:09 EST, build `9aa10e10`, XeSS Performance 795x360 -> 1590x720, main-menu scene, GPU
96-99 %):** fps / GPU ms / NPU ms: stretch ~108; FSR 3.1 ~87 / 3.0; XeSS 3 ~58 / 11.0; SGSR 2 ~88 / 1.4; Lite GPU
~51-57 / 9.8; Lite NPU async ~57 / 6.6 / 5.9, sync ~52; Full GPU ~21 / 36.1; Full NPU async ~53-56 / 6.3 / 6.4, sync
~49. Stretch at the end 81 fps (battery 48 C, thermal drift). Game input stopped reaching the game after the round;
closed by ending the process (no leftovers, no crash). Next: same scene with `DROIDDECK_UPSCALE_NPU_CPU_WAIT=1`.
- **Hi-Fi RUSH old vs new NPU wait (20:13-20:25 EST, same scene, 2 cycles each, phone hot 48-50 C):** old
(`NPU_CPU_WAIT=1`): stretch 56-58, Full NPU 41-42, Lite NPU 40-43; new (default): stretch 60-61, Full NPU 40-41,
Lite NPU 42-44. No measurable difference: this scene is GPU-bound (GPU ~96 % in both modes), and FSR 4.1 NPU costs
6.3-7.6 ms of GPU passes here (FSR 3.1: 3.0 ms, SGSR 2: 1.4 ms). The stall seen in Cyberpunk (GPU 90-93 % with FSR
4.1) is not tested with the fix yet. No crash or GPU hang in 3 launches. Next: Hellblade (DLSS route).
- **Hellblade (DLSS route, DX12, DLSS Performance 640x360 -> 1280x720), 20:30-21:21 EST:** DLSS selectable with the RTX
spoof; round 1 on the menu face scene, GPU 99 %, no drift: stretch ~104; FSR 3.1 ~90 / 1.4 ms; XeSS 3 ~61.5 / 6.8;
SGSR 2 ~94 / 1.1; Lite GPU ~53 / 9.7; Lite NPU async ~57, sync ~52; Full GPU ~22 / 35.6; Full NPU async ~53.7, sync ~48.
**Old vs new NPU wait, paired, same main-menu scene, stretch ~122 in both:** old: Full NPU 53-55 fps at GPU 84-87 %,
Lite NPU 59-61 at GPU 88-90 %; new: Full NPU 60.6-61.3 at GPU 98-99 %, Lite NPU ~66 at GPU 98-99 %. **The fix works
here: +12 % Full, +10 % Lite, GPU no longer idles.** (Hi-Fi RUSH showed no change: its GPU was already ~96 % busy.)
Device-proven on the Red Magic, build `9aa10e10`. Two Hellblade starts failed right after a killed session (guest
exits after 2 s, Xwayland "Broken pipe"); a later start worked (transient, cause unproven). In both games the game
stopped taking pad input after a while (Steam re-sets the virtual Deck controller features; cause unproven), so
games were closed by ending the process. Game settings changed for the tests: Hi-Fi RUSH V-Sync off, frame limit
120, Intel XeSS Performance; Hellblade V-Sync off, DLSS Performance. DroidDeck HUD went to the strip layout by an
on-screen Menu-button tap.
- **Resume point:** if the session dies, check the two runs above; `bash /root/src/npu-rm/sign-stage.sh <build run>
f80d581e` (temp key dir must exist; delete it after signing). Rollback = `/sdcard/Download/DroidDeck-0.7.11-pubg-rollback.apk`
or the pulled Preview APK `/root/src/npu-rm/installed/now-1745.apk` (`adb install -r`).
- **Also 12-05:** frame-stall cause found in code (not fixed yet): in the default async NPU mode the layer's
recording thread waits on the CPU for the previous frame's NPU result (`fsr411_full_gpu.c` and `fsr412_lite.c`,
up to 200 ms), and that result needs the GPU to finish the previous frame first, so CPU and GPU take turns.
Planned fix: the next frame's command buffer waits on the GPU for a host-set event instead (switch to go back:
`DROIDDECK_UPSCALE_NPU_CPU_WAIT=1`).
---
## 2026-12-04 - `feat/neural-upscaler`: Winlator-NeuralScale r5 ported, non-root parts only (CI running)
- **Why:** upstream r5 (`71c140d9`) adds full FSR 4.1 on the NPU, a ghosting fix, S8/U8 Lite graphs, Snapdragon GSR 2
and D3D11 DLSS. The user asked for those five and nothing that needs root.
- **Built:** `74ece6c8` = three-way merge of layer + bridges (base `a0ab6b0f`), new `sgsr2_gpu.c` + shaders,
`wl_dxvk_interop.h`; data files re-pinned to `71c140d9` (89 files, sha256); new engine `sgsr2_gpu`, NPU engine id
`fsr4_1_full_npu` (saved `fsr4_0_npu` maps to it: FSR 4.0 is gone upstream); XeSS 3 kept (upstream maps `xess` to
FSR 3 and dropped Intel's runtime in `cb3ae04e`; we still fetch it from `a0ab6b0f`); NPU detection stays ours
(`DROIDDECK_UPSCALE_NPU`), upstream's SoC list removed; full-FSR-4-on-Turnip guard now opt-in
(`DROIDDECK_UPSCALE_FULL_OFF_ON_TURNIP=1`). Not ported: RootPerfManager, RootThermal*, GPU clock floor, bypass charging.
- **Checked locally:** all 8 layer files compile and link for Android (clang, Khronos headers, -Wall clean); the
glibc stub variant compiles; `tools/tests/test_game_environment.py` 231 OK (isolated HOME). Bridge DLLs: CI only.
- **CI:** Build APK 47450218949 (`d6f8736e`) FAILED in "Prepare verified components": the glibc layer build has no
`sys/system_properties.h` (upstream r5 include; my local check compiled with Android headers, so it missed it).
Fix `1a621bcf` (include dropped, heartbeat write checked); `build-glibc.sh` now run locally with the container's gcc
= builds, 0 warnings. Rerun Build APK 47450693166 (`23621838`) FAILED at the bridges: `nvngx.dll` did not link
(merge kept our old D3D11 `PopulateParameters` line calling the removed "DLSS unavailable" helper). I had wrongly
read a cache-hash line in run 1 as "bridges built". Fix in the next commit; all six DLLs now built locally with
mingw-w64 13.2 (`tools/upscale/bridges/build.sh`), exports match.
- **CI run 3:** Build APK 47451847785 GREEN on `e67bd76e` (= `379198e4` code + the debuggable-only commit): layer glibc
built, 6 bridges match their exports, APK compiled. App unit tests (separate workflow) 47452868772 on `379198e4`:
5512 tests, 0 failures (GameUpscalerTest 8, UpscaleComponentNpuTest 4).
- **Installed (user yes, 19:23 EST):** Red Magic 12 Pro, pubg variant signed b241ea7d, installed sha256 `65e09d96`;
the 24 new bridge DLLs copied to the app's external `droiddeck-upscale/bridges`.
- **Bug found while staging:** the local-copy bridge stamp is `local-<libxess size>-<mtime>`; CI DLLs have mtime 0 and
libxess.dll kept its size (31232), so the app would keep the old DLLs. Test worked around by removing the staged
`.pack` (backup `.pack.bak-r5`); fix = stamp from the files' contents.
- **First run (XeSS DX12 demo, 19:27 EST):** menu lists Snapdragon GSR 2 and FSR 4 on NPU; Full FSR 4.1 S8 graph compiled
on the phone's V85 NPU in 2.65 s and ran zero-copy (GPU 6.5 ms + NPU 5.4 ms, 960x540 to 1080p); the depth stand-in
for depth-less games logged. Most status rows were junk: the game still loaded the OLD bridge DLLs, because
`ensure()` staged only when no DLLs were staged. Fix `aabacc10` (re-stage when present, content-hash stamp, test).
For this test the 24 new DLLs were copied into the rootfs by hand (run-as), hashes == CI.
- **CI:** Build APK 47455548997 (`50864970` = `aabacc10` + debuggable commit), unit tests 47455552638.
- **Device results (19:37-19:58 EST, new DLLs):** XeSS DX12 round: every engine runs (Full NPU sync 4.6+3.3 ms,
Full GPU 27.1 ms, Lite NPU 5.0+4.9, Lite GPU 7.2, SGSR 2 1.8, FSR 3 3.3, XeSS 11.6), BUT Full FSR 4.1 shows a black
picture in DX12: 0 coloured pixels in 9/9 shots (`/root/src/npu-rm/tools/pngstat.py`), others 28-32k. XeSS Vulkan
sample: Full shows the picture (GPU and NPU). DLSS sample with `-d3d11`: same NGX GetFeatureRequirements
PlatformError as D3D12, raised before our bridge (D3D11 DLSS untested).
- **Fixes:** `83de9e38` guard at dispatch: D3D12 frames on Turnip -> Lite (`FULL_ON_TURNIP=1` forces Full);
`2446d48e` test switches `FULL_DIRECT_OUT=0` / `FULL_AUTO_EXPOSURE=0`. Prime suspect: the Tier 1.1 direct write
into the game's output, which only D3D12 frames take (exactly 1920x1080 output). Upstream validated DX12 only with
Cyberpunk 2077 (README).
- **CI:** 47457143185 failed (flaky test_dircache_preload + IME download reset), cancelled; 47459802031 (`2446d48e`)
green after a rerun of the IME download step. Staged APK sha256 `6f267e61`; user said "device is yours".
- **Picture tests on `2446d48e` (installed 20:36 EST, `/root/src/npu-rm/fulltest.sh`):** A direct write off -> black
0/6; C direct write + exposure pass off -> black 0/6 (hdr=1); E `VKD3D_DISABLE_EXTENSIONS=VK_EXT_descriptor_buffer`
with the direct write on -> picture 5/6. Root cause: vkd3d-proton's own descriptor buffers in the command buffers
the upscaler records into break Full's descriptor-buffer passes on Turnip.
- **Fix `7aa54ab9`:** the layer hides `VK_EXT_descriptor_buffer` from games (still uses it itself;
`APP_DESCRIPTOR_BUFFER=1` shows it); Lite fallback only when a game enables it anyway; test switches removed.
CI Build APK 47463181144 (`26811a77`).
- **12-05 device results (builds `26811a77`, then `3bd1d6f9`):** fix device-proven: XeSS DX12 sample Full GPU/NPU show the
picture; measured all-engine rounds (4 shots each) DX12 + Vulkan: every engine shows the picture. Staging fix
`0750f2d0` proven ("upscaler bridges staged from local-<hash>: 24/24", and again after a real DLL change).
- **Cyberpunk 2077 (DX12, XeSS route):** Full FSR 4.1 NPU runs on the title scene, 795x360 -> 1590x720, GPU 6.0 ms +
NPU 5.8 ms, picture correct. Gotcha: UserSettings.json options are read by `index`, not `value`.
- **vkd3d descriptor buffers hidden vs shown (Cyberpunk title, Lite NPU):** ~135 vs ~126 fps (noise) -> the fix costs
nothing.
- **DLSS:** the NGX "PlatformError" was NGX's signature check; with `DROIDDECK_UPSCALE_SIGFIX=1` the DLSS sample passes it.
D3D11 then failed in EvaluateFeature: upstream's `extract_ngx_dx11_res` zeroed VkImageCreateInfo, DXVK returns
E_INVALIDARG unless sType is IMAGE_CREATE_INFO. Fix `ffe46fe5`. DLSS sample now runs Full FSR 4.1 NPU in D3D11
(1280x720 -> 2560x1440, GPU 5.1 + NPU 4.6 ms, ~52 fps) and in D3D12 (GPU 5.1 + NPU 4.4-6.0 ms, ~49 fps).
SIGFIX stays opt-in (default = user decision).
- **CI:** Build APK 47488918399 (`5546b35e` = `ffe46fe5` + the debuggable-only commit), green; installed on the phone
12-05 02:1x EST (sha256 `cfbc4be0`) with its CI-built bridge DLLs. Final device check with exactly these files is
still owed (phone screen locked at 02:03 EST).
- **Real-game DLSS still open:** Bright Memory: Infinite (UE4, D3D12) never loads the bridge's nvapi64.dll ("Failed to
initialize NVAPI", no bridge log), so the signature-fix hooks do not run and NGX's own loader rejects the core
("failed to load C:\windows\system32\_nvngx.dll", D3D12_Init FeatureNotSupported). Putting the DLLs into system32
did not help (`73442ad3`, reverted in `bb5c53a7`). The game also picks its upscaler from its own menu.
- **Not used:** a Deep Rock Galactic copy that carries a DRM-bypass DLL.
- **Real-game DLSS (Bright Memory: Infinite), 12-05 02:2x-03:0x EST:** with nvapi64.dll + NGX DLLs in its system32
(`04a67aa7` now does this in DLSS mode) the signature-fix hooks install and NGX reports "DLSS supported 1"; the game
creates DLSS features (795x360 -> 1590x720, title 5 -> 20 fps). The bridge's new log shows attach ok, seam ready,
images found, dispatch 1, yet the layer upscaled nothing (status reason ok, api None, 0x0). `e5d7bddf` guessed a
full buffer table (not confirmed); cause found after: the layer read doorbells from the last mailbox (the XeSS
bridge's), fixed by pairing markers with their mailbox (`e422ab68`).
- **Device-proven 12-05 03:09-03:31 EST, Red Magic 12 Pro, signed test build 97188d37 (= feat 0cb6afbf + test
marker, CI 47496699289 green; unit tests 47495215764: 5515 tests, 0 failures):**
- Bright Memory: Infinite (D3D12, Unreal, Streamline): status `api=DLSS (DX12) 640x360 -> 1280x720`,
FSR 4.1 Full on the NPU, GPU 4.7 ms + NPU 4-6 ms, HUD "FSR4.1-Full-NPU 4.4ms", picture correct, no crash.
Its system32 holds the CI copies of nvapi64/_nvngx (placed by game-env `04a67aa7`).
- DLSS demo with NO signature-fix entry in its settings (default on, `d47ed325`): bridge log shows the hooks
(WinVerifyTrust/CryptQueryObject/nvngx redirect); D3D12 46.8-48.7 fps, D3D11 38.5-50.0 fps,
1280x720 -> 2560x1440, no crash.
- All-engine rounds (XeSS samples DX12 + Vulkan, 9 engine/sync specs each): every engine active with its own
tag, picture present, same flicker pattern as the rounds before this change, no crash.
- Open: Deep Rock Galactic not tested (the installed copy is a cracked build; not worked around).
- **Cyberpunk A/B on the phone (12-05 04:33-05:06 EST, unplugged, build 97188d37):** game's own benchmark via launch
option `-benchmark -skipStartScreen` (writes summary.json + frames.csv, exits); window 1590x720, upscaler runs on the
game's XeSS Performance (795x360). One run each, native repeated last (same 11.41 avg = no heat drift).
| setup | avg | 1% low | W (battery, benchmark only) | fps/W | GPU load (HUD) |
|---|---|---|---|---|---|
| native | 11.41 | 7.9 | 10.09 (repeat 9.67) | 1.13 | 99 % |
| FSR 4.1 Full NPU | 12.25 | 8.5 | 9.71 | 1.26 | 92-93 % |
| SGSR 2 | 15.89 | 10.0 | 12.79 | 1.24 | 99 % |
| plain stretch (upscaler off live) | 15.67 | 9.6 | 10.39 | 1.51 | 99 % |
Findings: (1) FSR 4.1 Full NPU costs ~18 ms per frame vs the plain stretch (81.6 vs 63.8 ms) while the status reports
GPU 8.2 + NPU 6.2 ms and the GPU sits partly idle: the async NPU path still stalls each frame (same pattern as Bright
Memory: 15 vs 20 fps). Open, not investigated. (2) With FSR 4.1 Full NPU on, Cyberpunk hangs on exit after the
benchmark (black, GPU 0 %, process alive 6+ min); SGSR 2, stretch, native exit normally. Open. (3) Picture (zoomed
crops at the same spot): FSR 4.1 close to native; SGSR 2 looks nearly as blocky as the plain stretch.
The benchmark moves its camera at most 66 ms per frame: every run = 64.2 s of path (used to match screenshots).
Report: /sdcard/Download/Cyberpunk-upscaler-test-RM12-20261205.html (phone).
- **Correction (12-05 13:0x EST):** the report's "same spot" screenshot rows were NOT the same spot (e.g. native = a
close-up of a woman, FSR 4.1 = the pool table, SGSR 2 = a man in smoke, stretch = the bar), and the zoomed crops
were taken at different distances. The 66 ms route model itself holds (64.15-64.19 s in all five runs); the error
was mapping screenshot clock times onto the benchmark. Finding (3) above is therefore not reliable.
- **Fair test (12-05 13:2x EST, running):** same DroidDeck 720p (1590x720) and game settings for every setup; 7
numbers runs (native, FSR 4.1 NPU and SGSR 2 at XeSS Performance 795x360 and Quality 1060x480, plain stretch,
native repeat), then 6 picture runs with back-to-back raw screenshots, matched across runs by image. Phone on
the charger: no watts this round. Scripts: npu-rm `cp-ab3.sh` / `cp-ab3-all.sh` (local test kit).
Result at 1590x720 (one run each): native 11.25 fps, FSR 4.1 NPU Quality 10.33 (-8 %), Performance 11.67 (+4 %),
SGSR 2 Quality 12.91 (+15 %), Performance 14.28 (+27 %), plain stretch 15.01 (+33 %); GPU load (HUD) 89-93 % with
FSR 4.1, 98-99 % otherwise. Same-spot pictures: FSR 4.1 close to native at both settings; SGSR 2 shows a blocky
mosaic on moving people and edges (our shader uses Qualcomm's 9-tap filter, so this looks like a setup problem;
not checked yet); plain stretch is soft, not blocky. FSR 4.1 exit hang seen again in all 4 FSR 4.1 runs.
- **Rerun at 1280x720 (user, 12-05 14:34-15:24 EST, done):** same plan with the game at 1280x720
(`DROIDDECK_GAME_RESOLUTION`) on DroidDeck's 720p output; XeSS Quality 853x480, Performance 640x360. Phone
unplugged. Warm native (battery 41-42 C) 13.23 / 13.44 fps (the first native run started at 36 C: 16.02, not
used). FSR 4.1 NPU Quality 11.83 (-12 %), Performance 13.54 (+1 %); SGSR 2 Quality 14.91 (+11 %), Performance
17.16 (+28 %); plain stretch 17.45 (+30 %). GPU load (HUD) 90-93 % with FSR 4.1, 98-99 % otherwise. Pictures at
the same spots: same verdict as at 1590x720. Report replaced in the phone's Download
(Cyberpunk-upscaler-test-RM12-20261205.html, 8 MB). Test-kit fixes: close Wine services left after the game
(they kept a session open once), route start = after the last run of 5+ black frames. Cyberpunk restored
(no DroidDeck entry, original UserSettings, launch option empty).
- Lesson: phone temperature moves fps by ~20 % here (cool start 16.0 vs warm 13.4 fps, same setup); every
numbers run must start at the same warmth, and a native repeat at the end is needed to see it.
- **User decisions 12-05:** (1) signature fix ON by default in DLSS mode (switch stays, off is stored as `0`);
(2) no PR yet: keep testing and fixing on the branch.
---
## 2026-12-04 - `feat/neural-upscaler`: NPU engines on the phone's own QNN runtime (Red Magic 12 Pro, no root)
- **Why:** the upscaler's NPU engines only knew the bundled QNN files for HTP v79/v81. The Red Magic 12 Pro (SM8975,
HTP V85) ships Qualcomm's QNN runtime and lists it for apps in `/vendor/etc/public.libraries.txt`.
- **Built:** main merged in (`94bcfca5`); `c18aa23a` + `94754fea`: the app takes the HTP generation from the vendor's
`libQnnHtpV<NN>Stub.so` and passes `DROIDDECK_UPSCALE_HTP_ARCH`; the layer uses the bundled QNN files only for an
arch whose skel came with them, else the vendor libraries by name; no NPU download group on such phones.
- **CI:** Build APK 47341155158 green (test branch `test/neural-upscaler-rm12` = this + a debuggable-only commit,
never merged; 47338667435 failed on a Maven 429 and on my `this.npu()` inside `buildSet`).
- **Device test (Red Magic 12 Pro, DroidDeck-Bionic r104 with this branch's tool lines):** the NPU engines are offered
in the game menu; XeSS SDK demos (DX12, Vulkan), 960x540 to 1080p: FSR 4 Lite on the NPU = NPU 1.3-1.6 ms per frame
and 2-2.5 ms less GPU time than FSR 4 Lite on the GPU, picture correct; FSR 4.0 on the NPU (3.5-3.7 ms), XeSS 3
(10 ms) and the basic upscaler run; the NPU graph compiles on the phone in about 2 s and loads from cache after.
- **Open:** XeSS runtime missing on a game's first launch (staged before the prefix exists); DLSS demo stops at NGX
GetFeatureRequirements (PlatformError) after the VC++ 14 component; FSR 4.1.2 log text names v81 on every arch.
---
## 2026-10-16/17 - `feat/x86-64-steam-client`: web helper on the GPU, org main, review rounds
- **x86-64 web helper on the GPU** (`f603a085`): the client's own steamwebhelper runs ANGLE's GL backend
@@ -1659,11 +1444,6 @@ State: **main = `90c7574`** (PR #14 merge), main build run 35895701784. No tag,
- `app/src/main/cpp/waylandcomp/` - the compositor (shared lineage with Bannerlator).
## Lessons learned (don't repeat these)
- Check the PRoot layer with `tools/upscale/layer/build-glibc.sh` and a real glibc gcc (`CC=/usr/bin/gcc` in the
container), not clang with an Android target: Android headers hide glibc-only breaks (2026-12-04, r5 port).
- Build the bridge DLLs locally (`apt install gcc-mingw-w64-x86-64`, `tools/upscale/bridges/build.sh <dir>`) before CI
after any merge touching them; read the CI step's own output lines, not a hash line, before saying a step passed.
- Nothing in teardown may do bulk filesystem work on the main thread (0.1.1's ANR).
- A CI closure check on a multi-line variable must flatten it first (`libaaudio.so` refusal).
- A runtime script must be named `bannerlator-*` or CI never packages it.
+2 -4
View File
@@ -45,8 +45,7 @@ Links of the form `droiddeck://settings/<section>` open a Settings section direc
| Use as Home screen | Settings › Launcher (`droiddeck://settings/launcher`) | home screen, launcher |
| Launcher orientation | Settings › Launcher (`droiddeck://settings/launcher`) | rotate, portrait |
| Session orientation | Settings › Launcher (`droiddeck://settings/launcher`) | rotate, portrait |
| Launcher fullscreen | Settings › Launcher (`droiddeck://settings/launcher`) | status bar, navigation bar, portrait |
| Session fullscreen | Settings › Launcher (`droiddeck://settings/launcher`) | status bar, navigation bar, portrait |
| Fullscreen | Settings › Launcher (`droiddeck://settings/launcher`) | |
| Swipe between pages | Settings › Launcher (`droiddeck://settings/launcher`) | gesture |
| Controller haptics | Settings › Launcher (`droiddeck://settings/launcher`) | vibration, rumble |
| Dual screen launcher | Settings › Launcher (`droiddeck://settings/launcher`) | thor, second screen, bottom screen |
@@ -59,8 +58,7 @@ Links of the form `droiddeck://settings/<section>` open a Settings section direc
| Game debug logs | Settings › Developer (`droiddeck://settings/developer`) | logs, wine, proton |
| Enhanced diagnostics for next session | Settings › Developer (`droiddeck://settings/developer`) | logs |
| Reset all settings | Settings › Developer (`droiddeck://settings/developer`) | default |
| Show developer tools | Settings › Developer (`droiddeck://settings/developer`) | agent, ai, claude, codex |
| droiddeckctl | Settings › Developer (`droiddeck://settings/developer`) | debugging tools, cli |
| Developer tools | Settings › Developer (`droiddeck://settings/developer`) | agent, ai, claude, codex |
| Detailed graphics logs | Settings › Developer (`droiddeck://settings/developer`) | logs, gpu |
## Tabs
+1 -5
View File
@@ -51,7 +51,6 @@ for v in $(env | sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p'); do
DXVK_LOG_PATH|VKD3D_LOG_FILE|MESA_LOG_FILE) ;;
DROIDDECK_GPU_LOAD|DROIDDECK_GPU_LOAD_DIR|DROIDDECK_VRAM_CAP|DROIDDECK_VRAM_CAP_MB|DROIDDECK_DISPLAY_DRIVER) ;;
DROIDDECK_GUEST_ROOT) ;;
DROIDDECK_UPSCALE|DROIDDECK_UPSCALE_*|WINEDLLPATH|ADSP_LIBRARY_PATH|PROTON_ENABLE_NVAPI|DXVK_ENABLE_NVAPI|WINE_HIDE_NVIDIA_GPU) ;;
VKD3D_FEATURE_LEVEL|VKD3D_SHADER_MODEL|vk_x11_strict_image_count) ;;
# droiddeck-game-env's original Xbox switches for this layer's Wine and the Xbox VKD3D-Proton build
WINE_SPECIAL_APC_INTERRUPT|WINE_MF_DISPLAY_APERTURE|WINE_PRECISE_SLEEP) ;;
@@ -93,10 +92,7 @@ echo "driver $DRVDIR"
RTD=$APP/.wayland-rt
export VK_ICD_FILENAMES=$PACK/adapter/icd.json ADRENOTOOLS_DRIVER_PATH=$DRVDIR/ ADRENOTOOLS_HOOKS_PATH=$PACK/lib
export ADRENOTOOLS_DRIVER_NAME=$(drvlib "$DRVDIR")
# The in-game upscaler's layer is in the APK; DroidDeck writes its manifest to DROIDDECK_UPSCALE_LAYER.
UPSCALE_LAYER=""
[ -n "${DROIDDECK_UPSCALE:-}" ] && [ -n "${DROIDDECK_UPSCALE_LAYER:-}" ] && [ -d "$DROIDDECK_UPSCALE_LAYER" ] && UPSCALE_LAYER=":$DROIDDECK_UPSCALE_LAYER"
export VK_ADD_IMPLICIT_LAYER_PATH=$PACK/layer$UPSCALE_LAYER ENABLE_GAMESCOPE_WSI=1 GAMESCOPE_WAYLAND_DISPLAY=${GAMESCOPE_WAYLAND_DISPLAY:-gamescope-0}
export VK_ADD_IMPLICIT_LAYER_PATH=$PACK/layer ENABLE_GAMESCOPE_WSI=1 GAMESCOPE_WAYLAND_DISPLAY=${GAMESCOPE_WAYLAND_DISPLAY:-gamescope-0}
export XDG_RUNTIME_DIR=$RTD DROIDDECK_WSI_BYPASS_CHECK_MS=100 GAMESCOPE_WSI_FORCE_BYPASS=0
echo "WSI forced XWayland bypass disabled (GAMESCOPE_WSI_FORCE_BYPASS=$GAMESCOPE_WSI_FORCE_BYPASS)"
[ -e "$RTD/droiddeck-gamescope-limiter" ] && export GAMESCOPE_LIMITER_FILE=$RTD/droiddeck-gamescope-limiter
-15
View File
@@ -103,21 +103,6 @@ case "$verb" in
done
# The HUD's GPU-load folder is a guest path; the bionic game writes to it by its Android path.
[ -n "${DROIDDECK_GPU_LOAD_DIR:-}" ] && { DROIDDECK_GPU_LOAD_DIR=$(real "$DROIDDECK_GPU_LOAD_DIR"); export DROIDDECK_GPU_LOAD_DIR; }
# The in-game upscaler's folders and files (droiddeck-game-env sets them as guest paths); the bridge folder on
# WINEDLLPATH and the NPU skeleton folder at the head of ADSP_LIBRARY_PATH as well.
for v in DROIDDECK_UPSCALE_DIR DROIDDECK_UPSCALE_CTRL_FILE DROIDDECK_UPSCALE_STATUS_FILE DROIDDECK_UPSCALE_NATIVELIB_DIR; do
[ -n "${!v:-}" ] && { printf -v "$v" '%s' "$(real "${!v}")"; export "${v?}"; }
done
if [ -n "${DROIDDECK_UPSCALE:-}" ] && [ -n "${WINEDLLPATH:-}" ]; then
out=""
IFS=: read -r -a parts <<< "$WINEDLLPATH"
for part in "${parts[@]}"; do [ -n "$part" ] && out="${out:+$out:}$(real "$part")"; done
WINEDLLPATH=$out; export WINEDLLPATH
fi
if [ -n "${DROIDDECK_UPSCALE:-}" ] && [ -n "${ADSP_LIBRARY_PATH:-}" ]; then
head=${ADSP_LIBRARY_PATH%%;*}
ADSP_LIBRARY_PATH="$(real "$head")${ADSP_LIBRARY_PATH#"$head"}"; export ADSP_LIBRARY_PATH
fi
# So are the graphics log locations Detailed graphics logs or game debugging set for this launch.
for v in DXVK_LOG_PATH VKD3D_LOG_FILE MESA_LOG_FILE; do
[ -n "${!v:-}" ] && { printf -v "$v" '%s' "$(real "${!v}")"; export "${v?}"; }
+1 -40
View File
@@ -17,7 +17,6 @@
"tools/vr",
"tools/ime",
"tools/gpuload",
"tools/upscale/layer",
"app/src/main/cpp/waylandcomp/generated",
"app/src/main/cpp/waylandcomp/src/headpose_shm.h",
"app/src/main/cpp/waylandcomp/src/spatialpose_shm.h",
@@ -30,9 +29,7 @@
"app/src/main/assets/linuxfs/usr/local/share/droiddeck/ibus.profile",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-ime/ibus-engine-pinyin",
"app/src/main/assets/linuxfs/usr/share/pyzy/db/android.db",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-gpuload/libVkLayer_droiddeck_gpuload.so",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale-layer/libVkLayer_droiddeck_upscale.so",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale-layer/VK_LAYER_DROIDDECK_upscale.json"
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-gpuload/libVkLayer_droiddeck_gpuload.so"
],
"ndk": true,
"packages": [
@@ -276,41 +273,5 @@
"lld",
"llvm"
]
},
"upscale-bridges": {
"script": "tools/components/recipes/upscale-bridges.sh",
"inputs": [
"tools/upscale/bridges",
"tools/components/recipes/upscale-bridges.sh"
],
"outputs": [
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/x86_64-windows/_nvngx.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/x86_64-windows/amd_fidelityfx_dx12.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/x86_64-windows/amd_fidelityfx_loader_dx12.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/x86_64-windows/amd_fidelityfx_upscaler_dx12.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/x86_64-windows/amd_fidelityfx_upscaler_vk.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/x86_64-windows/amd_fidelityfx_vk.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/x86_64-windows/ffx_fsr2_api_x64.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/x86_64-windows/ffx_fsr3upscaler_x64.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/x86_64-windows/libxess.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/x86_64-windows/nvapi64.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/x86_64-windows/nvngx.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/x86_64-windows/nvngx_dlss.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/aarch64-windows/_nvngx.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/aarch64-windows/amd_fidelityfx_dx12.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/aarch64-windows/amd_fidelityfx_loader_dx12.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/aarch64-windows/amd_fidelityfx_upscaler_dx12.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/aarch64-windows/amd_fidelityfx_upscaler_vk.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/aarch64-windows/amd_fidelityfx_vk.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/aarch64-windows/ffx_fsr2_api_x64.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/aarch64-windows/ffx_fsr3upscaler_x64.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/aarch64-windows/libxess.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/aarch64-windows/nvapi64.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/aarch64-windows/nvngx.dll",
"app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/aarch64-windows/nvngx_dlss.dll"
],
"packages": [
"gcc-mingw-w64-x86-64"
]
}
}
-2
View File
@@ -6,8 +6,6 @@ VK_INCLUDE=$(ls -d "${ANDROID_NDK_LATEST_HOME:-${ANDROID_NDK_HOME:-$ANDROID_NDK_
tools/vr/build.sh --native "$D/usr/local/lib/droiddeck-vr"
VK_INCLUDE=$(ls -d "${ANDROID_NDK_LATEST_HOME:-${ANDROID_NDK_HOME:-$ANDROID_NDK_ROOT}}"/toolchains/llvm/prebuilt/*/sysroot/usr/include | head -1) \
tools/gpuload/build.sh --native "$D/usr/local/lib/droiddeck-gpuload"
VK_INCLUDE=$(ls -d "${ANDROID_NDK_LATEST_HOME:-${ANDROID_NDK_HOME:-$ANDROID_NDK_ROOT}}"/toolchains/llvm/prebuilt/*/sysroot/usr/include | head -1) \
tools/upscale/layer/build-glibc.sh "$D/usr/local/lib/droiddeck-upscale-layer"
for script in tools/linuxfs/overlay/usr/local/bin/droiddeck-* tools/linuxfs/overlay/usr/local/bin/steam-compatibility; do
install -Dm644 "$script" "$D/usr/local/bin/$(basename "$script")"
done
@@ -1,3 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
bash tools/upscale/bridges/build.sh app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges
+1 -1
View File
@@ -600,7 +600,7 @@ def unpack_logs(archive: Path, destination: Path, session_id: str) -> None:
def require_commands(adb: str, serial: str) -> dict:
access = checked(provider_call(adb, serial, "access"), "ACCESS_FAILED")
if access.get("commands") is not True:
raise ControlError("droiddeckctl is off: turn on Setup > Developer > droiddeckctl on the device",
raise ControlError("Debugging tools are off: turn on Setup > Developer > Debugging tools on the device",
"AGENT_COMMANDS_DISABLED")
return access
@@ -1152,228 +1152,6 @@ def directaudio_settings(env):
return env
# The in-game upscaler (tools/upscale, ported from Winlator-NeuralScale, GPL-3.0): bridge DLLs stand in for the
# game's DLSS / FidelityFX / FSR 2/3 / XeSS DLLs and hand each frame to VK_LAYER_DROIDDECK_upscale. The app keeps
# the game's choice in DROIDDECK_UPSCALE_MODE (fsr, dlss, native) and DROIDDECK_UPSCALE_ENGINE/_SHARPNESS/_NPU_SYNC.
UPSCALE_ROOT = "/usr/local/lib/droiddeck-upscale"
UPSCALE_RUN = "/run/droiddeck-hud/upscale"
UPSCALE_MODES = ("fsr", "dlss", "native")
UPSCALE_ENGINES = ("fsr4_1_lite_gpu", "fsr4_1_full_gpu", "xess3_gpu", "fsr3_gpu", "sgsr2_gpu", "fsr4_1_full_npu",
"fsr4_1_lite_npu")
# fsr4_0_npu: saved before full FSR 4.1 replaced FSR 4.0 on the NPU.
UPSCALE_ENGINE_ALIASES = {"fsr4_0_npu": "fsr4_1_full_npu"}
UPSCALE_NPU_FALLBACK = {"fsr4_1_full_npu": "fsr4_1_full_gpu", "fsr4_1_lite_npu": "fsr4_1_lite_gpu"}
UPSCALE_FSR_DLLS = ("libxess", "ffx_fsr3upscaler_x64", "ffx_fsr2_api_x64", "amd_fidelityfx_vk", "amd_fidelityfx_dx12",
"amd_fidelityfx_upscaler_vk", "amd_fidelityfx_upscaler_dx12", "amd_fidelityfx_loader_dx12")
UPSCALE_DLSS_DLLS = ("nvngx", "_nvngx", "nvngx_dlss", "nvapi64")
UPSCALE_XESS = "wl_xess_official.dll"
NV_SIGNATURE_OVERRIDE = "{41FCC608-8496-4DEF-B43E-7D9BD675A6FF}"
# CurrentControlSet is a link to ControlSet001 in Wine's registry, so only ControlSet001 is written.
NGX_KEYS = ("Software\\NVIDIA Corporation\\Global\\NGXCore",
"System\\ControlSet001\\Services\\nvlddmkm\\NGXCore")
NGX_SIGNATURE_KEYS = ("Software\\NVIDIA Corporation\\Global",
"System\\ControlSet001\\Services\\nvlddmkm")
def upscale_registry(prefix):
"""NVIDIA's NGX core location and its signature override, which DLSS games read to load nvngx.dll (DLSS mode only)."""
path = os.path.join(prefix, "pfx", "system.reg")
if not os.path.isfile(path):
return False
with open(path, encoding="utf-8", errors="replace") as reg:
text = reg.read()
# Section names in Wine's registry files double their backslashes.
present = {line[1:line.find("]")].replace("\\\\", "\\").lower()
for line in text.splitlines() if line.startswith("[") and "]" in line}
stamp = int(time_now())
added = []
for key in NGX_KEYS:
if key.lower() not in present:
added.append("[%s] %d\n\"Enable\"=dword:00000001\n\"FullPath\"=\"C:\\\\windows\\\\system32\"\n"
"\"NGXPath\"=\"C:\\\\windows\\\\system32\"\n" % (key.replace("\\", "\\\\"), stamp))
for key in NGX_SIGNATURE_KEYS:
if key.lower() not in present:
added.append("[%s] %d\n\"%s\"=hex:01\n" % (key.replace("\\", "\\\\"), stamp, NV_SIGNATURE_OVERRIDE))
if not added:
return False
with open(path, "a", encoding="utf-8") as reg:
reg.write("\n" + "\n".join(added))
return True
def time_now():
import time
return time.time()
def upscale_link(source, target, hard_link=True):
"""target = source's bytes: a hard link when both are on one file system (and hard_link), else a copy. Kept when
equal."""
if os.path.isfile(target) and os.path.getsize(target) == os.path.getsize(source):
with open(source, "rb") as a, open(target, "rb") as b:
if a.read() == b.read():
return
staged = target + ".droiddeck-tmp"
if os.path.lexists(staged):
os.unlink(staged)
try:
if not hard_link:
raise OSError("copy wanted")
os.link(source, staged)
except OSError:
with open(source, "rb") as src, open(staged, "wb") as dst:
while True:
chunk = src.read(1 << 20)
if not chunk:
break
dst.write(chunk)
os.replace(staged, target)
# DLSS games load nvapi64.dll and NGX's core from system32 only (NGXCore FullPath is C:\windows\system32), which
# the bridge folder on WINEDLLPATH does not answer. Wine copies the bridges there only when a prefix is created with
# the upscaler already on; Bright Memory: Infinite's prefix predates it: "Failed to initialize NVAPI", then NGX
# "failed to load C:\windows\system32\_nvngx.dll". With these four in system32 NGX reports "DLSS supported 1".
UPSCALE_NGX_FILES = ("nvapi64.dll", "_nvngx.dll", "nvngx.dll", "nvngx_dlss.dll")
def upscale_ngx_files(prefix, bridges, dlss):
"""DLSS mode: the bridge's NVAPI and NGX DLLs as files in the prefix's system32. Other modes: our copies go,
so a game taken out of DLSS mode no longer sees the NVIDIA stand-in (other files there are left alone)."""
system32 = os.path.join(prefix, "pfx", "drive_c", "windows", "system32")
if not os.path.isdir(system32):
return False
for name in UPSCALE_NGX_FILES:
source = os.path.join(bridges, "x86_64-windows", name)
target = os.path.join(system32, name)
if not os.path.isfile(source):
continue
if dlss:
# A copy, not a hard link: something writing over the prefix's nvapi64.dll in place must not change
# DroidDeck's staged bridge.
upscale_link(source, target, hard_link=False)
elif os.path.isfile(target) and os.path.getsize(target) == os.path.getsize(source):
with open(source, "rb") as a, open(target, "rb") as b:
if a.read() == b.read():
os.unlink(target)
return True
def upscale_xess(prefix, data):
"""Intel's XeSS runtime beside the bridge: libxess.dll loads wl_xess_official.dll from system32. A hard link
when the prefix is on the same file system as the data, else a copy."""
source = os.path.join(data, "xess", UPSCALE_XESS)
if not os.path.isfile(source):
return "XeSS runtime not downloaded"
upscale_link(source, os.path.join(prefix, "pfx", "drive_c", "windows", "system32", UPSCALE_XESS))
return None
def upscale_control(engine, sharpness, npu_sync, run=None):
"""The live switch file the layer polls, written from this game's settings at every launch: a file left by the
previous game (or the in-game menu) would otherwise win over them."""
run = run or UPSCALE_RUN
os.makedirs(run, exist_ok=True)
staged = os.path.join(run, "ctrl.%d" % os.getpid())
with open(staged, "w") as f:
f.write("enabled=1\nbackend=%s\nsharpness=%.2f\nnpu_sync=%d\n" % (engine, sharpness / 100.0, 1 if npu_sync else 0))
os.replace(staged, os.path.join(run, "ctrl"))
def upscale_settings(env, prefix):
"""The game's upscaler choice -> DLL overrides, bridge folder, layer switch and the files the layer reads."""
mode = (env.get("DROIDDECK_UPSCALE_MODE") or "").strip().lower()
if mode not in UPSCALE_MODES:
return env, []
notes = []
bridges = UPSCALE_ROOT + "/bridges"
data = UPSCALE_ROOT + "/data"
if not os.path.isfile(os.path.join(bridges, "x86_64-windows", "libxess.dll")):
return env, ["in-game upscaler chosen but its bridge pack is not installed; launched without it"]
result = dict(env)
engine = (env.get("DROIDDECK_UPSCALE_ENGINE") or "").strip().lower()
engine = UPSCALE_ENGINE_ALIASES.get(engine, engine)
if engine not in UPSCALE_ENGINES:
engine = "fsr4_1_lite_gpu"
if engine in UPSCALE_NPU_FALLBACK and env.get("DROIDDECK_UPSCALE_NPU") != "1":
notes.append("no usable NPU on this device: %s runs as %s" % (engine, UPSCALE_NPU_FALLBACK[engine]))
engine = UPSCALE_NPU_FALLBACK[engine]
try:
sharpness = min(100, max(0, int(env.get("DROIDDECK_UPSCALE_SHARPNESS") or "55")))
except ValueError:
sharpness = 55
result["DROIDDECK_UPSCALE"] = "1"
result["DROIDDECK_UPSCALE_DIR"] = data + "/fsr4"
result["DROIDDECK_UPSCALE_BACKEND"] = engine
result["DROIDDECK_UPSCALE_ENGINE"] = engine
result["DROIDDECK_UPSCALE_SHARPNESS"] = "%.2f" % (sharpness / 100.0)
result["DROIDDECK_UPSCALE_NPU_SYNC"] = "sync" if env.get("DROIDDECK_UPSCALE_NPU_SYNC") == "1" else "async"
result["DROIDDECK_UPSCALE_PRESET"] = "auto"
result["DROIDDECK_UPSCALE_POWER"] = env.get("DROIDDECK_UPSCALE_POWER") or "balanced"
result["DROIDDECK_UPSCALE_CTRL_FILE"] = UPSCALE_RUN + "/ctrl"
result["DROIDDECK_UPSCALE_STATUS_FILE"] = UPSCALE_RUN + "/status"
result["DROIDDECK_UPSCALE_NATIVELIB_DIR"] = data + "/jni"
result["DROIDDECK_UPSCALE_VRAM_OVERRIDE"] = "0"
result["ADSP_LIBRARY_PATH"] = data + "/fsr4/adsp;/vendor/dsp/cdsp;/vendor/lib/rfsa/adsp;/system/lib/rfsa/adsp"
own = result.get("WINEDLLPATH")
result["WINEDLLPATH"] = bridges + (":" + own if own else "")
overrides = ["%s=b,n" % name for name in UPSCALE_FSR_DLLS] + ["wl_xess_official=n"]
dxvk = None
if mode == "dlss":
overrides += ["%s=b,n" % name for name in UPSCALE_DLSS_DLLS]
result["DROIDDECK_UPSCALE_SPOOF_DLSS"] = "1"
result["DROIDDECK_UPSCALE_GPU_SPOOF"] = "rtx"
result["PROTON_ENABLE_NVAPI"] = "1"
result["DXVK_ENABLE_NVAPI"] = "1"
result["WINE_HIDE_NVIDIA_GPU"] = "0"
dxvk = 'dxgi.hideNvidiaGpu = False; dxgi.customVendorId = 10de; dxgi.customDeviceId = 1f08; dxgi.customDeviceDesc = "NVIDIA GeForce RTX 2060"'
# NGX rejects the bridge DLLs without the signature fix; on unless this game switched it off ("0").
result["DROIDDECK_UPSCALE_SIGFIX"] = "0" if env.get("DROIDDECK_UPSCALE_SIGFIX") == "0" else "1"
try:
if prefix and upscale_registry(prefix):
notes.append("NVIDIA NGX registry entries added to the prefix (DLSS mode)")
except OSError as error:
notes.append("NGX registry entries not written (%s)" % error)
try:
if prefix:
upscale_ngx_files(prefix, bridges, True)
except OSError as error:
notes.append("NVAPI/NGX DLLs not placed in system32 (%s)" % error)
elif mode == "native":
result["DROIDDECK_UPSCALE_SPOOF_DLSS"] = "0"
result["DROIDDECK_UPSCALE_GPU_SPOOF"] = "rdna4"
result.setdefault("VKD3D_SHADER_MODEL", "6_8")
dxvk = 'dxgi.customVendorId = 1002; dxgi.customDeviceId = 7550; dxgi.customDeviceDesc = "AMD Radeon RX 9070 XT"'
else:
result["DROIDDECK_UPSCALE_SPOOF_DLSS"] = "0"
result["DROIDDECK_UPSCALE_GPU_SPOOF"] = "off"
if prefix and mode != "dlss":
try:
upscale_ngx_files(prefix, bridges, False)
except OSError:
pass
if dxvk:
current = result.get("DXVK_CONFIG", "").strip().rstrip(";").strip()
result["DXVK_CONFIG"] = current + "; " + dxvk if current else dxvk
own = result.get("WINEDLLOVERRIDES")
result["WINEDLLOVERRIDES"] = (own + ";" if own else "") + ";".join(overrides)
# Intel's runtime goes into every upscaler game once it is downloaded, so XeSS 3 also works when it is
# picked in the in-game menu; a game started on XeSS 3 without it falls back to FSR.
if prefix and (engine == "xess3_gpu" or os.path.isfile(os.path.join(data, "xess", UPSCALE_XESS))):
try:
problem = upscale_xess(prefix, data)
except OSError as error:
problem = str(error)
if problem and engine == "xess3_gpu":
notes.append("XeSS: %s; the layer falls back to FSR" % problem)
try:
upscale_control(engine, sharpness, env.get("DROIDDECK_UPSCALE_NPU_SYNC") == "1")
except OSError as error:
notes.append("upscaler control file not written (%s)" % error)
notes.append("in-game upscaler: mode %s, engine %s, sharpness %d%%" % (mode, engine, sharpness))
return result, notes
DIRT_GAMES = {"dirt3_game": "dirt3", "showdown": "dirtshowdown", "showdown_avx": "dirtshowdown"}
DIRT_WS2 = "/usr/local/lib/droiddeck-dirt/ws2_32.dll"
DIRT_MARKER = b"droiddeck-dirt-ws2_32"
@@ -2065,9 +1843,6 @@ def main():
env = dict(env, **installer)
print("droiddeck-game-env: invalid configuration; using inherited environment", file=sys.stderr)
if waiting:
env, upscale_notes = upscale_settings(env, prefix_path)
for note in upscale_notes:
print("droiddeck-game-env: " + note, file=sys.stderr)
before_debug = env
env = apply_game_debug_logs(env, config, debug_dir)
if env is not before_debug:
-5
View File
@@ -98,11 +98,6 @@ pack powervr "$repo/app/src/main/assets/hybris" runtime.tzst version.txt
[ ! -f "$linuxfs/droiddeck-ubisoft/droiddeck-upc.exe" ] || pack ubisoft "$linuxfs/droiddeck-ubisoft" droiddeck-upc.exe
[ ! -f "$linuxfs/droiddeck-rockstar/Launcher64.exe" ] || pack rockstar "$linuxfs/droiddeck-rockstar" Launcher32.exe Launcher64.exe
[ ! -f "$linuxfs/droiddeck-dirt/ws2_32.dll" ] || pack dirt "$linuxfs/droiddeck-dirt" ws2_32.dll
upscale=(_nvngx.dll amd_fidelityfx_dx12.dll amd_fidelityfx_loader_dx12.dll amd_fidelityfx_upscaler_dx12.dll
amd_fidelityfx_upscaler_vk.dll amd_fidelityfx_vk.dll ffx_fsr2_api_x64.dll ffx_fsr3upscaler_x64.dll
libxess.dll nvapi64.dll nvngx.dll nvngx_dlss.dll)
[ ! -f "$linuxfs/droiddeck-upscale/bridges/x86_64-windows/nvngx.dll" ] || pack upscale "$linuxfs/droiddeck-upscale" \
"${upscale[@]/#/bridges/x86_64-windows/}" "${upscale[@]/#/bridges/aarch64-windows/}"
[ ! -f "$linuxfs/droiddeck-epic/EpicGamesLauncher.exe" ] || pack epic "$linuxfs/droiddeck-epic" EpicGamesLauncher.exe
mkdir "$work/butler"
+3 -5
View File
@@ -16,19 +16,17 @@ PACKS = Path('app/build/packs')
PACKED = {'assets/linuxfs/usr/local/lib/droiddeck-xbox/': 'xbox', 'assets/linuxfs/usr/local/lib/droiddeck-comet/': 'comet',
'assets/linuxfs/usr/local/lib/droiddeck-ubisoft/': 'ubisoft', 'assets/linuxfs/usr/local/lib/droiddeck-rockstar/': 'rockstar',
'assets/linuxfs/usr/local/lib/droiddeck-dirt/': 'dirt', 'assets/linuxfs/usr/local/lib/droiddeck-epic/': 'epic',
'assets/linuxfs/usr/local/lib/droiddeck-upscale/': 'upscale',
'assets/directaudio/': 'directaudio', 'assets/hybris/': 'powervr'}
# DrWeb flags proot itself as Tool.Linux.Proot; the app runs the pack's copy through Android's linker.
PACKED_FILES = {'lib/arm64-v8a/libproot.so': ('proot', 'libproot.so')}
# The loader is execve'd, which targetSdk 29+ allows only from the APK's native library directory.
PROOT_LOADER = {'lib/arm64-v8a/libproot-loader.so': 'libproot-loader.so'}
PACKED_LIBRARIES = ['lib/arm64-v8a/libopencv_java4.so', 'lib/arm64-v8a/libmediapipe_tasks_jni.so']
PACK_NAMES = ['proot', 'directaudio', 'tracking', 'xbox', 'comet', 'butler', 'powervr', 'ubisoft', 'rockstar', 'dirt', 'epic',
'upscale']
PACK_NAMES = ['proot', 'directaudio', 'tracking', 'xbox', 'comet', 'butler', 'powervr', 'ubisoft', 'rockstar', 'dirt', 'epic']
SOURCE_PATHS = ['app/build.gradle', 'app/src/main/cpp/fakeinput_steam.cpp', 'app/src/main/assets/pulseaudio.tzst',
'tools/linuxfs', 'tools/proot', 'tools/aaudio-sink', 'tools/directaudio', 'tools/packs',
'tools/gamescope/release.env', 'tools/droiddeck-esync/release.env',
'tools/mangoapp', 'tools/msitools', 'tools/pipewire', 'tools/comet', 'tools/xbox', 'tools/dirt-ws2', 'tools/upscale', 'tools/ubisoft-launcher', 'tools/rockstar-launcher', 'tools/epic-launcher', 'tools/components', 'tools/ci', 'tools/build_local.sh',
'tools/mangoapp', 'tools/msitools', 'tools/pipewire', 'tools/comet', 'tools/xbox', 'tools/dirt-ws2', 'tools/ubisoft-launcher', 'tools/rockstar-launcher', 'tools/epic-launcher', 'tools/components', 'tools/ci', 'tools/build_local.sh',
'tools/ime', 'tools/powervr', 'tools/hybris', 'tools/dxvk', 'tools/vulkan-wsi',
'tools/release/runtime_inputs.py', 'app/src/main/assets/desktop-removal',
'tools/quest', 'tools/vr/src', 'tools/vr/driver_droiddeck', 'tools/vr/layer', 'tools/vr/build.sh',
@@ -259,7 +257,7 @@ def windows_binaries(package):
def check_apk(apk, root=ROOT):
data = verify(root)
packs = {name: pack_digests(root, name) for name in PACK_NAMES
if name not in ('ubisoft', 'rockstar', 'dirt', 'epic', 'upscale') or (root / PACKS / (name + '.tar.zst')).is_file()}
if name not in ('ubisoft', 'rockstar', 'dirt', 'epic') or (root / PACKS / (name + '.tar.zst')).is_file()}
for name, rel in PROOT_LOADER.items():
if packs['proot'].get(rel) != data['outputs'][name]['sha256']:
raise ValueError('Add-on pack proot is missing or has a stale ' + rel)
+1 -1
View File
@@ -373,7 +373,7 @@ class DroiddeckctlTest(FakeAdbTest):
code, out = self.run_ctl("run", "/usr/bin/sh", "--", "-c", "true")
self.assertEqual(7, code)
self.assertEqual("AGENT_COMMANDS_DISABLED", out["error"]["code"])
self.assertIn("Setup > Developer > droiddeckctl", out["error"]["message"])
self.assertIn("Setup > Developer > Debugging tools", out["error"]["message"])
self.assertEqual(["access"], [c.get("method") for c in self.calls()])
def test_override_checks_names_before_pushing_any_file(self):
-137
View File
@@ -4,7 +4,6 @@ import hashlib
import io
import json
import os
import re
import shutil
from pathlib import Path
import runpy
@@ -25,142 +24,6 @@ STATE = tempfile.TemporaryDirectory()
COMPAT["main"].__globals__["COMPAT_DIR"] = STATE.name
class UpscalerSettingsTest(unittest.TestCase):
def setUp(self):
self.root = tempfile.mkdtemp()
Path(self.root, "bridges/x86_64-windows").mkdir(parents=True)
Path(self.root, "bridges/x86_64-windows/libxess.dll").write_bytes(b"MZ")
self.run = os.path.join(self.root, "run")
self.patch = patch.dict(MODULE["upscale_settings"].__globals__, {"UPSCALE_ROOT": self.root, "UPSCALE_RUN": self.run})
self.patch.start()
def tearDown(self):
self.patch.stop()
shutil.rmtree(self.root)
def test_off_leaves_the_environment_alone(self):
env = {"DROIDDECK_UPSCALE_MODE": "off", "WINEDLLOVERRIDES": "dxgi=n"}
self.assertEqual((env, []), MODULE["upscale_settings"](env, None))
def test_fsr_mode_overrides_the_upscaler_dlls_without_spoofing(self):
env, _ = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "fsr", "WINEDLLOVERRIDES": "dxgi=n"}, None)
self.assertEqual("1", env["DROIDDECK_UPSCALE"])
self.assertTrue(env["WINEDLLOVERRIDES"].startswith("dxgi=n;libxess=b,n;"))
self.assertNotIn("nvapi64", env["WINEDLLOVERRIDES"])
self.assertNotIn("DXVK_CONFIG", env)
self.assertEqual(self.root + "/bridges", env["WINEDLLPATH"])
self.assertEqual("off", env["DROIDDECK_UPSCALE_GPU_SPOOF"])
def test_dlss_mode_spoofs_an_nvidia_gpu(self):
env, _ = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "dlss", "DXVK_CONFIG": "a = 1"}, None)
self.assertIn("nvngx=b,n", env["WINEDLLOVERRIDES"])
self.assertIn("nvapi64=b,n", env["WINEDLLOVERRIDES"])
self.assertEqual("1", env["PROTON_ENABLE_NVAPI"])
self.assertTrue(env["DXVK_CONFIG"].startswith("a = 1; dxgi.hideNvidiaGpu = False; dxgi.customVendorId = 10de"))
def test_upscale_old_fsr4_npu_runs_full_fsr4_and_sgsr2_passes(self):
env, _ = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "fsr", "DROIDDECK_UPSCALE_ENGINE": "fsr4_0_npu",
"DROIDDECK_UPSCALE_NPU": "1"}, None)
self.assertEqual("fsr4_1_full_npu", env["DROIDDECK_UPSCALE_BACKEND"])
env, _ = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "fsr", "DROIDDECK_UPSCALE_ENGINE": "fsr4_1_full_npu"}, None)
self.assertEqual("fsr4_1_full_gpu", env["DROIDDECK_UPSCALE_BACKEND"])
env, _ = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "fsr", "DROIDDECK_UPSCALE_ENGINE": "sgsr2_gpu"}, None)
self.assertEqual("sgsr2_gpu", env["DROIDDECK_UPSCALE_BACKEND"])
def test_npu_engines_fall_back_to_the_gpu_without_an_npu(self):
env, notes = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "fsr", "DROIDDECK_UPSCALE_ENGINE": "fsr4_1_lite_npu"}, None)
self.assertEqual("fsr4_1_lite_gpu", env["DROIDDECK_UPSCALE_BACKEND"])
env, _ = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "fsr", "DROIDDECK_UPSCALE_ENGINE": "fsr4_1_lite_npu",
"DROIDDECK_UPSCALE_NPU": "1"}, None)
self.assertEqual("fsr4_1_lite_npu", env["DROIDDECK_UPSCALE_BACKEND"])
def test_without_the_bridge_pack_the_game_starts_without_the_upscaler(self):
os.unlink(os.path.join(self.root, "bridges/x86_64-windows/libxess.dll"))
env = {"DROIDDECK_UPSCALE_MODE": "fsr"}
result, notes = MODULE["upscale_settings"](env, None)
self.assertEqual(env, result)
self.assertTrue(notes)
def test_the_control_file_follows_this_games_settings(self):
Path(self.run).mkdir()
Path(self.run, "ctrl").write_text("enabled=0\nbackend=fsr4_1_lite_gpu\nsharpness=0.55\nnpu_sync=0\n")
_, notes = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "fsr", "DROIDDECK_UPSCALE_ENGINE": "xess3_gpu",
"DROIDDECK_UPSCALE_SHARPNESS": "40"}, None)
self.assertEqual("enabled=1\nbackend=xess3_gpu\nsharpness=0.40\nnpu_sync=0\n", Path(self.run, "ctrl").read_text())
self.assertFalse([n for n in notes if "control file" in n])
def test_the_xess_runtime_goes_into_any_upscaler_game_once_downloaded(self):
prefix = tempfile.mkdtemp()
self.addCleanup(shutil.rmtree, prefix, True)
Path(prefix, "pfx/drive_c/windows/system32").mkdir(parents=True)
source = Path(self.root, "data/xess", MODULE["UPSCALE_XESS"])
source.parent.mkdir(parents=True)
source.write_bytes(b"MZ-xess")
MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "fsr", "DROIDDECK_UPSCALE_ENGINE": "fsr4_1_lite_gpu"}, prefix)
target = Path(prefix, "pfx/drive_c/windows/system32", MODULE["UPSCALE_XESS"])
self.assertEqual(b"MZ-xess", target.read_bytes())
self.assertEqual(source.stat().st_ino, target.stat().st_ino)
def test_dlss_mode_turns_the_signature_fix_on_unless_switched_off(self):
env, _ = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "dlss"}, None)
self.assertEqual("1", env["DROIDDECK_UPSCALE_SIGFIX"])
env, _ = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "dlss", "DROIDDECK_UPSCALE_SIGFIX": "0"}, None)
self.assertEqual("0", env["DROIDDECK_UPSCALE_SIGFIX"])
env, _ = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "fsr"}, None)
self.assertNotIn("DROIDDECK_UPSCALE_SIGFIX", env)
def test_dlss_mode_puts_nvapi_and_ngx_in_system32_and_other_modes_take_ours_out(self):
prefix = tempfile.mkdtemp()
self.addCleanup(shutil.rmtree, prefix, True)
system32 = Path(prefix, "pfx/drive_c/windows/system32")
system32.mkdir(parents=True)
for name in ("nvapi64.dll", "_nvngx.dll", "nvngx.dll", "nvngx_dlss.dll"):
Path(self.root, "bridges/x86_64-windows", name).write_bytes(b"MZ-v1-" + name.encode())
MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "dlss"}, prefix)
self.assertEqual(b"MZ-v1-nvapi64.dll", (system32 / "nvapi64.dll").read_bytes())
self.assertEqual(b"MZ-v1-_nvngx.dll", (system32 / "_nvngx.dll").read_bytes())
Path(self.root, "bridges/x86_64-windows/_nvngx.dll").unlink()
Path(self.root, "bridges/x86_64-windows/_nvngx.dll").write_bytes(b"MZ-v2-_nvngx.dll")
env, _ = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "dlss"}, prefix)
self.assertEqual(b"MZ-v2-_nvngx.dll", (system32 / "_nvngx.dll").read_bytes())
self.assertEqual("rtx", env["DROIDDECK_UPSCALE_GPU_SPOOF"])
(system32 / "nvngx.dll").write_bytes(b"someone else's nvngx")
env, _ = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "fsr"}, prefix)
self.assertEqual("off", env["DROIDDECK_UPSCALE_GPU_SPOOF"])
self.assertFalse((system32 / "nvapi64.dll").exists())
self.assertFalse((system32 / "_nvngx.dll").exists())
self.assertEqual(b"someone else's nvngx", (system32 / "nvngx.dll").read_bytes())
def test_a_game_started_on_xess_without_the_runtime_says_so(self):
prefix = tempfile.mkdtemp()
self.addCleanup(shutil.rmtree, prefix, True)
Path(prefix, "pfx/drive_c/windows/system32").mkdir(parents=True)
_, notes = MODULE["upscale_settings"]({"DROIDDECK_UPSCALE_MODE": "fsr", "DROIDDECK_UPSCALE_ENGINE": "xess3_gpu"}, prefix)
self.assertTrue([n for n in notes if "XeSS runtime not downloaded" in n])
def test_the_app_stages_every_dll_the_bridge_build_makes(self):
repo = Path(__file__).resolve().parents[2]
build = (repo / "tools/upscale/bridges/build.sh").read_text()
built = set(re.search(r"names=\(([^)]*)\)", build).group(1).split())
kotlin = (repo / "app/src/main/java/com/droiddeck/launcher/session/UpscaleComponent.kt").read_text()
staged = set(re.findall(r'"([A-Za-z0-9_]+\.dll)"', kotlin[kotlin.index("BRIDGE_NAMES"):kotlin.index("BRIDGE_FILES")]))
self.assertEqual(built, staged)
def test_ngx_registry_entries_are_added_once(self):
prefix = tempfile.mkdtemp()
try:
Path(prefix, "pfx").mkdir()
Path(prefix, "pfx/system.reg").write_text("WINE REGISTRY Version 2\n\n[Software\\\\Wine] 1\n")
self.assertTrue(MODULE["upscale_registry"](prefix))
self.assertFalse(MODULE["upscale_registry"](prefix))
text = Path(prefix, "pfx/system.reg").read_text()
self.assertIn("[Software\\\\NVIDIA Corporation\\\\Global\\\\NGXCore]", text)
self.assertIn('"FullPath"="C:\\\\windows\\\\system32"', text)
self.assertNotIn("CurrentControlSet", text)
finally:
shutil.rmtree(prefix)
class ProducerAcquireGameEnvironmentTest(unittest.TestCase):
def test_prefixed_opt_in_enters_only_the_game_environment(self):
key = "DROIDDECK_GAME_FRAME_ACQUIRE"
-86
View File
@@ -1,86 +0,0 @@
# Upscale bridge DLLs
Windows x86-64 DLLs that stand in for a game's DLSS, FidelityFX (FSR 2, FSR 3, FidelityFX API) and
XeSS libraries inside Wine. They do not upscale anything themselves: each frame's colour, depth,
motion-vector and output images are written into a host-visible Vulkan mailbox buffer, and a
`vkCmdUpdateBuffer` "doorbell" on a marker buffer tells the Android Vulkan layer to record the
upscaler into the game's command buffer. The layer finds both buffers by their sizes and magic
numbers. `fsr4_seam_proto.h` is that contract and is a verbatim copy of the fork's
`app/src/main/cpp/fsr4npu/fsr4_seam_proto.h` (sha256 `a9f614c53ae9209edf0fa9c5acb0a27fdf923c08026362b23f60e1bcb39acd15`).
It must stay byte-identical to the layer's copy. If the layer does not acknowledge a frame,
the bridge blits the render-resolution image to the output (bilinear) so the game never shows
stale memory. D3D12 games reach Vulkan through vkd3d-proton's `ID3D12DXVKInteropDevice1`.
| DLL | Source | Export list | Replaces |
| --- | --- | --- | --- |
| `amd_fidelityfx_vk.dll` | `wl_ffx_bridge.c` | `wl_ffx_bridge.def` | FidelityFX API (`ffxCreateContext`, `ffxDispatch`, ...) |
| `amd_fidelityfx_dx12.dll`, `amd_fidelityfx_upscaler_vk.dll`, `amd_fidelityfx_upscaler_dx12.dll`, `amd_fidelityfx_loader_dx12.dll` | copies of `amd_fidelityfx_vk.dll` | | the same API under the other SDK file names |
| `ffx_fsr3upscaler_x64.dll` | `wl_fsr23_bridge.c` | `ffx_fsr3upscaler_x64.def` | FSR 3.0 / 3.1 upscaler |
| `ffx_fsr2_api_x64.dll` | `wl_fsr23_bridge.c` | `ffx_fsr2_api_x64.def` | FSR 2.0 / 2.1 / 2.2 |
| `libxess.dll` | `wl_xess_bridge.c` | `libxess.def` | Intel XeSS 1.3 / 2.0 (D3D12 + Vulkan) |
| `nvngx.dll` | `wl_ngx_bridge.c` | `nvngx.def` | NVIDIA NGX / DLSS Super Resolution (Vulkan + D3D12) |
| `_nvngx.dll`, `nvngx_dlss.dll` | copies of `nvngx.dll` | | the names games and Streamline load NGX by |
| `nvapi64.dll` | `wl_nvapi_shim.c` (+ `wl_ngx_hooks.h`) | `nvapi64.def` | NVAPI, reporting an RTX 2060 so games offer DLSS |
`wl_fsr23_bridge.c` exports both the FSR 2 and FSR 3 entry points, so both DLLs carry all 21.
`nvngx.dll` exports the 88 `.def` names plus 9 that only its source marks `__declspec(dllexport)`. `build.sh`
fails when a DLL's exports (from `x86_64-w64-mingw32-objdump -p`) differ from its `.def` plus
its source's `dllexport` names.
When the XeSS 3.0 backend is selected, `wl_xess3_direct.h` loads Intel's XeSS SDK runtime as
`wl_xess_official.dll` (from the DLL search path, then `C:\windows\system32`). When it is missing or
fails, the frame goes to the layer flagged `WLFSR4_FLAG_XESS_FALLBACK` (FSR 3.1 on the GPU). That DLL is Intel's prebuilt binary and is not built here.
## Build
```sh
bash tools/upscale/bridges/build.sh OUT
```
Needs `x86_64-w64-mingw32-gcc` (Ubuntu `gcc-mingw-w64-x86-64`) and `python3`. The output is
deterministic (`-s`, `-Wl,--no-insert-timestamp`, linked under the bare DLL name because `ld`
derives the image base from the output path). Every DLL is stamped as a Wine builtin the way
`winebuild --builtin` does it: the 32-byte `"Wine builtin DLL"` signature, zero-padded, at file
offset 0x40 (`pe.py stamp`). Wine then loads them from `WINEDLLPATH` when the override is
`builtin`. The same x86-64 files are installed to `OUT/x86_64-windows/` and
`OUT/aarch64-windows/`, because the ARM64EC Wine loads x86-64 builtins from the latter.
CI builds them with the `upscale-bridges` component recipe into
`app/src/main/assets/linuxfs/usr/local/lib/droiddeck-upscale/bridges/`. The APK may not carry
Windows executables (`tools/release/runtime_inputs.py`), so they ship in the `upscale` add-on
pack (`tools/packs/build.sh`), whose entries are `bridges/{x86_64,aarch64}-windows/<dll>`.
## Environment
| Variable | Default | Effect |
| --- | --- | --- |
| `DROIDDECK_UPSCALE_BACKEND` (then `DROIDDECK_UPSCALE_ENGINE`, `WINLATOR_FSR4_BACKEND`, `WINLATOR_FSR4_ENGINE`) | `fsr4_1_full_npu` | Backend the bridges assume until the layer writes its live control word: `fsr3_gpu`, `xess3_gpu`, `sgsr2_gpu`, `fsr4_1_lite_npu`, `fsr4_1_full_npu`, `fsr4_1_lite_gpu`, `fsr4_1_full_gpu` (`fsr4_0_npu` = `fsr4_1_full_npu`) |
| `DROIDDECK_UPSCALE_VRAM_MB` (then `WINLATOR_FSR4_VRAM_MB`, `WRAPPER_VMEM_MAX_SIZE`) | DXGI adapter 0, else 12 GB | VRAM `nvapi64.dll` reports (512-65536 MB) |
| `DROIDDECK_UPSCALE_SIGFIX=1` | on in DLSS mode (`droiddeck-game-env` sets `1` unless the game stores `0`) | `nvapi64.dll` patches the import tables of loaded modules (LoadLibrary*, GetProcAddress, GetFileAttributes*, CreateFileW, Reg*), redirects `nvngx`/`_nvngx` loads to `C:\windows\system32\_nvngx.dll`, fakes the NVIDIA signature-override registry keys, forces `WinVerifyTrust` success and redirects `CryptQueryObject` for `nvngx`/`amd_fidelityfx*`, so games that signature-check NGX load the bridge. Never applied to rdr2.exe, playrdr2.exe or gta5.exe |
| `DROIDDECK_UPSCALE_LOG=1` | off | Hook messages appended to `C:\windows\temp\wl_fsr4_bridge.log` |
## Changes from the fork
- Until upstream r5, D3D11 NGX reported DLSS unavailable here (the fork returned success and rendered
nothing). Since r5 the D3D11 entry points reach the Vulkan layer through DXVK's interop
(`wl_dxvk_interop.h`), as upstream does.
- The `nvapi64.dll` hooks follow `DROIDDECK_UPSCALE_SIGFIX`, which DLSS games get as `1` unless switched off (the fork
always installed them). Without them NGX rejects the bridges (DLSS sample: `GetFeatureRequirements` PlatformError).
- Logging is off unless `DROIDDECK_UPSCALE_LOG=1`; the fork always wrote the log.
- `DROIDDECK_UPSCALE_*` variables are read first, the fork's names after them (`dd_env.h`).
- `fsr4_seam_proto.h` is included from this folder instead of `../fsr4npu/`.
- Built with Ubuntu's MinGW-w64 GCC (msvcrt) instead of the fork's PowerShell script; flags as in
its `build_win_dlls.ps1` plus `-s` and `-Wl,--no-insert-timestamp`. The fork stamped the
signature at install time; here it is stamped at build time.
Seam protocol, struct layouts, magics and backend IDs are unchanged.
## Credits and licence
Ported from [michaelisomer-cyber/Winlator-NeuralScale](https://github.com/michaelisomer-cyber/Winlator-NeuralScale)
at `a0ab6b0f770e1a6786b4e68def46b4edb8baafd0`, updated to `71c140d9e5586f659251c3ebc602f2d21923655c` (r5: D3D11
DLSS through DXVK's interop, `wl_dxvk_interop.h`) (`app/src/main/cpp/fsr4npu_win/`), GPL-3.0. That fork
builds on [StevenMXZ/Winlator-Ludashi](https://github.com/StevenMXZ/Winlator-Ludashi). The NGX
and NVAPI shims follow OptiScaler's approach (and fakenvapi's NVAPI interface). These files stay
under the GPL-3.0, the licence of this repository (`LICENSE`); modified files say so in their
first line.
-50
View File
@@ -1,50 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
here=$(cd "$(dirname "$0")" && pwd)
mkdir -p "${1:?usage: build.sh <out-dir>}"
out=$(cd "$1" && pwd)
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
cc=x86_64-w64-mingw32-gcc
objdump=x86_64-w64-mingw32-objdump
for tool in "$cc" "$objdump"; do
command -v "$tool" >/dev/null || { echo "upscale-bridges: $tool not found (apt install gcc-mingw-w64-x86-64)" >&2; exit 1; }
done
cflags=(-O2 -fno-ipa-icf -shared -s -Wall -Wextra -Wno-unused-function -static-libgcc -I"$here"
-ffile-prefix-map="$here"=. -Wl,--no-insert-timestamp)
build() {
local name=$1 source=$2 definition=$3
shift 3
# ld derives the DLL's image base from the -o path, so link in $work under the bare name.
(cd "$work" && "$cc" "${cflags[@]}" "$here/$source" "$here/$definition" "$@" -o "$name")
python3 -I "$here/pe.py" verify "$work/$name" "$here/$definition" "$here/$source" "$objdump"
python3 -I "$here/pe.py" stamp "$work/$name"
}
build amd_fidelityfx_vk.dll wl_ffx_bridge.c wl_ffx_bridge.def -lm
for name in amd_fidelityfx_dx12.dll amd_fidelityfx_upscaler_vk.dll amd_fidelityfx_upscaler_dx12.dll amd_fidelityfx_loader_dx12.dll; do
cp "$work/amd_fidelityfx_vk.dll" "$work/$name"
done
build libxess.dll wl_xess_bridge.c libxess.def -lm
build ffx_fsr3upscaler_x64.dll wl_fsr23_bridge.c ffx_fsr3upscaler_x64.def -lm
build ffx_fsr2_api_x64.dll wl_fsr23_bridge.c ffx_fsr2_api_x64.def -lm
build nvngx.dll wl_ngx_bridge.c nvngx.def -lm
for name in _nvngx.dll nvngx_dlss.dll; do
cp "$work/nvngx.dll" "$work/$name"
done
build nvapi64.dll wl_nvapi_shim.c nvapi64.def
names=(_nvngx.dll amd_fidelityfx_dx12.dll amd_fidelityfx_loader_dx12.dll amd_fidelityfx_upscaler_dx12.dll
amd_fidelityfx_upscaler_vk.dll amd_fidelityfx_vk.dll ffx_fsr2_api_x64.dll ffx_fsr3upscaler_x64.dll
libxess.dll nvapi64.dll nvngx.dll nvngx_dlss.dll)
[ "$(ls "$work" | sort)" = "$(printf '%s\n' "${names[@]}" | sort)" ] || { echo "upscale-bridges: unexpected outputs" >&2; exit 1; }
# The ARM64EC Wine loads x86-64 builtins from aarch64-windows as well.
for arch in x86_64-windows aarch64-windows; do
rm -rf "${out:?}/$arch"
mkdir -p "$out/$arch"
for name in "${names[@]}"; do
install -m 644 "$work/$name" "$out/$arch/$name"
done
done
Loaded 100 of 157 files, more files were not shown because too many files have changed in this diff. Show more