mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 13:05:47 +00:00
Compare commits
21
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
242b45b705 | ||
|
|
a8224c76a2 | ||
|
|
ed106ea840 | ||
|
|
96ae61541c | ||
|
|
a4751dacbe | ||
|
|
f50691ebc9 | ||
|
|
2ab642bf4e | ||
|
|
cad55fc2b9 | ||
|
|
a02ea07386 | ||
|
|
c1d6d425fa | ||
|
|
70be3d3eea | ||
|
|
f2206893d0 | ||
|
|
ce64f5ade4 | ||
|
|
c85e82683b | ||
|
|
88d44b0dc6 | ||
|
|
73fac3723f | ||
|
|
1596e2966d | ||
|
|
16ea8d9168 | ||
|
|
423f600d4b | ||
|
|
3b0c0d3496 | ||
|
|
565bd7c6b1 |
No files matched your search
@@ -307,6 +307,9 @@ jobs:
|
||||
aarch64-linux-gnu-gcc -O2 -Wall -o "$D/usr/local/bin/droiddeck-glprobe" tools/venus/glprobe.c -ldl
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$D/usr/local/bin/droiddeck-glprobe"
|
||||
|
||||
- name: Build the LSE atomics emulator for ARMv8.0 CPUs
|
||||
run: bash tools/linuxfs/lse-emu/build.sh app/src/main/assets/linuxfs
|
||||
|
||||
- name: Check the preloads
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -952,6 +955,7 @@ jobs:
|
||||
with:
|
||||
artifact: droiddeck-signed
|
||||
variant: standard
|
||||
fail_on_detection: true
|
||||
secrets: inherit
|
||||
|
||||
packs:
|
||||
|
||||
@@ -157,6 +157,13 @@ 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">
|
||||
|
||||
@@ -52,6 +52,7 @@ 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
|
||||
@@ -190,9 +191,6 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
|
||||
private var gamescopeRealtime by mutableStateOf(false)
|
||||
private var paceCores by mutableStateOf(true)
|
||||
private var gpuClockPin by mutableStateOf(false)
|
||||
private var prootNoSeccomp by mutableStateOf(false)
|
||||
private var prootFastPath by mutableStateOf(true)
|
||||
private var nativeUserland by mutableStateOf(true)
|
||||
private var desktopAsUser by mutableStateOf(false)
|
||||
private var cursorComposite by mutableStateOf(true)
|
||||
private var guestHostname by mutableStateOf(SessionPrefs.DEFAULT_GUEST_HOSTNAME)
|
||||
@@ -208,7 +206,8 @@ 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 launcherFullscreen by mutableStateOf(true)
|
||||
private var launcherFullscreenMode by mutableStateOf(FullscreenMode.ALWAYS)
|
||||
private var sessionFullscreenMode by mutableStateOf(FullscreenMode.ALWAYS)
|
||||
private var launcherFrost by mutableStateOf(false)
|
||||
private var frostWallpaper by mutableStateOf(true)
|
||||
private var frostCards by mutableStateOf(true)
|
||||
@@ -1366,8 +1365,12 @@ 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)
|
||||
launcherFullscreen = SessionPrefs.launcherFullscreen(this)
|
||||
launcherFullscreenMode = SessionPrefs.launcherFullscreenMode(this)
|
||||
sessionFullscreenMode = SessionPrefs.sessionFullscreenMode(this)
|
||||
launcherFrost = SessionPrefs.launcherFrost(this)
|
||||
frostWallpaper = SessionPrefs.frostWallpaper(this)
|
||||
frostCards = SessionPrefs.frostCards(this)
|
||||
@@ -1482,7 +1485,8 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
|
||||
orientation = orientation,
|
||||
launcherOrientation = launcherOrientation,
|
||||
homePage = homePage,
|
||||
launcherFullscreen = launcherFullscreen,
|
||||
launcherFullscreenMode = launcherFullscreenMode,
|
||||
sessionFullscreenMode = sessionFullscreenMode,
|
||||
launcherFrost = launcherFrost,
|
||||
frostWallpaper = frostWallpaper,
|
||||
frostCards = frostCards,
|
||||
@@ -1758,13 +1762,14 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
|
||||
}
|
||||
}, "delete-session-logs").start()
|
||||
},
|
||||
onClearLogs = {
|
||||
onClearLogs = { done ->
|
||||
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()
|
||||
},
|
||||
@@ -1816,11 +1821,15 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
|
||||
homePage = value
|
||||
},
|
||||
onControllerHaptics = { on -> SessionPrefs.setControllerHaptics(this, on); controllerHaptics = on },
|
||||
onLauncherFullscreen = { on ->
|
||||
SessionPrefs.setLauncherFullscreen(this, on)
|
||||
launcherFullscreen = on
|
||||
onLauncherFullscreenMode = { mode ->
|
||||
SessionPrefs.setLauncherFullscreenMode(this, mode)
|
||||
launcherFullscreenMode = mode
|
||||
applyLauncherFullscreen()
|
||||
},
|
||||
onSessionFullscreenMode = { mode ->
|
||||
SessionPrefs.setSessionFullscreenMode(this, mode)
|
||||
sessionFullscreenMode = mode
|
||||
},
|
||||
onLauncherFrost = { on ->
|
||||
SessionPrefs.setLauncherFrost(this, on)
|
||||
launcherFrost = on
|
||||
@@ -2152,7 +2161,13 @@ 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
|
||||
|
||||
private fun applyLauncherFullscreen() {
|
||||
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)
|
||||
@Suppress("DEPRECATION")
|
||||
window.decorView.systemUiVisibility = if (launcherFullscreen) {
|
||||
(View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
||||
@@ -3107,7 +3122,7 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
|
||||
fsyncFirst = fsyncFirst,
|
||||
gamescopeRealtime = gamescopeRealtime,
|
||||
gpuClockPin = gpuClockPin,
|
||||
prootNoSeccomp = prootNoSeccomp, prootFastPath = prootFastPath, nativeUserland = nativeUserland, desktopAsUser = desktopAsUser, cursorComposite = cursorComposite,
|
||||
nativeDesktopAvailable = com.droiddeck.launcher.runtime.NativeGuest.nextSession(this), desktopAsUser = desktopAsUser, cursorComposite = cursorComposite,
|
||||
guestHostname = guestHostname, phantomWarning = phantomWarning,
|
||||
onClientOverride = { on -> SessionPrefs.setClientCpusOverride(this, on); clientOverride = on },
|
||||
onPaceCores = { on -> SessionPrefs.setPaceCores(this, on); paceCores = on },
|
||||
@@ -3121,9 +3136,6 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
|
||||
onFsyncFirst = { on -> SessionPrefs.setFsyncFirst(this, on); fsyncFirst = on },
|
||||
onGamescopeRealtime = { on -> SessionPrefs.setGamescopeRealtime(this, on); gamescopeRealtime = on },
|
||||
onGpuClockPin = { on -> SessionPrefs.setGpuClockPin(this, on); gpuClockPin = on },
|
||||
onProotNoSeccomp = { on -> SessionPrefs.setProotNoSeccomp(this, on); prootNoSeccomp = on },
|
||||
onProotFastPath = { on -> SessionPrefs.setProotFastPath(this, on); prootFastPath = on },
|
||||
onNativeUserland = { on -> SessionPrefs.setNativeUserland(this, on); nativeUserland = on },
|
||||
onDesktopAsUser = { on -> SessionPrefs.setDesktopAsUser(this, on); desktopAsUser = on },
|
||||
onCursorComposite = { on -> SessionPrefs.setCursorComposite(this, on); cursorComposite = on },
|
||||
onGuestHostname = { name -> SessionPrefs.setGuestHostname(this, name) },
|
||||
@@ -3446,9 +3458,6 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
|
||||
gamescopeRealtime = SessionPrefs.gamescopeRealtime(this)
|
||||
paceCores = SessionPrefs.paceCores(this)
|
||||
gpuClockPin = SessionPrefs.gpuClockPin(this)
|
||||
prootNoSeccomp = SessionPrefs.prootNoSeccomp(this)
|
||||
prootFastPath = SessionPrefs.prootFastPath(this)
|
||||
nativeUserland = SessionPrefs.nativeUserland(this)
|
||||
desktopAsUser = SessionPrefs.desktopAsUser(this)
|
||||
cursorComposite = SessionPrefs.cursorComposite(this)
|
||||
guestHostname = SessionPrefs.guestHostname(this)
|
||||
|
||||
@@ -128,6 +128,7 @@ 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
|
||||
@@ -643,6 +644,7 @@ 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)
|
||||
@@ -940,7 +942,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
}
|
||||
applyFollowChoice()
|
||||
applyFollowOrientation(resources.configuration)
|
||||
goFullscreen()
|
||||
sessionFullscreenMode = SessionPrefs.sessionFullscreenMode(this)
|
||||
applySessionFullscreen()
|
||||
volumeControlStream = android.media.AudioManager.STREAM_MUSIC
|
||||
displayManager = getSystemService(DISPLAY_SERVICE) as DisplayManager
|
||||
refreshSecondScreenDisplays()
|
||||
@@ -2103,6 +2106,12 @@ 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) {
|
||||
@@ -3309,6 +3318,7 @@ 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)
|
||||
@@ -3852,7 +3862,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
presentationFaultHint()?.let { return it }
|
||||
if (log == null || !log.isFile) return null
|
||||
return try {
|
||||
var enosys = 0
|
||||
var fexMissing = false
|
||||
val size = log.length()
|
||||
val text = java.io.RandomAccessFile(log, "r").use { f ->
|
||||
@@ -3863,7 +3872,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
String(bytes, Charsets.ISO_8859_1)
|
||||
}
|
||||
text.lineSequence().forEach { line ->
|
||||
if (line.contains("Function not implemented")) enosys++
|
||||
if (line.contains(FEX_MISSING)) fexMissing = true
|
||||
}
|
||||
val steamSetup = com.droiddeck.launcher.session.SteamClientSetupFailure.find(text.lineSequence())
|
||||
@@ -3885,9 +3893,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
} else if (fexMissing) {
|
||||
val what = com.droiddeck.launcher.frontend.Library.nameForProgram(SessionState.program) ?: getString(R.string.session_end_program)
|
||||
EndHint(getString(R.string.session_end_fex_missing, what), evenOnSuccess = true)
|
||||
} else if (enosys >= 8) {
|
||||
EndHint(resources.getQuantityString(R.plurals.session_hint_enosys, enosys, enosys,
|
||||
getString(R.string.perf_title), getString(R.string.perf_seccomp), getString(R.string.perf_xalia)))
|
||||
} else null
|
||||
} catch (e: Exception) {
|
||||
null
|
||||
@@ -6669,6 +6674,8 @@ 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()
|
||||
@@ -7382,7 +7389,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
if (hasFocus && airTriggersOpen) RedMagicAirTriggers.open(this)
|
||||
if (hasFocus && !pipUi) {
|
||||
retryFieldKeyboard(true)
|
||||
goFullscreen()
|
||||
applySessionFullscreen()
|
||||
refreshClipboard()
|
||||
}
|
||||
updatePointerCapture()
|
||||
@@ -7392,19 +7399,24 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
if (resumed) sessionClipboard.refresh()
|
||||
}
|
||||
|
||||
private fun goFullscreen() {
|
||||
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)
|
||||
@Suppress("DEPRECATION")
|
||||
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
||||
window.decorView.systemUiVisibility = if (fullscreen) (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)
|
||||
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) else View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
if (Build.VERSION.SDK_INT >= 28) {
|
||||
window.attributes = window.attributes.apply {
|
||||
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
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ object AgentAccess {
|
||||
fun requireCommands(context: Context) {
|
||||
if (!commandsAllowed(context)) throw AgentException(
|
||||
"AGENT_COMMANDS_DISABLED",
|
||||
"Debugging tools are off: turn on Setup > Developer > Debugging tools on the device",
|
||||
"droiddeckctl is off: turn on Setup > Developer > droiddeckctl on the device",
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -571,7 +571,6 @@ object AgentHost {
|
||||
remove("LD_PRELOAD"); remove("LD_AUDIT"); remove("LD_LIBRARY_PATH")
|
||||
put("PROOT_LOADER", LinuxRuntime.prootLoader(app).path)
|
||||
put("PROOT_TMP_DIR", LinuxRuntime.prootTempDir(app).path)
|
||||
if (SessionPrefs.prootNoSeccomp(app)) put("PROOT_NO_SECCOMP", "1")
|
||||
LinuxRuntime.prootLibraryPath(app).takeIf { it.isNotEmpty() }?.let { put("LD_LIBRARY_PATH", it) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@ object AgentNative {
|
||||
fun run(context: Context, request: JSONObject, timeoutMs: Long): JSONObject {
|
||||
val root = LinuxRuntime.rootDir(context)
|
||||
com.droiddeck.launcher.session.SessionFiles.stage(context, root)
|
||||
// with the setting off, staging leaves the rootfs as proot wants it
|
||||
if (!com.droiddeck.launcher.session.SessionPrefs.nativeUserland(context)) NativeGuest.prepare(context, root)
|
||||
if (!NativeGuest.available(root)) throw AgentException("NATIVE_UNAVAILABLE", "The rootfs has no native hook or glibc loader yet; start a session once")
|
||||
val argvJson = request.optJSONArray("argv") ?: throw AgentException("INVALID_REQUEST", "argv is required")
|
||||
val argv = (0 until argvJson.length()).map { argvJson.getString(it) }
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
import java.io.File
|
||||
|
||||
object CpuFeatures {
|
||||
internal fun lacksAtomics(cpuInfo: String): Boolean {
|
||||
val cores = cpuInfo.lineSequence()
|
||||
.filter { it.substringBefore(':').trim() == "Features" }
|
||||
.map { it.substringAfter(':').trim().split(Regex("\\s+")) }
|
||||
.toList()
|
||||
return cores.isNotEmpty() && cores.any { "atomics" !in it }
|
||||
}
|
||||
|
||||
val lacksAtomics: Boolean by lazy {
|
||||
runCatching { lacksAtomics(File("/proc/cpuinfo").readText()) }.getOrDefault(false)
|
||||
}
|
||||
}
|
||||
@@ -192,6 +192,7 @@ 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"))
|
||||
@@ -290,9 +291,12 @@ object DeviceReport {
|
||||
k("Linux x86 (FEX)", if (com.droiddeck.launcher.runtime.LinuxFex.ready(context)) "ready" else "not set up")
|
||||
k("gamescope realtime", SessionPrefs.gamescopeRealtime(context))
|
||||
k("pace cores", SessionPrefs.paceCores(context))
|
||||
k("proot without seccomp", SessionPrefs.prootNoSeccomp(context))
|
||||
k("native userland (no proot)", SessionPrefs.nativeUserland(context))
|
||||
k("proot fast path", SessionPrefs.prootFastPath(context))
|
||||
k("guest runtime policy", "native preferred with PRoot fallback")
|
||||
k("guest runtime", when (com.droiddeck.launcher.runtime.NativeGuest.sessionMode) {
|
||||
true -> "native"
|
||||
false -> "PRoot"
|
||||
null -> if (com.droiddeck.launcher.runtime.NativeGuest.enabled(context)) "native available" else "native unavailable"
|
||||
})
|
||||
k("proot binary", LinuxRuntime.prootSource(context) + " " + LinuxRuntime.prootBinary(context).path)
|
||||
k("proot fast path (eligible)", com.droiddeck.launcher.runtime.ProotFastPath.enabled(context))
|
||||
k("Guest host name", SessionPrefs.guestHostname(context))
|
||||
|
||||
@@ -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): Int? {
|
||||
private fun loopbackAdbPort(app: Context, exclude: Int? = null): 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 (answers(LOOPBACK, port, 150)) open += port
|
||||
if (port != exclude && answers(LOOPBACK, port, 150)) open += port
|
||||
port += workers
|
||||
}
|
||||
}.apply { start() }
|
||||
@@ -162,8 +162,28 @@ object WirelessAdbFix {
|
||||
}.getOrDefault(address is Inet4Address)
|
||||
|
||||
fun localConnectPort(context: Context): Int? =
|
||||
tlsPortProperty()
|
||||
?: findConnectPort(context, LOOPBACK)
|
||||
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
|
||||
}
|
||||
|
||||
private fun tlsPortProperty(): Int? = runCatching {
|
||||
Class.forName("android.os.SystemProperties").getMethod("get", String::class.java)
|
||||
@@ -301,14 +321,14 @@ object WirelessAdbFix {
|
||||
if (cachedPort != null) {
|
||||
val cachedResult = runCatching { action(appContext, saved.host, cachedPort) }
|
||||
if (cachedResult.isSuccess) return
|
||||
val discoveredPort = findConnectPort(appContext, saved.host)
|
||||
val discoveredPort = discoverConnectPort(appContext, saved.host, exclude = cachedPort)
|
||||
if (discoveredPort != null && discoveredPort != cachedPort) {
|
||||
action(appContext, saved.host, discoveredPort)
|
||||
} else {
|
||||
cachedResult.getOrThrow()
|
||||
}
|
||||
} else {
|
||||
val discoveredPort = findConnectPort(appContext, saved.host)
|
||||
val discoveredPort = discoverConnectPort(appContext, saved.host)
|
||||
?: error(appContext.getString(R.string.adbfix_enter_address))
|
||||
action(appContext, saved.host, discoveredPort)
|
||||
}
|
||||
|
||||
@@ -4,20 +4,23 @@ 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) =
|
||||
@@ -37,6 +40,8 @@ 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
|
||||
@@ -46,13 +51,21 @@ class WirelessAdbPairingService : Service() {
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
when (intent?.action) {
|
||||
ACTION_CODE -> {
|
||||
val code = RemoteInput.getResultsFromIntent(intent)?.getCharSequence(KEY_CODE)
|
||||
?.filter(Char::isDigit)?.toString().orEmpty()
|
||||
onCode(code)
|
||||
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_CANCEL -> finish(Stage.Idle)
|
||||
else -> begin(intent?.getBooleanExtra(EXTRA_ENABLE_LIMIT, false) == true)
|
||||
null -> begin(intent?.getBooleanExtra(EXTRA_ENABLE_LIMIT, false) == true)
|
||||
else -> if (discovery == null && !working) stopSelf(startId)
|
||||
}
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
@@ -60,11 +73,13 @@ 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)
|
||||
@@ -101,9 +116,13 @@ 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 (current.value !is Stage.CodeNeeded) show(Stage.CodeNeeded())
|
||||
if (endpointChanged) {
|
||||
resetKeypad()
|
||||
show(Stage.CodeNeeded())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,11 +136,12 @@ class WirelessAdbPairingService : Service() {
|
||||
show(Stage.Waiting)
|
||||
return
|
||||
}
|
||||
if (code.length != 6) {
|
||||
if (code.length != WirelessPairingKeypad.LENGTH) {
|
||||
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)))
|
||||
@@ -155,17 +175,34 @@ class WirelessAdbPairingService : Service() {
|
||||
}, "wireless-adb-pairing").start()
|
||||
}
|
||||
|
||||
private fun show(stage: Stage) {
|
||||
private fun show(stage: Stage, quietUpdate: Boolean = false) {
|
||||
publish(stage)
|
||||
getSystemService(NotificationManager::class.java)?.notify(NOTIFICATION_ID, notification(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()
|
||||
}
|
||||
|
||||
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)
|
||||
@@ -183,13 +220,16 @@ 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): Notification {
|
||||
private fun notification(
|
||||
stage: Stage, quietUpdate: Boolean = false, foregroundCodeEntry: Boolean = false,
|
||||
): Notification {
|
||||
val manager = getSystemService(NotificationManager::class.java)
|
||||
manager?.createNotificationChannel(NotificationChannel(CHANNEL_ID, getString(R.string.adbpair_channel_name),
|
||||
NotificationManager.IMPORTANCE_HIGH).apply {
|
||||
@@ -205,7 +245,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 = stage == Stage.Waiting || stage == Stage.Idle || stage is Stage.Working
|
||||
val quiet = foregroundCodeEntry || 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)
|
||||
@@ -220,19 +260,31 @@ 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 (stage.error == null) R.string.adbpair_title_code else R.string.adbpair_title_retry))
|
||||
.setContentText(text)
|
||||
.setStyle(Notification.BigTextStyle().bigText(text))
|
||||
.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)
|
||||
.setOngoing(true)
|
||||
.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())
|
||||
.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))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
is Stage.Working -> builder
|
||||
.setContentTitle(getString(R.string.adbpair_title_working))
|
||||
@@ -254,14 +306,39 @@ 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_CODE = "com.droiddeck.launcher.action.WIRELESS_ADB_CODE"
|
||||
private const val ACTION_KEYPAD = "com.droiddeck.launcher.action.WIRELESS_ADB_KEYPAD"
|
||||
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
|
||||
|
||||
@@ -288,7 +365,7 @@ class WirelessAdbPairingService : Service() {
|
||||
fun notificationsEnabled(context: Context): Boolean =
|
||||
context.getSystemService(NotificationManager::class.java)?.areNotificationsEnabled() != false && !channelBlocked(context)
|
||||
|
||||
/** The code is typed into a notification on this channel; a channel the user switched off leaves pairing with nothing to type into. */
|
||||
/** Pairing needs this notification channel to show the keypad over Android Settings. */
|
||||
fun channelBlocked(context: Context): Boolean =
|
||||
context.getSystemService(NotificationManager::class.java)?.getNotificationChannel(CHANNEL_ID)?.importance == NotificationManager.IMPORTANCE_NONE
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
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,6 +14,15 @@ 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
|
||||
|
||||
@@ -28,7 +28,8 @@ object AutoComponents {
|
||||
else -> game.appId.takeIf { it > 0 }?.toString()
|
||||
}
|
||||
|
||||
fun autoPicks(findings: List<WinCompSources.Finding>, catalog: Map<String, WinComponents.Component>): Map<String, WinComponents.AutoReason> {
|
||||
fun autoPicks(findings: List<WinCompSources.Finding>, catalog: Map<String, WinComponents.Component>,
|
||||
user: Map<String, Boolean> = emptyMap()): Map<String, WinComponents.AutoReason> {
|
||||
val out = LinkedHashMap<String, WinComponents.AutoReason>()
|
||||
for (f in findings) {
|
||||
if (!f.auto || f.component == null) continue
|
||||
@@ -37,6 +38,13 @@ object AutoComponents {
|
||||
if (WinComponents.support(c, catalog) != WinComponents.Support.READY) continue
|
||||
if (id !in out) out[id] = WinComponents.AutoReason(f.origin.name, listOf(f.original) + f.args)
|
||||
}
|
||||
if (user["d3dx9"] != false && (user["d3dx9"] == true || "d3dx9" in out)) {
|
||||
val reason = out["d3dx9"] ?: WinComponents.AutoReason(WinCompSources.Origin.FOLDER.name, listOf("d3dx9"))
|
||||
for (id in listOf("d3dcompiler_42", "d3dcompiler_43")) {
|
||||
val c = catalog[id] ?: continue
|
||||
if (WinComponents.support(c, catalog) == WinComponents.Support.READY) out.putIfAbsent(id, reason)
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
@@ -228,8 +236,8 @@ object AutoComponents {
|
||||
val findings = findings(context, game)
|
||||
val refreshed = if (knownCatalog == null && asked && online(context)) catalogOf(context, true) else null
|
||||
val catalog = knownCatalog ?: (refreshed ?: catalogOf(context, false) ?: catalogOf(context, true))?.associateBy { it.name } ?: return
|
||||
val wanted = autoPicks(findings, catalog)
|
||||
val user = WinComponents.selection(context, key).user
|
||||
val wanted = autoPicks(findings, catalog, user)
|
||||
val before = WinComponents.selection(context, key).auto
|
||||
val installed = installedOf(context)
|
||||
val kept = LinkedHashMap<String, WinComponents.AutoReason>()
|
||||
@@ -373,7 +381,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
|
||||
@@ -452,9 +460,9 @@ object AutoComponents {
|
||||
}
|
||||
return pendingSaved && pending.isEmpty()
|
||||
}
|
||||
val wanted = autoPicks(findings, catalog)
|
||||
val selection = WinComponents.selection(context, key)
|
||||
val user = selection.user
|
||||
val wanted = autoPicks(findings, catalog, user)
|
||||
val installed = installedOf(context)
|
||||
val roots = selection.effective + wanted.keys.filter { user[it] != false }
|
||||
val required = withParts(roots.filter { WinComponents.validId(it) }, catalog)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -40,7 +40,8 @@ enum class DroidDeckHudSize(val token: String, val label: String) {
|
||||
PILL("pill", "Pill"),
|
||||
MINIMAL("minimal", "Minimal"),
|
||||
MEGA("mega", "Mega"),
|
||||
STRIP("strip", "Strip");
|
||||
STRIP("strip", "Strip"),
|
||||
SIDE_STRIP("side_strip", "Side strip");
|
||||
|
||||
fun next(): DroidDeckHudSize {
|
||||
val all = values()
|
||||
@@ -96,6 +97,11 @@ enum class DroidDeckHudSize(val token: String, val label: String) {
|
||||
"showCPUUsage", "showTemp", "showVram", "showRAM", "showBattery", "showBatteryTemp", "showBatteryTime",
|
||||
"showPower", "showDisplay", "showHdr", "showGpuModel",
|
||||
),
|
||||
SIDE_STRIP to listOf(
|
||||
"showFPS", "showFPSGraph", "showAvg", "showLow1",
|
||||
"showGPULoad", "showGpuTemp", "showCPUUsage", "showTemp", "showRAM", "showVram",
|
||||
"showPower", "showBattery", "showBatteryTemp", "showBatteryTime",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -110,6 +116,7 @@ enum class DroidDeckHudSize(val token: String, val label: String) {
|
||||
MEGA to DroidDeckHudStyle(row = 11.5f, unit = 11.5f * 0.62f, pad = 10f, lineGap = 3.5f, labelGap = 7f,
|
||||
band = 9.5f, gutter = 16f),
|
||||
STRIP to DroidDeckHudStyle(row = 11.5f, unit = 11.5f * 0.8f, pad = 10f, lineGap = 0f, labelGap = 13f),
|
||||
SIDE_STRIP to DroidDeckHudStyle(row = 11.5f, unit = 9f, pad = 8f, lineGap = 4f, labelGap = 4f, key = 9f),
|
||||
)
|
||||
|
||||
fun rowsFor(size: DroidDeckHudSize, values: Map<String, String>): List<String> =
|
||||
|
||||
@@ -573,6 +573,7 @@ class DroidDeckHudView(context: Context) : View(context) {
|
||||
if (s == null) { contentW = 0f; contentH = 0f; return }
|
||||
if (dock != DroidDeckHudDock.NONE) { buildDockTab(); return }
|
||||
if (size == DroidDeckHudSize.STRIP) { buildStrip(s); return }
|
||||
if (size == DroidDeckHudSize.SIDE_STRIP) { buildSideStrip(s); return }
|
||||
buildRows(s)
|
||||
if (contentW <= 0f || contentH <= 0f) return
|
||||
if (size == DroidDeckHudSize.PILL) addSubtleClock(sp(10f), leftAligned = true)
|
||||
@@ -684,8 +685,8 @@ class DroidDeckHudView(context: Context) : View(context) {
|
||||
finishPanel(panel, halfRound = halfRound)
|
||||
}
|
||||
|
||||
private fun finishPanel(panel: RectF, halfRound: Boolean) {
|
||||
val r = if (halfRound) panel.height() / 2f else min(panel.height() / 2f, sp(56f))
|
||||
private fun finishPanel(panel: RectF, halfRound: Boolean, maxRadius: Float = sp(56f), inset: Float = panelInset()) {
|
||||
val r = if (halfRound) panel.height() / 2f else min(panel.height() / 2f, maxRadius)
|
||||
val margin = outlineWidth() + sp(4f)
|
||||
fun curveIn(top: Float, bottom: Float): Float {
|
||||
val d = max(max(panel.top + r - top, bottom - (panel.bottom - r)), 0f)
|
||||
@@ -703,8 +704,8 @@ class DroidDeckHudView(context: Context) : View(context) {
|
||||
for (t in tileRects) right = max(right, t.right + curveIn(t.top, t.bottom) + margin)
|
||||
panel.right = max(right, panel.left + sp(6f) + r)
|
||||
dPanel = panel; dRadius = r
|
||||
contentW = panel.right + panelInset()
|
||||
contentH = panel.bottom + panelInset()
|
||||
contentW = panel.right + inset
|
||||
contentH = panel.bottom + inset
|
||||
}
|
||||
|
||||
private fun clockTimeString(): String = DateFormat.getTimeFormat(context).format(Date())
|
||||
@@ -936,6 +937,58 @@ class DroidDeckHudView(context: Context) : View(context) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun buildSideStrip(s: HudMetrics.Snapshot) {
|
||||
val style = size.style
|
||||
val inset = sp(5f)
|
||||
val panelWidth = sp(86f)
|
||||
val pad = sp(style.pad)
|
||||
val left = inset + pad
|
||||
val right = inset + panelWidth - pad
|
||||
val markHeight = sp(12f)
|
||||
val markTop = inset + sp(6f)
|
||||
val markLeft = left - DroidDeckMark.inkLeftFor(markHeight)
|
||||
headerMark = RectF(markLeft, markTop, markLeft + DroidDeckMark.widthFor(markHeight), markTop + markHeight)
|
||||
dDividerTop = markTop + markHeight + sp(6f)
|
||||
|
||||
if (showClockTime) {
|
||||
val clock = clockTimeString()
|
||||
val clockPx = sp(8.5f)
|
||||
val clockWidth = measure(clock, clockPx)
|
||||
if (right - clockWidth >= markLeft + DroidDeckMark.inkRightFor(markHeight) + sp(4f)) {
|
||||
val baseline = markTop + (markHeight + capHeight(clockPx)) / 2f
|
||||
glyphs.add(Glyph(right - clockWidth, baseline, clock, blend(colDim), clockPx))
|
||||
}
|
||||
}
|
||||
|
||||
val labelPx = sp(style.key)
|
||||
val rowPx = sp(style.row)
|
||||
val unitPx = sp(style.unit)
|
||||
val lineGap = sp(style.lineGap)
|
||||
var y = dDividerTop + sp(6f)
|
||||
for (key in size.rowsIn(storedOrder)) {
|
||||
if (!switchOn(key)) continue
|
||||
if (key == "showFPSGraph") {
|
||||
val height = sp(15f)
|
||||
graphRect = RectF(left, y, right, y + height)
|
||||
y += height + lineGap
|
||||
continue
|
||||
}
|
||||
|
||||
val valuePx = if (key == "showFPS") sp(16f) else rowPx
|
||||
val row = reading(key, s, labelPx, valuePx, unitPx)
|
||||
val available = right - left - measure(row.label.text, labelPx) - sp(style.labelGap)
|
||||
val fit = (available / runWidth(row.vals)).coerceIn(0f, 1f)
|
||||
val values = row.vals.map { Span(it.text, it.color, it.sizePx * fit, it.glow) }
|
||||
val baseline = y - ascent(valuePx)
|
||||
placeRun(left, baseline, listOf(row.label))
|
||||
placeRun(right - runWidth(values), baseline, values)
|
||||
y += lineH(valuePx) + lineGap
|
||||
}
|
||||
|
||||
val panel = RectF(inset, inset, inset + panelWidth, y + sp(7f))
|
||||
finishPanel(panel, halfRound = false, maxRadius = sp(11f), inset = inset)
|
||||
}
|
||||
|
||||
private fun buildStrip(s: HudMetrics.Snapshot) {
|
||||
val rowPx = sp(11.5f); val unitPx = rowPx * 0.8f; val fpsPx = sp(15f)
|
||||
val padX = sp(10f); val groupGap = sp(13f)
|
||||
|
||||
@@ -156,7 +156,13 @@ object InputLibraries {
|
||||
update(context) { library ->
|
||||
library.copy(layouts = library.layouts.map { layout ->
|
||||
if (layout.id != layoutId || !layout.editable) layout
|
||||
else layout.copy(elements = layout.elements.map { if (it.kind == InputElementKind.STICK) it.copy(floating = on, hideWhenIdle = on) else it })
|
||||
else {
|
||||
fun updateSticks(elements: List<InputSurfaceElement>) = elements.map {
|
||||
if (it.kind == InputElementKind.STICK) it.copy(floating = on, hideWhenIdle = it.hideStickAtRest, adaptiveCapture = on)
|
||||
else it
|
||||
}
|
||||
layout.copy(elements = updateSticks(layout.elements), rotated = updateSticks(layout.rotated))
|
||||
}
|
||||
})
|
||||
}
|
||||
}.onSuccess { ControllerPrefs.setAdaptiveSticks(context, on) }.isSuccess
|
||||
@@ -328,7 +334,8 @@ object InputLibraries {
|
||||
for (e in list) elements.put(JSONObject().put("id", e.id).put("kind", e.kind.name)
|
||||
.put("control", e.control.id).put("name", e.name).put("x", e.x.toDouble()).put("y", e.y.toDouble())
|
||||
.put("width", e.width.toDouble()).put("height", e.height.toDouble()).put("floating", e.floating).put("hideWhenIdle", e.hideWhenIdle).put("mouseGestures", e.mouseGestures).put("toggle", e.toggle).put("icon", e.icon).put("image", e.image)
|
||||
.put("elementOpacity", e.opacity.toDouble()).put("buttonShape", e.buttonShape.name).put("showLabel", e.showLabel).put("alwaysShown", e.alwaysShown))
|
||||
.put("elementOpacity", e.opacity.toDouble()).put("buttonShape", e.buttonShape.name).put("showLabel", e.showLabel).put("alwaysShown", e.alwaysShown)
|
||||
.put("adaptiveCapture", e.adaptiveCapture))
|
||||
}
|
||||
|
||||
private fun decodeElements(array: JSONArray) = array.objects(64).map { e ->
|
||||
@@ -336,7 +343,8 @@ object InputLibraries {
|
||||
e.getDouble("y").toFloat(), e.getDouble("width").toFloat(), e.getDouble("height").toFloat(),
|
||||
e.getString("id"), InputElementKind.valueOf(e.getString("kind")), e.getString("name"),
|
||||
e.optBoolean("floating", true), e.optBoolean("hideWhenIdle", false), e.optBoolean("mouseGestures", false), e.optBoolean("toggle", false), e.optInt("icon", 0), e.optString("image", ""),
|
||||
e.optDouble("elementOpacity", 1.0).toFloat(), InputButtonShape.valueOf(e.optString("buttonShape", InputButtonShape.ROUNDED.name)), e.optBoolean("showLabel", true), e.optBoolean("alwaysShown", false))
|
||||
e.optDouble("elementOpacity", 1.0).toFloat(), InputButtonShape.valueOf(e.optString("buttonShape", InputButtonShape.ROUNDED.name)), e.optBoolean("showLabel", true), e.optBoolean("alwaysShown", false),
|
||||
if (e.isNull("adaptiveCapture")) null else e.optBoolean("adaptiveCapture", false))
|
||||
}
|
||||
|
||||
internal fun encode(library: InputLibrary): String {
|
||||
|
||||
@@ -32,7 +32,7 @@ data class SavedInputLayout(
|
||||
fun withQuickButton(button: InputCommand, shown: Boolean) =
|
||||
copy(style = style.copy(hidden = if (shown) style.hidden - button else style.hidden + button))
|
||||
fun derived(id: String, name: String) = copy(id = id, name = name, origin = origin ?: this.id)
|
||||
val adaptiveSticks get() = elements.filter { it.kind == InputElementKind.STICK }.takeIf { editable && it.isNotEmpty() }?.all { it.floating && it.hideWhenIdle }
|
||||
val adaptiveSticks get() = elements.filter { it.kind == InputElementKind.STICK }.takeIf { editable && it.isNotEmpty() }?.all { it.adaptiveStick }
|
||||
fun supports(role: InputRole) = screen.supports(role) && when (template) {
|
||||
InputLayoutTemplate.OVERLAY -> role == InputRole.PRIMARY
|
||||
InputLayoutTemplate.DECK, InputLayoutTemplate.TRACKPAD -> role == InputRole.SECONDARY
|
||||
|
||||
@@ -37,7 +37,12 @@ data class InputSurfaceElement(
|
||||
val buttonShape: InputButtonShape = InputButtonShape.ROUNDED,
|
||||
val showLabel: Boolean = true,
|
||||
val alwaysShown: Boolean = false,
|
||||
val adaptiveCapture: Boolean? = null,
|
||||
) {
|
||||
// Old layouts encoded Adaptive sticks as Floating + Hide when idle.
|
||||
val adaptiveStick get() = kind == InputElementKind.STICK && floating && (adaptiveCapture ?: hideWhenIdle)
|
||||
val hideStickAtRest get() = hideWhenIdle && (adaptiveCapture != null || !adaptiveStick)
|
||||
|
||||
val hasClick get() = kind == InputElementKind.STICK || kind == InputElementKind.TRACKPAD
|
||||
|
||||
fun bounded() = copy(x = x.coerceIn(0f, 0.97f), y = y.coerceIn(0f, 0.97f),
|
||||
|
||||
@@ -188,7 +188,7 @@ internal class LegacyGamepadLayout(private val context: Context, private val wid
|
||||
settings.mapping[it.id] != ControllerPrefs.OFF && (it.id != "guide" || settings.steamButton) && (it.id != "qam" || settings.qamButton)
|
||||
}.map { c ->
|
||||
InputSurfaceElement(requireNotNull(InputControl.fromId(c.id)), (c.cx - c.halfW) / width, (c.cy - c.halfH) / height,
|
||||
2 * c.halfW / width, 2 * c.halfH / height, floating = settings.adaptiveSticks, hideWhenIdle = c.stick >= 0 && settings.adaptiveSticks,
|
||||
2 * c.halfW / width, 2 * c.halfH / height, floating = settings.adaptiveSticks, adaptiveCapture = if (c.stick >= 0) settings.adaptiveSticks else null,
|
||||
buttonShape = if (c.id in shoulderIds) InputButtonShape.PILL else InputButtonShape.CIRCLE).let { if (previousStickGeometry) widenStickPreviously(it) else widenStick(it) }.bounded()
|
||||
}.toMutableList()
|
||||
if (settings.keyboardButton) result += keyboard()
|
||||
|
||||
@@ -37,8 +37,10 @@ object OnScreenLayout {
|
||||
buttonsOnly: Boolean = false, dock: Dock? = null, rearButtons: Boolean? = null,
|
||||
trackpads: Boolean? = null): List<InputSurfaceElement> {
|
||||
val placed = placeElements(context, saved, width, height, safe, buttonsOnly, dock, rearButtons, trackpads)
|
||||
// Below the game a stick covers nothing, so it keeps its base in view instead of appearing only under the thumb.
|
||||
return if (dock == null) placed else placed.map { if (it.kind == InputElementKind.STICK) it.copy(hideWhenIdle = false) else it }
|
||||
// Docked sticks stay visible and only pick up touches inside their own bounds.
|
||||
return if (dock == null) placed else placed.map {
|
||||
if (it.kind == InputElementKind.STICK) it.copy(hideWhenIdle = false, adaptiveCapture = false) else it
|
||||
}
|
||||
}
|
||||
|
||||
private fun placeElements(context: Context, saved: SavedInputLayout?, width: Int, height: Int, safe: Rect,
|
||||
|
||||
@@ -288,12 +288,26 @@ object BwrapSpawner {
|
||||
}
|
||||
|
||||
private fun preload(session: List<Bind>, rootfs: String, env: MutableMap<String, String>): List<Bind> {
|
||||
val libs = FileUtils.readString(File(rootfs, "etc/ld.so.preload"))?.lines()
|
||||
?.map { it.trim() }?.filter { it.startsWith("/") && File(rootfs + it).isFile } ?: return emptyList()
|
||||
if (libs.isEmpty()) return emptyList()
|
||||
val configured = FileUtils.readString(File(rootfs, "etc/ld.so.preload"))?.lines()
|
||||
?.map { it.trim() }?.filter { it.startsWith("/") && File(rootfs + it).isFile } ?: emptyList()
|
||||
val lseDisabled = env["LSE_EMU"] == "0"
|
||||
val libs = configured.filterNot { lseDisabled && it.endsWith("/liblse_emu.so") }
|
||||
val inherited = env["LD_PRELOAD"]?.split(Regex("[\\s:]+"))
|
||||
?.filter { it.isNotEmpty() && !(lseDisabled && it.substringAfterLast('/') == "liblse_emu.so") }
|
||||
?: emptyList()
|
||||
if (libs.isEmpty()) {
|
||||
if (lseDisabled) {
|
||||
if (inherited.isEmpty()) env.remove("LD_PRELOAD")
|
||||
else env["LD_PRELOAD"] = inherited.joinToString(":")
|
||||
}
|
||||
return emptyList()
|
||||
}
|
||||
val binds = ArrayList<Bind>()
|
||||
val paths = libs.map { lib -> "$PRELOAD_DIR/${lib.substringAfterLast('/')}".also { binds.add(Bind(rootfs + lib, it)) } }
|
||||
env["LD_PRELOAD"] = (paths + listOfNotNull(env["LD_PRELOAD"]?.takeIf { it.isNotBlank() })).joinToString(":")
|
||||
env["LD_PRELOAD"] = (paths + inherited).joinToString(":")
|
||||
if (libs.any { it.endsWith("/liblse_emu.so") }) {
|
||||
env.putIfAbsent("LSE_EMU", "1")
|
||||
}
|
||||
File(rootfs, NET_LINK).takeIf { it.isFile }?.let { binds.add(Bind(it.path, "/$NET_LINK")) }
|
||||
env["FAKE_EVDEV_DIR"]?.let { File(it).parent }?.let { dev ->
|
||||
binds.addAll(bindsFor(session, rootfs, dev, dev))
|
||||
@@ -563,12 +577,15 @@ object BwrapSpawner {
|
||||
|
||||
private fun run(context: Context, plan: Plan, client: LocalSocket, out: DataOutputStream, id: Int) {
|
||||
val verbose = plan.env["DROIDDECK_PROOT_VERBOSE"]?.toIntOrNull()
|
||||
val native = if (NativeGuest.forSession(context)) nativeLaunch(context, plan) else null
|
||||
val nativeSession = NativeGuest.forSession(context)
|
||||
val native = if (nativeSession) nativeLaunch(context, plan) else null
|
||||
val builder = if (native != null) {
|
||||
ProcessBuilder(native.first).redirectErrorStream(true)
|
||||
.directory(File(hostPath(plan.binds, plan.root.path, plan.cwd)).takeIf { it.isDirectory } ?: plan.root)
|
||||
.also { b -> b.environment().apply { clear(); putAll(native.second) } }
|
||||
} else {
|
||||
val reason = if (nativeSession) "sandbox native launch unavailable" else "parent guest uses PRoot"
|
||||
Log.i(TAG, "Flatpak: using PRoot ($reason)")
|
||||
val cmd = LinuxRuntime.prootPrefix(context, plan.root, plan.cwd)
|
||||
if (verbose != null) { cmd.add("-v"); cmd.add(verbose.toString()) }
|
||||
plan.binds.forEach { cmd.add("-b"); cmd.add(it.spec) }
|
||||
@@ -585,7 +602,6 @@ object BwrapSpawner {
|
||||
putAll(prootEnvironment(plan, envTool))
|
||||
put("PROOT_LOADER", LinuxRuntime.prootLoader(context).path)
|
||||
put("PROOT_TMP_DIR", LinuxRuntime.prootTempDir(context).path)
|
||||
if (SessionPrefs.prootNoSeccomp(context)) put("PROOT_NO_SECCOMP", "1")
|
||||
LinuxRuntime.prootLibraryPath(context).takeIf { it.isNotEmpty() }?.let { put("LD_LIBRARY_PATH", it) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.droiddeck.launcher.core.HostProcess
|
||||
import com.droiddeck.launcher.session.OrphanReaper
|
||||
import com.droiddeck.launcher.session.SessionFiles
|
||||
import com.droiddeck.launcher.session.SessionPaths
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import java.io.File
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
@@ -67,7 +66,6 @@ object GuestCommand {
|
||||
put("PROOT_LOADER", LinuxRuntime.prootLoader(context).path)
|
||||
put("PROOT_TMP_DIR", LinuxRuntime.prootTempDir(context).path)
|
||||
if (linkDir != null) put("PROOT_L2S_DIR", linkDir.path)
|
||||
if (SessionPrefs.prootNoSeccomp(context)) put("PROOT_NO_SECCOMP", "1")
|
||||
fastPathKey?.let { ProotFastPath.hostEnv(it).let { (k, v) -> put(k, v) } }
|
||||
LinuxRuntime.prootLibraryPath(context).takeIf { it.isNotEmpty() }?.let { put("LD_LIBRARY_PATH", it) }
|
||||
}
|
||||
|
||||
@@ -22,15 +22,15 @@ object NativeGuest {
|
||||
}
|
||||
|
||||
fun enabled(context: Context): Boolean =
|
||||
SessionPrefs.nativeUserland(context) && available(LinuxRuntime.rootDir(context))
|
||||
available(LinuxRuntime.rootDir(context))
|
||||
|
||||
/**
|
||||
* Whether the next session will start natively. The session stages the hook from the APK before
|
||||
* it starts, so only the setting and the rootfs's loader decide, and a runtime still to be
|
||||
* it starts, so the rootfs's loader decides, and a runtime still to be
|
||||
* installed will have one.
|
||||
*/
|
||||
fun nextSession(context: Context): Boolean =
|
||||
SessionPrefs.nativeUserland(context) && willRun(LinuxRuntime.rootDir(context), LinuxRuntime.isInstalled(context))
|
||||
willRun(LinuxRuntime.rootDir(context), LinuxRuntime.isInstalled(context))
|
||||
|
||||
internal fun willRun(root: File, installed: Boolean): Boolean = !installed || loader(root) != null
|
||||
|
||||
@@ -39,7 +39,7 @@ object NativeGuest {
|
||||
|
||||
/**
|
||||
* Whether a session's helpers (root commands, Flatpak sandboxes, installers) run natively: the
|
||||
* session's own mode while one runs, as the setting can change under it and the rootfs is only
|
||||
* session's own mode while one runs, as the rootfs is only
|
||||
* prepared for native programs at a session's start.
|
||||
*/
|
||||
fun forSession(context: Context): Boolean = sessionMode ?: enabled(context)
|
||||
@@ -104,8 +104,11 @@ object NativeGuest {
|
||||
private fun hostProgram(root: File, program: String): File = File(root, program.removePrefix("/"))
|
||||
|
||||
/** The environment of the session process: the hook's root, the mounts proot used to make, the preload list. */
|
||||
fun sessionEnvironment(root: File, binds: List<String>, program: String, hostname: String? = null): Map<String, String> {
|
||||
val preload = preloadList(root)
|
||||
fun sessionEnvironment(
|
||||
root: File, binds: List<String>, program: String, hostname: String? = null, lseEmu: String? = null,
|
||||
): Map<String, String> {
|
||||
val preload = preloadList(root).filterNot { lseEmu == "0" && it.substringAfterLast('/') == "liblse_emu.so" }
|
||||
val lse = lseEmu ?: "1".takeIf { preload.any { it.substringAfterLast('/') == "liblse_emu.so" } }
|
||||
return linkedMapOf(
|
||||
"DDNATV_ROOT" to root.path,
|
||||
"DDNATV_EXEC" to execLoader.orEmpty(),
|
||||
@@ -113,6 +116,7 @@ object NativeGuest {
|
||||
"DDNATV_HOSTNAME" to hostname.orEmpty(),
|
||||
"DDNATV_BINDS" to binds.joinToString("|") { if (it.contains(':')) it else "$it:$it" },
|
||||
"DDNATV_PRELOAD" to preload.joinToString(":"),
|
||||
"LSE_EMU" to lse.orEmpty(),
|
||||
"LD_PRELOAD" to (preload.map { File(root, it.removePrefix("/")).path } + hook(root).path).joinToString(":"),
|
||||
).filterValues { it.isNotEmpty() }
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.droiddeck.launcher.runtime
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import java.io.File
|
||||
import java.security.MessageDigest
|
||||
|
||||
@@ -12,17 +11,14 @@ object ProotFastPath {
|
||||
const val LIBRARY = "/usr/local/lib/libddfastpath.so"
|
||||
const val MAX_BINDS = 256
|
||||
|
||||
fun allows(preference: Boolean, noSeccomp: Boolean, source: String, nativeUserland: Boolean = false): Boolean =
|
||||
preference && !noSeccomp && !nativeUserland && source == LinuxRuntime.PROOT_PACK
|
||||
internal fun allows(source: String, native: Boolean): Boolean =
|
||||
!native && source == LinuxRuntime.PROOT_PACK
|
||||
|
||||
fun enabled(context: Context): Boolean {
|
||||
val preference = SessionPrefs.prootFastPath(context)
|
||||
val noSeccomp = SessionPrefs.prootNoSeccomp(context)
|
||||
val nativeUserland = SessionPrefs.nativeUserland(context)
|
||||
fun enabled(context: Context, native: Boolean = NativeGuest.forSession(context)): Boolean {
|
||||
if (native) return false
|
||||
val source = LinuxRuntime.prootSource(context)
|
||||
val on = allows(preference, noSeccomp, source, nativeUserland)
|
||||
if (preference && !noSeccomp && !nativeUserland && !on)
|
||||
Log.i(TAG, "proot: fast path off - binary is $source, not the patched proot")
|
||||
val on = allows(source, native)
|
||||
if (!on) Log.i(TAG, "proot: fast path off - binary is $source, not the patched proot")
|
||||
return on
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import android.os.Process
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.core.HostProcess
|
||||
import com.droiddeck.launcher.session.OrphanReaper
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import org.json.JSONObject
|
||||
import java.io.DataInputStream
|
||||
import java.io.DataOutputStream
|
||||
@@ -128,7 +127,6 @@ object RootSpawner {
|
||||
clear()
|
||||
put("PROOT_LOADER", LinuxRuntime.prootLoader(context).path)
|
||||
put("PROOT_TMP_DIR", LinuxRuntime.prootTempDir(context).path)
|
||||
if (SessionPrefs.prootNoSeccomp(context)) put("PROOT_NO_SECCOMP", "1")
|
||||
LinuxRuntime.prootLibraryPath(context).takeIf { it.isNotEmpty() }?.let { put("LD_LIBRARY_PATH", it) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,7 +343,8 @@ object BottomDesktop {
|
||||
LinuxRuntime.commandWithBinds(context, current.root, binds, guest)
|
||||
}
|
||||
val environment = if (current.nativeUserland) {
|
||||
com.droiddeck.launcher.runtime.NativeGuest.sessionEnvironment(current.root, binds, guest.first(), SessionPrefs.guestHostname(context))
|
||||
val lseEmu = current.guest.lastOrNull { it.startsWith("LSE_EMU=") }?.substringAfter('=')
|
||||
com.droiddeck.launcher.runtime.NativeGuest.sessionEnvironment(current.root, binds, guest.first(), SessionPrefs.guestHostname(context), lseEmu)
|
||||
.map { (k, v) -> "$k=$v" }.toTypedArray()
|
||||
} else current.hostEnvironment
|
||||
val line = command.joinToString(" ") { it.replace("\\", "\\\\").replace(" ", "\\ ") }
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.os.ParcelFileDescriptor
|
||||
import android.system.Os
|
||||
import android.system.OsConstants
|
||||
import com.droiddeck.launcher.core.LogRedactor
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import com.droiddeck.launcher.runtime.BattleNet
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import org.json.JSONArray
|
||||
@@ -25,6 +26,7 @@ import java.nio.channels.SeekableByteChannel
|
||||
import java.nio.file.FileVisitResult
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.LinkOption
|
||||
import java.nio.file.NoSuchFileException
|
||||
import java.nio.file.Path
|
||||
import java.nio.file.SimpleFileVisitor
|
||||
import java.nio.file.StandardOpenOption
|
||||
@@ -221,7 +223,7 @@ internal object EnhancedSessionLogShare {
|
||||
Category.values().map { category ->
|
||||
val budget = budgets.getValue(category)
|
||||
val records = ArrayList<Record>()
|
||||
val selected = candidates.filter { it.category == category }
|
||||
val selected = candidates.filter { it.category == category }.sortedBy(::sharePriority)
|
||||
val zip = File(out, "DroidDeck-${folder.name}-${category.suffix}.zip")
|
||||
ZipOutputStream(zip.outputStream().buffered()).use { archive ->
|
||||
val names = HashSet<String>()
|
||||
@@ -616,7 +618,8 @@ internal object EnhancedSessionLogShare {
|
||||
redactionLearningComplete: Boolean,
|
||||
) {
|
||||
val entries = JSONArray()
|
||||
records.take(MAX_MANIFEST_RECORDS).forEach { record ->
|
||||
val (discovery, rest) = records.partition { it.origin == "discovery" }
|
||||
(discovery + rest).take(MAX_MANIFEST_RECORDS).forEach { record ->
|
||||
entries.put(JSONObject().apply {
|
||||
put("entry", record.entry)
|
||||
put("origin", record.origin)
|
||||
@@ -680,6 +683,15 @@ internal object EnhancedSessionLogShare {
|
||||
categoryCounts[category] = (categoryCounts[category] ?: 0) + 1
|
||||
}
|
||||
}
|
||||
fun addRecentLogs(root: File, entryPrefix: String, origin: String) {
|
||||
val scan = walk(root, remaining(maxFiles, out.size))
|
||||
truncated = truncated || scan.truncated
|
||||
partial = partial || scan.partial
|
||||
val base = root.toPath().toAbsolutePath().normalize()
|
||||
scan.files.asSequence().filter { recent(it) && it.name.endsWith(".log", true) }.forEach { file ->
|
||||
add(file, root, "$entryPrefix/${base.relativize(file.toPath().toAbsolutePath().normalize()).joinToString("/")}", origin)
|
||||
}
|
||||
}
|
||||
CRITICAL_SESSION_FILES.forEach { name ->
|
||||
File(folder, name).takeIf { it.exists() }?.let { add(it, folder, "${folder.name}/$name", "session-critical") }
|
||||
}
|
||||
@@ -713,16 +725,7 @@ internal object EnhancedSessionLogShare {
|
||||
add(source.file, source.root, source.entry, "battlenet")
|
||||
}
|
||||
} else {
|
||||
battleNetRoots(context).forEach { (prefix, root) ->
|
||||
val scan = walk(root, remaining(maxFiles, out.size))
|
||||
truncated = truncated || scan.truncated
|
||||
partial = partial || scan.partial
|
||||
scan.files.asSequence().filter { recent(it) && it.name.endsWith(".log", true) }
|
||||
.forEach { file ->
|
||||
val relative = root.toPath().toAbsolutePath().normalize().relativize(file.toPath().toAbsolutePath().normalize()).joinToString("/")
|
||||
add(file, root, "battlenet/$prefix/$relative", "battlenet")
|
||||
}
|
||||
}
|
||||
battleNetRoots(context).forEach { (prefix, root) -> addRecentLogs(root, "battlenet/$prefix", "battlenet") }
|
||||
}
|
||||
val sessionScan = walk(folder, remaining(maxFiles, out.size))
|
||||
truncated = truncated || sessionScan.truncated
|
||||
@@ -733,6 +736,9 @@ internal object EnhancedSessionLogShare {
|
||||
if (relative == EnhancedDiagnostics.MANIFEST_FILE) return@forEach
|
||||
add(file, folder, "${folder.name}/$relative", "session")
|
||||
}
|
||||
val antiCheat = antiCheatRoots(context)
|
||||
partial = partial || antiCheat.partial
|
||||
antiCheat.roots.forEach { (appId, root) -> addRecentLogs(root, "anticheat/$appId", "anticheat") }
|
||||
if (SessionPaths.current()?.canonicalFile == folder.canonicalFile && !File(folder, "steam").exists()) {
|
||||
val steam = File(SessionPrefs.activeSteamRoot(context), "logs")
|
||||
val scan = directFiles(steam, remaining(maxFiles, out.size))
|
||||
@@ -748,7 +754,8 @@ internal object EnhancedSessionLogShare {
|
||||
private fun sharePriority(candidate: Candidate): Int = when {
|
||||
candidate.origin == "session-critical" -> 0
|
||||
candidate.origin == "session" && candidate.category == Category.GAMES -> 1
|
||||
else -> 2
|
||||
candidate.origin == "anticheat" -> 2
|
||||
else -> 3
|
||||
}
|
||||
|
||||
private fun remaining(maxFiles: Int, found: Int): Int = (maxFiles - found + 1).coerceAtLeast(0)
|
||||
@@ -822,6 +829,39 @@ internal object EnhancedSessionLogShare {
|
||||
return ScanResult(files, truncated, partial)
|
||||
}
|
||||
|
||||
private class AntiCheatRoots(val roots: List<Pair<String, File>>, val partial: Boolean)
|
||||
|
||||
private fun antiCheatRoots(context: Context): AntiCheatRoots {
|
||||
var partial = false
|
||||
val seen = HashSet<String>()
|
||||
val dirs = runCatching { Library.compatdataDirs(context) }.getOrElse { partial = true; emptyList() }
|
||||
val roots = dirs.flatMapIndexed { library, compatdata ->
|
||||
val prefixes = compatdata.listFiles() ?: run { partial = true; emptyArray() }
|
||||
prefixes.filter { !Files.isSymbolicLink(it.toPath()) }.mapNotNull { prefix ->
|
||||
val appId = steamAppId(prefix.name) ?: return@mapNotNull null
|
||||
val root = File(prefix, EAC_LOG_DIR)
|
||||
val directory = try {
|
||||
Files.readAttributes(root.toPath(), BasicFileAttributes::class.java, LinkOption.NOFOLLOW_LINKS).isDirectory
|
||||
} catch (_: NoSuchFileException) {
|
||||
false
|
||||
} catch (_: Exception) {
|
||||
partial = true
|
||||
false
|
||||
}
|
||||
if (!directory) return@mapNotNull null
|
||||
val base = "$appId/library${library + 1}"
|
||||
val key = base.takeIf { seen.add(it) } ?: "$base-${prefix.name}".takeIf { seen.add(it) }
|
||||
if (key != null) key to root else { partial = true; null }
|
||||
}
|
||||
}
|
||||
return AntiCheatRoots(roots, partial)
|
||||
}
|
||||
|
||||
private fun steamAppId(name: String): String? =
|
||||
name.takeIf { SIGNED_APP_ID.matches(it) }?.toLongOrNull()
|
||||
?.takeIf { it in Int.MIN_VALUE.toLong()..0xffffffffL }
|
||||
?.let { (it and 0xffffffffL).toString() }
|
||||
|
||||
private fun battleNetRoots(context: Context): List<Pair<String, File>> {
|
||||
val drive = File(BattleNet.prefix(context), "pfx/drive_c")
|
||||
val data = File(drive, "ProgramData/Battle.net")
|
||||
@@ -928,7 +968,9 @@ internal object EnhancedSessionLogShare {
|
||||
val normalized = name.replace('\\', '/').trimStart('/')
|
||||
val parts = normalized.split('/')
|
||||
if (normalized.isEmpty() || parts.any { it.isEmpty() || it == "." || it == ".." }) return null
|
||||
return parts.joinToString("/") { safeComponent(it) }
|
||||
return parts.mapIndexed { index, part ->
|
||||
if (index == 1 && parts[0] == "anticheat" && APP_ID.matches(part)) part else safeComponent(part)
|
||||
}.joinToString("/")
|
||||
}
|
||||
|
||||
private fun safeComponent(value: String): String {
|
||||
@@ -941,7 +983,7 @@ internal object EnhancedSessionLogShare {
|
||||
|
||||
private fun category(entry: String): Category {
|
||||
val value = entry.lowercase(Locale.US)
|
||||
if (value.startsWith("battlenet/") || value.startsWith("stores/") || value.startsWith("tools/") || value.startsWith("rpcs3/") ||
|
||||
if (value.startsWith("battlenet/") || value.startsWith("anticheat/") || value.startsWith("stores/") || value.startsWith("tools/") || value.startsWith("rpcs3/") ||
|
||||
value.contains("droiddeck-esync/") || GAME_LOG.matches(value.substringAfterLast('/')) ||
|
||||
listOf("proton", "wine", "dxvk", "vkd3d", "battle.net", "game-debug", "bionic").any(value::contains)) return Category.GAMES
|
||||
if (listOf("wayland", "gamescope", "xwayland", "vulkan", "gpu", "mesa", "egl", "glx", "drm", "compositor", "frame-trace").any(value::contains)) return Category.GRAPHICS
|
||||
@@ -950,7 +992,7 @@ internal object EnhancedSessionLogShare {
|
||||
|
||||
private val GAME_LOG = Regex("steam-[0-9]+\\.(log|txt)")
|
||||
private val KNOWN_COMPONENTS = setOf(
|
||||
"steam", "graphics", "games", "battlenet", "client", "agent", "setup", "stores", "tools",
|
||||
"steam", "graphics", "games", "battlenet", "anticheat", "anticheatlauncher.log", "client", "agent", "setup", "stores", "tools",
|
||||
"droiddeck", "droiddeck-esync", "session.log", "app.log", "wayland.log", "audio.log",
|
||||
"device.txt", "network.txt", "events.jsonl", "memory.csv", "capture.json", "crash.log",
|
||||
"frame-trace.log", "process-trace.log", "game-lifecycle.log", "launches.log", "tools.tsv", "wanted.tsv", "prefixes.json",
|
||||
@@ -961,11 +1003,15 @@ internal object EnhancedSessionLogShare {
|
||||
private val KNOWN_COMPONENT_PATTERNS = listOf(
|
||||
Regex("[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{2,}-[a-z0-9-]{1,24}"),
|
||||
Regex("steam-[0-9]+\\.(?:log|txt)"),
|
||||
Regex("library[0-9]+(?:--?[0-9]{1,10})?"),
|
||||
Regex("(?:battle\\.net-[0-9]+|battle\\.net-setup-[0-9]+|Agent-[0-9]+)\\.log"),
|
||||
Regex("(?:Agent\\.[0-9]+|bna_[0-9]+)"),
|
||||
Regex("stores-[0-9]{4}-[0-9]{2}-[0-9]{2}\\.log"),
|
||||
Regex("library[0-9]{1,3}"),
|
||||
Regex("entry-[0-9a-f]{16}(?:\\.[a-z0-9]{1,8})?"),
|
||||
)
|
||||
private val APP_ID = Regex("[0-9]{1,10}")
|
||||
private val SIGNED_APP_ID = Regex("-?[0-9]{1,10}")
|
||||
private val SAFE_SUFFIX = Regex("\\.[A-Za-z0-9]{1,8}$")
|
||||
private val CRITICAL_SESSION_FILES = listOf(
|
||||
"session.log", "app.log", "wayland.log", "audio.log", "device.txt", "network.txt",
|
||||
@@ -973,6 +1019,7 @@ internal object EnhancedSessionLogShare {
|
||||
)
|
||||
private const val RECENT_MILLIS = 7L * 24 * 60 * 60 * 1000
|
||||
private const val STORE_LOG_SCAN = 512
|
||||
private const val EAC_LOG_DIR = "pfx/drive_c/users/steamuser/AppData/Roaming/EasyAntiCheat"
|
||||
private const val COPY_BUFFER_BYTES = 64 * 1024
|
||||
private const val TRACE_SCAN_BYTES = 16L * 1024 * 1024
|
||||
private const val LEGACY_LOG_MAX_BYTES = 8L * 1024 * 1024
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
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 }
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,16 @@ package com.droiddeck.launcher.session
|
||||
|
||||
import android.util.Log
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import java.nio.file.FileVisitResult
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
import java.nio.file.SimpleFileVisitor
|
||||
import java.nio.file.attribute.BasicFileAttributes
|
||||
|
||||
internal object PageCacheTrim {
|
||||
private const val TAG = "PageCacheTrim"
|
||||
private const val MIN_FILE_BYTES = 8L shl 20
|
||||
internal const val MIN_FILE_BYTES = 8L shl 20
|
||||
private const val POLL_MS = 3000L
|
||||
private const val RESCAN_MS = 120_000L
|
||||
|
||||
@@ -37,7 +43,7 @@ internal object PageCacheTrim {
|
||||
if (mem != null && shouldTrim(mem, baseline)) {
|
||||
val now = System.currentTimeMillis()
|
||||
if (now - scanned > RESCAN_MS) {
|
||||
files = roots().flatMap { root -> root.walkTopDown().onEnter { !java.nio.file.Files.isSymbolicLink(it.toPath()) }.filter { it.isFile && it.length() >= MIN_FILE_BYTES }.toList() }
|
||||
files = roots().flatMap { root -> bigFiles(root) }
|
||||
scanned = now
|
||||
}
|
||||
val began = System.nanoTime()
|
||||
@@ -56,6 +62,34 @@ internal object PageCacheTrim {
|
||||
}, "page-cache-trim").apply { isDaemon = true }.start()
|
||||
}
|
||||
|
||||
// java.io's directory listing hands raw entry names to JNI NewStringUTF, which aborts the
|
||||
// process on names that are not valid UTF-8; NIO decodes them with replacement instead.
|
||||
// Without FOLLOW_LINKS, symlinked directories are never descended into, like the old onEnter,
|
||||
// except that a starting directory that is itself a link has to be resolved first; a link
|
||||
// whose target has vanished yields an empty result instead of an error.
|
||||
internal fun bigFiles(root: File): List<File> {
|
||||
val out = ArrayList<File>()
|
||||
val start = root.toPath()
|
||||
val real = if (Files.isSymbolicLink(start)) {
|
||||
try {
|
||||
start.toRealPath()
|
||||
} catch (_: IOException) {
|
||||
return out
|
||||
}
|
||||
} else start
|
||||
Files.walkFileTree(real, object : SimpleFileVisitor<Path>() {
|
||||
override fun visitFile(file: Path, attrs: BasicFileAttributes): FileVisitResult {
|
||||
if (attrs.isRegularFile && attrs.size() >= MIN_FILE_BYTES) out.add(file.toFile())
|
||||
return FileVisitResult.CONTINUE
|
||||
}
|
||||
|
||||
override fun visitFileFailed(file: Path, error: IOException): FileVisitResult = FileVisitResult.CONTINUE
|
||||
|
||||
override fun postVisitDirectory(dir: Path, error: IOException?): FileVisitResult = FileVisitResult.CONTINUE
|
||||
})
|
||||
return out
|
||||
}
|
||||
|
||||
private fun drop(file: File) {
|
||||
PageCacheNative.fadviseDontNeed(file.path)
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Context
|
||||
import android.os.Environment
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.core.CpuFeatures
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.runtime.BwrapSpawner
|
||||
import com.droiddeck.launcher.runtime.DesktopCatalog
|
||||
@@ -22,6 +23,10 @@ object SessionFiles {
|
||||
private const val NO_PAD_SWITCH = "Download/droiddeck-no-pad"
|
||||
const val DIRECTAUDIO_DIR = "usr/local/lib/directaudio"
|
||||
private const val STAGED_LEDGER = "usr/local/.droiddeck-staged"
|
||||
internal const val LSE_EMU = "usr/local/lib/droiddeck-lse/liblse_emu.so"
|
||||
|
||||
internal fun lsePreload(lacksAtomics: Boolean, staged: Boolean, lseEmu: String? = null): String =
|
||||
if (lacksAtomics && staged && lseEmu != "0") "/$LSE_EMU\n" else ""
|
||||
private const val IME_MANIFEST = "usr/local/share/droiddeck/ime-files.json"
|
||||
private const val IME_DEFAULT_MODE = 420
|
||||
val DIRECTAUDIO_SETS = arrayOf("linux-wine11", "linux-wine11-systhread")
|
||||
@@ -102,10 +107,23 @@ object SessionFiles {
|
||||
}
|
||||
|
||||
private val STAGE_LOCK = Any()
|
||||
@Volatile private var activeSessionLseEmu: String? = null
|
||||
|
||||
fun stage(context: Context, root: File, startsSession: Boolean = false) = synchronized(STAGE_LOCK) { stageNow(context, root, startsSession) }
|
||||
fun stage(context: Context, root: File, startsSession: Boolean = false) =
|
||||
stage(context, root, startsSession, lseEmu = null)
|
||||
|
||||
private fun stageNow(context: Context, root: File, startsSession: Boolean) {
|
||||
fun stage(context: Context, root: File, startsSession: Boolean, lseEmu: String?) =
|
||||
synchronized(STAGE_LOCK) {
|
||||
val selection = if (startsSession) {
|
||||
activeSessionLseEmu = lseEmu
|
||||
lseEmu
|
||||
} else {
|
||||
lseEmu ?: activeSessionLseEmu
|
||||
}
|
||||
stageNow(context, root, startsSession, selection)
|
||||
}
|
||||
|
||||
private fun stageNow(context: Context, root: File, startsSession: Boolean, lseEmu: String?) {
|
||||
if (DesktopCatalog.desktopInstalled(root) && !DesktopCatalog.desktopFromPack(root)) try { DesktopCatalog.cleanLegacy(context) }
|
||||
catch (e: Exception) { Log.w(TAG, "LXQt cleanup will retry next session", e) }
|
||||
GameEnvironmentStore.publish(context)
|
||||
@@ -281,6 +299,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",
|
||||
LSE_EMU to LSE_EMU,
|
||||
) + 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)
|
||||
@@ -343,20 +362,22 @@ object SessionFiles {
|
||||
stageImeFiles(context, root, ledger)
|
||||
ledger.save()
|
||||
for (old in arrayOf("aarch64-unix", "aarch64-windows", "i386-windows")) File(root, "$DIRECTAUDIO_DIR/lib/wine/$old").deleteRecursively()
|
||||
val preload = StringBuilder("/usr/local/lib/libddsession.so\n")
|
||||
val preload = StringBuilder(lsePreload(CpuFeatures.lacksAtomics, File(root, LSE_EMU).isFile, lseEmu))
|
||||
preload.append("/usr/local/lib/libddsession.so\n")
|
||||
if (!File(Environment.getExternalStorageDirectory(), NO_PAD_SWITCH).exists()) {
|
||||
preload.append("/usr/local/lib/libfakeinput.so\n")
|
||||
}
|
||||
val nativeUserland = SessionPrefs.nativeUserland(context)
|
||||
if (nativeUserland) com.droiddeck.launcher.runtime.NativeGuest.prepare(context, root)
|
||||
if (ProotFastPath.enabled(context)) {
|
||||
com.droiddeck.launcher.runtime.NativeGuest.prepare(context, root)
|
||||
val native = com.droiddeck.launcher.runtime.NativeGuest.available(root)
|
||||
val nativePreload = preload.toString()
|
||||
if (ProotFastPath.enabled(context, native)) {
|
||||
val library = com.droiddeck.launcher.agent.AgentEnv.fastPathLibrary(context)
|
||||
preload.append(library + "\n")
|
||||
if (startsSession && library != ProotFastPath.LIBRARY) Log.i(TAG, "fast path preload: $library (debugging override)")
|
||||
}
|
||||
val etc = File(root, "etc").apply { mkdirs() }
|
||||
File(etc, "droiddeck").mkdirs()
|
||||
FileUtils.writeString(File(etc, "droiddeck/native-preload"), preload.toString())
|
||||
FileUtils.writeString(File(etc, "droiddeck/native-preload"), nativePreload)
|
||||
val staged = File(etc, "ld.so.preload.staged")
|
||||
if (!FileUtils.writeString(staged, preload.toString())
|
||||
|| !staged.renameTo(File(etc, "ld.so.preload"))) {
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.droiddeck.launcher.gpu.Cardboard
|
||||
import com.droiddeck.launcher.gpu.ScreenEffects
|
||||
import com.droiddeck.launcher.gpu.SystemVulkanDriver
|
||||
import com.droiddeck.launcher.gpu.TurnipDriver
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
|
||||
@@ -112,10 +113,21 @@ object SessionPrefs {
|
||||
else -> false
|
||||
}
|
||||
|
||||
fun launcherFullscreen(context: Context): Boolean = prefs(context).getBoolean("launcherFullscreen", true)
|
||||
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 setLauncherFullscreen(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("launcherFullscreen", on).apply()
|
||||
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 launcherFrost(context: Context): Boolean = prefs(context).getBoolean("launcherFrost", false)
|
||||
@@ -306,6 +318,14 @@ object SessionPrefs {
|
||||
prefs(context).edit().putBoolean("telemetryAuto", on).apply()
|
||||
}
|
||||
|
||||
fun settingsSearches(context: Context): List<String> = runCatching {
|
||||
JSONArray(prefs(context).getString("settingsSearches", null) ?: "[]").let { a -> List(a.length()) { a.getString(it) } }
|
||||
}.getOrDefault(emptyList())
|
||||
|
||||
fun setSettingsSearches(context: Context, searches: List<String>) {
|
||||
prefs(context).edit().putString("settingsSearches", JSONArray(searches).toString()).apply()
|
||||
}
|
||||
|
||||
fun telemetryOff(context: Context): Set<String> = prefs(context).getStringSet("telemetryOff", null)?.toSet().orEmpty()
|
||||
|
||||
fun setTelemetryOff(context: Context, keys: Set<String>) {
|
||||
@@ -1170,21 +1190,9 @@ object SessionPrefs {
|
||||
prefs(context).edit().putBoolean("mountSharedStorage", on).apply()
|
||||
}
|
||||
|
||||
fun prootNoSeccomp(context: Context): Boolean = prefs(context).getBoolean("prootNoSeccomp", false)
|
||||
|
||||
fun setProotNoSeccomp(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("prootNoSeccomp", on).apply()
|
||||
}
|
||||
|
||||
fun nativeUserland(context: Context): Boolean = prefs(context).getBoolean("nativeUserland", true)
|
||||
|
||||
/** The session's long-lived programs run in worker processes Android does not count (GuestWorkers). */
|
||||
fun childProcessHandoff(context: Context): Boolean = prefs(context).getBoolean("childProcessHandoff", true)
|
||||
|
||||
fun setNativeUserland(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("nativeUserland", on).apply()
|
||||
}
|
||||
|
||||
/** Whether the Plasma desktop, and so its apps and shells, runs as an ordinary user instead of root (native userland only). */
|
||||
fun desktopAsUser(context: Context): Boolean = prefs(context).getBoolean("desktopAsUser", false)
|
||||
|
||||
@@ -1192,12 +1200,6 @@ object SessionPrefs {
|
||||
prefs(context).edit().putBoolean("desktopAsUser", on).apply()
|
||||
}
|
||||
|
||||
fun prootFastPath(context: Context): Boolean = prefs(context).getBoolean("prootFastPath", true)
|
||||
|
||||
fun setProotFastPath(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("prootFastPath", on).apply()
|
||||
}
|
||||
|
||||
fun cursorComposite(context: Context): Boolean = prefs(context).getBoolean("cursorComposite", true)
|
||||
|
||||
fun setCursorComposite(context: Context, on: Boolean) {
|
||||
|
||||
@@ -47,6 +47,7 @@ import com.droiddeck.launcher.input.SteamControllerBle
|
||||
import com.droiddeck.launcher.runtime.BwrapSpawner
|
||||
import com.droiddeck.launcher.runtime.LinuxNetworkLinkComponent
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.runtime.NativeGuest
|
||||
import com.droiddeck.launcher.runtime.ProotFastPath
|
||||
import com.droiddeck.launcher.runtime.UserApps
|
||||
import com.droiddeck.launcher.wayland.WaylandCompositor
|
||||
@@ -566,6 +567,7 @@ class SessionService : Service() {
|
||||
.onFailure { Log.w(TAG, "agent environment skipped", it) }
|
||||
val agentEnvironment = nextAgentEnvironment.getOrDefault(emptyList())
|
||||
val customEnvironment = extraEnv()
|
||||
val lseEmu = (customEnvironment + agentEnvironment).lastOrNull { it.startsWith("LSE_EMU=") }?.substringAfter('=')
|
||||
try {
|
||||
if (systemVulkan) {
|
||||
SystemVulkanDriver.prepare(this)
|
||||
@@ -575,7 +577,7 @@ class SessionService : Service() {
|
||||
}
|
||||
pruneSystemVulkanRuntime()
|
||||
}
|
||||
SessionFiles.stage(this, root, startsSession = true)
|
||||
SessionFiles.stage(this, root, startsSession = true, lseEmu = lseEmu)
|
||||
} catch (error: Exception) {
|
||||
Log.e(TAG, "Could not prepare the session graphics runtime", error)
|
||||
failSession(gen, "GRAPHICS_RUNTIME_FAILED", getString(R.string.session_graphics_runtime_failed), -1)
|
||||
@@ -783,12 +785,13 @@ class SessionService : Service() {
|
||||
SessionEvents.step("shm-clear") { FileUtils.clear(File(LinuxRuntime.liveDir(this), "shm")) }
|
||||
|
||||
val sharedStorage = LinuxRuntime.sharedStorage(this)
|
||||
val binds = sessionBinds(controllersOn, fakeInputDir, sessionDir, guest, sessionRoot, runtimeDir, sharedStorage)
|
||||
val nativeUserland = com.droiddeck.launcher.runtime.NativeGuest.enabled(this)
|
||||
val nativeUserland = NativeGuest.enabled(this)
|
||||
val fastPath = ProotFastPath.enabled(this, nativeUserland)
|
||||
val binds = sessionBinds(controllersOn, fakeInputDir, sessionDir, guest, sessionRoot, runtimeDir, sharedStorage, fastPath)
|
||||
synchronized(stopLock) {
|
||||
if (gen == sessionGen && SessionState.running) com.droiddeck.launcher.runtime.NativeGuest.sessionMode = nativeUserland
|
||||
}
|
||||
val fastPathKey = if (ProotFastPath.enabled(this)) {
|
||||
val fastPathKey = if (fastPath) {
|
||||
val prootBinds = LinuxRuntime.binds(
|
||||
this, sessionRoot, runtimeDir, sharedStorage, binds,
|
||||
)
|
||||
@@ -809,16 +812,14 @@ class SessionService : Service() {
|
||||
LinuxRuntime.rememberSessionBinds(sessionBindSpecs)
|
||||
com.droiddeck.launcher.runtime.NativeGuest.command(root, guest.first(), guest.drop(1))
|
||||
} else {
|
||||
val reason = if (NativeGuest.loader(root) == null) "missing glibc loader" else "missing native hook"
|
||||
Log.i(TAG, "guest runtime: using PRoot ($reason)")
|
||||
LinuxRuntime.command(this, sessionRoot, runtimeDir, sharedStorage, binds, guest)
|
||||
}
|
||||
|
||||
val prootEnv = HostEnvironment()
|
||||
prootEnv["PROOT_LOADER"] = LinuxRuntime.prootLoader(this).path
|
||||
prootEnv["PROOT_TMP_DIR"] = LinuxRuntime.prootTempDir(this).path
|
||||
if (SessionPrefs.prootNoSeccomp(this)) {
|
||||
prootEnv["PROOT_NO_SECCOMP"] = "1"
|
||||
if (!nativeUserland) Log.i(TAG, "proot: seccomp acceleration off by request")
|
||||
}
|
||||
fastPathKey?.let { ProotFastPath.hostEnv(it).let { (k, v) -> prootEnv[k] = v } }
|
||||
for (key in listOf("PROOT_PROFILE", "PROOT_PROFILE_SLOW_US")) {
|
||||
guest.lastOrNull { it.startsWith("$key=") }?.substringAfter('=')?.let { prootEnv[key] = it }
|
||||
@@ -830,7 +831,7 @@ class SessionService : Service() {
|
||||
if (drives > 0) Log.i(TAG, "$drives Wine drive links given their guest paths back")
|
||||
val hostEnv = if (nativeUserland) HostEnvironment().also { env ->
|
||||
Log.i(TAG, "native userland: no proot (${sessionBindSpecs.size} mounts)")
|
||||
com.droiddeck.launcher.runtime.NativeGuest.sessionEnvironment(root, sessionBindSpecs, guest.first(), SessionPrefs.guestHostname(this))
|
||||
com.droiddeck.launcher.runtime.NativeGuest.sessionEnvironment(root, sessionBindSpecs, guest.first(), SessionPrefs.guestHostname(this), lseEmu)
|
||||
.forEach { (k, v) -> env[k] = v }
|
||||
} else prootEnv
|
||||
|
||||
@@ -1312,6 +1313,7 @@ class SessionService : Service() {
|
||||
sessionRoot: File,
|
||||
runtimeDir: File,
|
||||
sharedStorage: File?,
|
||||
fastPath: Boolean,
|
||||
): ArrayList<String> {
|
||||
val binds = ArrayList<String>()
|
||||
if (controllersOn) binds.add(fakeInputDir.path + ":/dev/input")
|
||||
@@ -1355,10 +1357,17 @@ 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 com.droiddeck.launcher.frontend.AddedExes.list(this).map { File(it.folder) }.distinctBy { it.path }) {
|
||||
for (folder in addedExeFolders) {
|
||||
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()
|
||||
@@ -1409,7 +1418,7 @@ class SessionService : Service() {
|
||||
Log.w(TAG, "storage diagnostics: selected library could not be identified; metadata snapshot only")
|
||||
}
|
||||
}
|
||||
for (root in com.droiddeck.launcher.frontend.AddedGames.roots(this)) {
|
||||
for (root in addedGameRoots) {
|
||||
if (root.host.isDirectory && root.host.canRead()) {
|
||||
File(LinuxRuntime.rootDir(this), root.guest.removePrefix("/")).mkdirs()
|
||||
binds.add(root.host.path + ":" + root.guest)
|
||||
@@ -1438,7 +1447,7 @@ class SessionService : Service() {
|
||||
if (storageDiagnosticLibrary != null && library != null) libraries.add(SecondaryLibrary.CARD_GUESTS[0] to library.label)
|
||||
val gamesLibraries = GameStorage.gamesFolderLibraries(this)
|
||||
if (gamesLibraries.isNotEmpty()) {
|
||||
var room = if (ProotFastPath.enabled(this)) {
|
||||
var room = if (fastPath) {
|
||||
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, sharedStorage, binds).size
|
||||
} else Int.MAX_VALUE
|
||||
for (games in gamesLibraries) {
|
||||
@@ -1480,7 +1489,7 @@ class SessionService : Service() {
|
||||
continue
|
||||
}
|
||||
try {
|
||||
val room = if (ProotFastPath.enabled(this)) {
|
||||
val room = if (fastPath) {
|
||||
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, sharedStorage, binds).size
|
||||
} else Int.MAX_VALUE
|
||||
val content = SecondaryLibrary.contentPath(entry.host)
|
||||
@@ -1509,7 +1518,7 @@ class SessionService : Service() {
|
||||
if (problem != null) {
|
||||
Log.w(TAG, "x86-64 steam library: $problem")
|
||||
} else try {
|
||||
val room = if (ProotFastPath.enabled(this)) {
|
||||
val room = if (fastPath) {
|
||||
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, sharedStorage, binds).size
|
||||
} else Int.MAX_VALUE
|
||||
val extra = SecondaryLibrary.binds(filesDir, x64, listOf(GameStorage.X64_CARD_GUEST)).drop(1)
|
||||
@@ -1531,7 +1540,7 @@ class SessionService : Service() {
|
||||
continue
|
||||
}
|
||||
try {
|
||||
val room = if (ProotFastPath.enabled(this)) {
|
||||
val room = if (fastPath) {
|
||||
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, sharedStorage, binds).size
|
||||
} else Int.MAX_VALUE
|
||||
val extra = SecondaryLibrary.binds(filesDir, entry.x64Host, listOf(entry.x64Guest)).drop(1)
|
||||
@@ -1567,7 +1576,7 @@ class SessionService : Service() {
|
||||
try {
|
||||
val listing = File(filesDir, "session/desktop-volumes.json").apply { parentFile?.mkdirs() }
|
||||
val volumes = org.json.JSONArray()
|
||||
var room = if (ProotFastPath.enabled(this)) {
|
||||
var room = if (fastPath) {
|
||||
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, sharedStorage, binds).size
|
||||
} else Int.MAX_VALUE
|
||||
for (root in com.droiddeck.launcher.files.StorageRoots.list(this)) {
|
||||
|
||||
@@ -12,7 +12,7 @@ object SettingsReset {
|
||||
private const val TAG = "SettingsReset"
|
||||
|
||||
internal val SESSION_KEYS = setOf(
|
||||
"orientation", "launcherFullscreen", "launcherFrost", "frostWallpaper", "frostCards", "frostTransparency", "frostCardTransparency", "controllerHaptics", "animations", "lowStorageWarning", "theme", "runSteamAtStartup", "startupSession", "addedGamesArt",
|
||||
"orientation", "launcherFullscreen", "launcherFullscreenMode", "sessionFullscreenMode", "launcherFrost", "frostWallpaper", "frostCards", "frostTransparency", "frostCardTransparency", "controllerHaptics", "animations", "lowStorageWarning", "theme", "runSteamAtStartup", "startupSession", "addedGamesArt",
|
||||
"drawerWidthDp", "dualScreenMode", "dualScreenSessionMode", "dualScreenLauncher", "dualScreenSessionControls", "androidTextFieldKeyboard",
|
||||
"soundtracksIngame", "gameStoresSpeedTier", "gameStoresParallel", "storesOpenTab", "storesShowMature",
|
||||
"storesInstallLanguage",
|
||||
|
||||
@@ -8,7 +8,6 @@ import androidx.compose.runtime.setValue
|
||||
import com.droiddeck.launcher.core.AddonPack
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.session.SessionEvents
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
import com.droiddeck.launcher.stores.Store
|
||||
import com.droiddeck.launcher.stores.AchievementNotifications
|
||||
@@ -149,7 +148,6 @@ object GogComet {
|
||||
remove("LD_PRELOAD"); remove("LD_AUDIT"); remove("LD_LIBRARY_PATH")
|
||||
put("PROOT_LOADER", LinuxRuntime.prootLoader(context).path)
|
||||
put("PROOT_TMP_DIR", LinuxRuntime.prootTempDir(context).path)
|
||||
if (SessionPrefs.prootNoSeccomp(context)) put("PROOT_NO_SECCOMP", "1")
|
||||
LinuxRuntime.prootLibraryPath(context).takeIf { it.isNotEmpty() }?.let { put("LD_LIBRARY_PATH", it) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.droiddeck.launcher.core.AddonPack
|
||||
import com.droiddeck.launcher.runtime.LinuxNetworkLinkComponent
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.runtime.ProotFastPath
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.stores.StoreInstallRoot
|
||||
import org.json.JSONObject
|
||||
import java.io.Closeable
|
||||
@@ -107,7 +106,6 @@ internal object Xodus {
|
||||
remove("LD_PRELOAD"); remove("LD_AUDIT"); remove("LD_LIBRARY_PATH")
|
||||
put("PROOT_LOADER", LinuxRuntime.prootLoader(app).path)
|
||||
put("PROOT_TMP_DIR", LinuxRuntime.prootTempDir(app).path)
|
||||
if (SessionPrefs.prootNoSeccomp(app)) put("PROOT_NO_SECCOMP", "1")
|
||||
fastPathKey?.let { ProotFastPath.hostEnv(it).let { (key, value) -> put(key, value) } }
|
||||
LinuxRuntime.prootLibraryPath(app).takeIf { it.isNotEmpty() }?.let { put("LD_LIBRARY_PATH", it) }
|
||||
}
|
||||
|
||||
@@ -67,13 +67,18 @@ 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(Modifier.fillMaxWidth().padding(bottom = 10.dp), verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
Column(agentPanelFrame(), 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) {
|
||||
@@ -269,12 +274,8 @@ internal fun AgentProcessList(modifier: Modifier) {
|
||||
@Composable
|
||||
internal fun AgentUsage() {
|
||||
val context = LocalContext.current
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
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),
|
||||
) {
|
||||
Column(agentPanelFrame(), 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)),
|
||||
|
||||
@@ -39,7 +39,8 @@ internal fun DroidDeckHudSettings(host: MenuHost, a: DrawerActions, track: (Stri
|
||||
}
|
||||
if (!a.hudOn) return@SettingsGroup
|
||||
val size = DroidDeckHudSize.from(cfg["hudSize"])
|
||||
ChoiceRow(host, "hud-size", stringResource(R.string.hud_size), stringResource(R.string.hud_size_hint),
|
||||
ChoiceRow(host, "hud-size", stringResource(R.string.hud_size),
|
||||
stringResource(if (size == DroidDeckHudSize.SIDE_STRIP) R.string.hud_size_side_strip_hint else R.string.hud_size_hint),
|
||||
listOf(
|
||||
DroidDeckHudSize.FULL to stringResource(R.string.hud_size_full),
|
||||
DroidDeckHudSize.TILES to stringResource(R.string.hud_size_tiles),
|
||||
@@ -47,6 +48,7 @@ internal fun DroidDeckHudSettings(host: MenuHost, a: DrawerActions, track: (Stri
|
||||
DroidDeckHudSize.MINIMAL to stringResource(R.string.hud_size_minimal),
|
||||
DroidDeckHudSize.MEGA to stringResource(R.string.hud_size_mega),
|
||||
DroidDeckHudSize.STRIP to stringResource(R.string.hud_size_strip),
|
||||
DroidDeckHudSize.SIDE_STRIP to stringResource(R.string.hud_size_side_strip),
|
||||
),
|
||||
size, chipModifier = track("hud-size")) { a.onHudSetting("hudSize", it.token) }
|
||||
ChoiceRow(host, "hud-hold", stringResource(R.string.hud_hold), null,
|
||||
|
||||
@@ -88,6 +88,7 @@ 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
|
||||
@@ -176,7 +177,8 @@ 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 launcherFullscreen: Boolean = true,
|
||||
val launcherFullscreenMode: FullscreenMode = FullscreenMode.ALWAYS,
|
||||
val sessionFullscreenMode: FullscreenMode = FullscreenMode.ALWAYS,
|
||||
val launcherFrost: Boolean = false,
|
||||
val frostWallpaper: Boolean = true,
|
||||
val frostCards: Boolean = true,
|
||||
@@ -276,7 +278,7 @@ class FrontEndActions(
|
||||
val onShareSessionLog: (File) -> Unit = {},
|
||||
val onSaveSessionLog: (File) -> Unit = {},
|
||||
val onDeleteSessionLog: (File, () -> Unit) -> Unit = { _, done -> done() },
|
||||
val onClearLogs: () -> Unit = {},
|
||||
val onClearLogs: (() -> Unit) -> Unit = {},
|
||||
val onResetSettings: () -> Unit = {},
|
||||
val onOffline: () -> Unit,
|
||||
val onOfflineAuto: () -> Unit = {},
|
||||
@@ -288,7 +290,8 @@ class FrontEndActions(
|
||||
val onOrientation: (Int) -> Unit = {},
|
||||
val onLauncherOrientation: (Int) -> Unit = {},
|
||||
val onHomePage: (String) -> Unit = {},
|
||||
val onLauncherFullscreen: (Boolean) -> Unit = {},
|
||||
val onLauncherFullscreenMode: (FullscreenMode) -> Unit = {},
|
||||
val onSessionFullscreenMode: (FullscreenMode) -> Unit = {},
|
||||
val onLauncherFrost: (Boolean) -> Unit = {},
|
||||
val onFrostWallpaper: (Boolean) -> Unit = {},
|
||||
val onFrostCards: (Boolean) -> Unit = {},
|
||||
@@ -711,9 +714,12 @@ 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 (s.launcherFullscreen) WindowInsets.displayCutout else WindowInsets.systemBars)
|
||||
.windowInsetsPadding(if (launcherFullscreen) WindowInsets.displayCutout else WindowInsets.systemBars)
|
||||
.onFocusChanged { anyFocused = it.hasFocus },
|
||||
) {
|
||||
val bottomNavigation = maxHeight > maxWidth
|
||||
|
||||
@@ -85,6 +85,7 @@ 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
|
||||
@@ -230,7 +231,10 @@ internal fun SetupPanel(
|
||||
}
|
||||
val chipFocus = remember { List(tabs.size) { FocusRequester() } }
|
||||
var tabTurned by remember { mutableStateOf(false) }
|
||||
val pick: (Int) -> Unit = { i -> tab = i; tabTurned = true; searching = false; query = ""; if (i == DEVELOPER_TAB) logsRefresh++ }
|
||||
remember { SettingsSearchHistory.load(ctx) }
|
||||
var fromHistory by remember { mutableStateOf(false) }
|
||||
val keepSearch = { if (searching && SettingsIndex.search(ctx, query, frostRow).isNotEmpty()) SettingsSearchHistory.add(ctx, query) }
|
||||
val pick: (Int) -> Unit = { i -> keepSearch(); tab = i; tabTurned = true; searching = false; query = ""; if (i == DEVELOPER_TAB) logsRefresh++ }
|
||||
val inputModeManager = LocalInputModeManager.current
|
||||
LaunchedEffect(Unit) {
|
||||
while (true) {
|
||||
@@ -257,8 +261,9 @@ internal fun SetupPanel(
|
||||
) {
|
||||
val sectionBar: @Composable (Modifier) -> Unit = { m ->
|
||||
SettingsPillSearch(
|
||||
m, searching, query, { query = it },
|
||||
onOpen = { searching = true }, onClose = { searching = false; query = "" },
|
||||
m, searching, query, { query = it; fromHistory = false },
|
||||
onOpen = { searching = true }, onClose = { keepSearch(); searching = false; query = "" },
|
||||
keepOpen = SettingsSearchHistory.items.isNotEmpty(), onSearch = keepSearch,
|
||||
) { SheetChips(tabs, tab, chipFocus, onPick = pick) }
|
||||
}
|
||||
val portrait = androidx.compose.ui.platform.LocalConfiguration.current.orientation == android.content.res.Configuration.ORIENTATION_PORTRAIT
|
||||
@@ -267,9 +272,11 @@ internal fun SetupPanel(
|
||||
Row(Modifier.fillMaxWidth().padding(bottom = 10.dp)) { sectionBar(Modifier.weight(1f)) }
|
||||
} else PageHeader(stringResource(R.string.setup_title)) { sectionBar(Modifier.weight(1f)) }
|
||||
val listing = searching && query.isNotBlank()
|
||||
val fixed = tab == CONTROLLER_TAB && !listing
|
||||
val history = searching && query.isBlank() && SettingsSearchHistory.items.isNotEmpty()
|
||||
val fixed = tab == CONTROLLER_TAB && !listing && !history
|
||||
Column(modifier = Modifier.weight(1f).fillMaxWidth().then(if (fixed) Modifier else Modifier.verticalScroll(rememberScrollState())).padding(bottom = if (fixed) 0.dp else 24.dp)) {
|
||||
if (listing) SettingsSearchResults(query, frostRow) { section -> pick(section.ordinal) }
|
||||
if (listing) SettingsSearchResults(query, frostRow, focusFirst = fromHistory, onSearched = keepSearch) { section -> pick(section.ordinal) }
|
||||
else if (history) SettingsSearchHistoryList(onPick = { fromHistory = true; query = it }) { SettingsSearchHistory.clear(ctx) }
|
||||
else when (tab) {
|
||||
OVERVIEW_TAB -> {
|
||||
OnboardingCard(limitBlocks, a.onShowPhantomGate)
|
||||
@@ -586,11 +593,17 @@ internal fun SetupPanel(
|
||||
SessionPrefs.setOrientation(ctx, "desktop", value)
|
||||
},
|
||||
)
|
||||
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) }
|
||||
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, "page-swipe", stringResource(R.string.setup_page_swipe),
|
||||
stringResource(R.string.setup_page_swipe_hint), PageSwipe.on,
|
||||
@@ -678,89 +691,102 @@ internal fun SetupPanel(
|
||||
}
|
||||
}
|
||||
DEVELOPER_TAB -> {
|
||||
val devContext = LocalContext.current
|
||||
var manageLogs by rememberSaveable { mutableStateOf(false) }
|
||||
SettingsGroup(stringResource(R.string.dev_tools_title)) {
|
||||
ToggleRow(host, "developer-tools", stringResource(R.string.dev_tools_title), stringResource(R.string.dev_tools_hint), DeveloperTools.on) {
|
||||
DeveloperTools.set(devContext, it)
|
||||
ToggleRow(host, "developer-tools", stringResource(R.string.dev_tools_show), stringResource(R.string.dev_tools_hint), DeveloperTools.on, sideBySide = true) {
|
||||
DeveloperTools.set(ctx, 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) 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"),
|
||||
)
|
||||
if (DeveloperTools.on) ToggleRow(
|
||||
host, "preview-shortcuts", stringResource(R.string.dev_preview_shortcuts), stringResource(R.string.dev_preview_shortcuts_hint),
|
||||
DevPreview.shortcuts,
|
||||
) { DevPreview.setShortcuts(devContext, it) }
|
||||
}
|
||||
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) SettingsGroup(stringResource(R.string.dev_group_previews)) {
|
||||
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,
|
||||
)
|
||||
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) }
|
||||
}
|
||||
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() }
|
||||
if (DeveloperTools.on) ToggleRow(
|
||||
host, "enhanced-diagnostics", stringResource(R.string.setup_enhanced_diagnostics),
|
||||
stringResource(R.string.setup_enhanced_diagnostics_hint), s.enhancedDiagnosticsArmed,
|
||||
stringResource(R.string.setup_enhanced_diagnostics_hint), s.enhancedDiagnosticsArmed, sideBySide = true,
|
||||
) { 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,
|
||||
enabled = s.logsEnabled, sideBySide = true,
|
||||
) { a.onGameDebugLogs() }
|
||||
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)
|
||||
}
|
||||
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) },
|
||||
)
|
||||
}
|
||||
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() }
|
||||
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)
|
||||
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)
|
||||
}
|
||||
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))
|
||||
}
|
||||
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,
|
||||
)
|
||||
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)
|
||||
}
|
||||
}
|
||||
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 }
|
||||
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()
|
||||
}
|
||||
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)
|
||||
}
|
||||
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)
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.dev_group_reset)) {
|
||||
ActionRow(stringResource(R.string.setup_reset_settings), stringResource(R.string.setup_reset_settings_hint),
|
||||
stringResource(R.string.setup_reset_settings_button), a.onResetSettings)
|
||||
stringResource(R.string.setup_reset_settings_button), a.onResetSettings, sideBySide = true)
|
||||
}
|
||||
}
|
||||
GLASSES_TAB -> GlassesSetupPanel()
|
||||
|
||||
@@ -67,8 +67,18 @@ internal fun InputElementProperties(element: InputSurfaceElement, action: InputA
|
||||
}
|
||||
if (element.kind == InputElementKind.STICK) {
|
||||
val host = rememberMenuHost()
|
||||
ToggleRow(host, "element-floating", stringResource(R.string.input_floating_stick), null, element.floating) { onChange(element.copy(floating = it)) }
|
||||
ToggleRow(host, "element-hide-idle", stringResource(R.string.input_hide_idle), null, element.hideWhenIdle) { onChange(element.copy(hideWhenIdle = it)) }
|
||||
val adaptive = element.adaptiveCapture ?: element.adaptiveStick
|
||||
ToggleRow(host, "element-floating", stringResource(R.string.input_floating_stick), null, element.floating) {
|
||||
onChange(element.copy(floating = it, hideWhenIdle = element.hideStickAtRest, adaptiveCapture = adaptive))
|
||||
}
|
||||
if (element.floating) {
|
||||
ToggleRow(host, "element-adaptive-capture", stringResource(R.string.input_adaptive_capture), null, element.adaptiveStick) {
|
||||
onChange(element.copy(hideWhenIdle = element.hideStickAtRest, adaptiveCapture = it))
|
||||
}
|
||||
}
|
||||
ToggleRow(host, "element-hide-idle", stringResource(R.string.input_hide_idle), null, element.hideStickAtRest) {
|
||||
onChange(element.copy(hideWhenIdle = it, adaptiveCapture = adaptive))
|
||||
}
|
||||
}
|
||||
val host = rememberMenuHost()
|
||||
if ((element.kind == InputElementKind.BUTTON || element.kind == InputElementKind.TRIGGER) && element.icon == 0 && element.image.isEmpty() ||
|
||||
|
||||
@@ -236,11 +236,11 @@ class InputSurfaceView(
|
||||
super.dispatchDraw(canvas)
|
||||
}
|
||||
}
|
||||
canvas.clipChildren = customLayout.none { it.kind == InputElementKind.STICK && (classic(it) || adaptive(it)) }
|
||||
canvas.clipChildren = customLayout.none { it.kind == InputElementKind.STICK && (classic(it) || it.adaptiveStick) }
|
||||
for (element in customLayout) {
|
||||
val source = pad?.let { InputSurfaceSource(it, inputRole, element).also { s -> elementSources += s } }
|
||||
canvas.addView(when (element.kind) {
|
||||
InputElementKind.STICK -> StickView(context, element, source, element.floating, element.hideWhenIdle && pad != null)
|
||||
InputElementKind.STICK -> StickView(context, element, source, element.floating, element.hideStickAtRest && pad != null)
|
||||
InputElementKind.TRACKPAD -> TrackpadView(context, element.control == InputControl.RIGHT_PAD, captioned = element.showLabel,
|
||||
stock = element.id == "legacy:${element.control.id}", source = source)
|
||||
InputElementKind.DPAD -> DirectionPad(context, element, source)
|
||||
@@ -641,7 +641,7 @@ class InputSurfaceView(
|
||||
private val ring = Paint(Paint.ANTI_ALIAS_FLAG).apply { style = Paint.Style.STROKE }
|
||||
private val knob = Paint(Paint.ANTI_ALIAS_FLAG)
|
||||
|
||||
val adaptive get() = adaptive(element)
|
||||
val adaptive get() = element.adaptiveStick
|
||||
|
||||
fun reach() = min(width, height) * if (classic(element)) CLASSIC_REACH else PANEL_REACH
|
||||
|
||||
@@ -859,8 +859,6 @@ class InputSurfaceView(
|
||||
private val TEXT_DIM = Color.rgb(0x7A, 0x80, 0x8A)
|
||||
private val KNOB = Color.rgb(0x2A, 0x2D, 0x33)
|
||||
|
||||
private fun adaptive(element: InputSurfaceElement) = element.kind == InputElementKind.STICK && element.floating && element.hideWhenIdle
|
||||
|
||||
private fun classic(element: InputSurfaceElement) = (element.id == "legacy:${element.control.id}" || element.id == "builtin:keyboard") &&
|
||||
(element.buttonShape == InputButtonShape.CIRCLE || element.buttonShape == InputButtonShape.PILL)
|
||||
|
||||
|
||||
@@ -46,9 +46,7 @@ fun PerformancePage(
|
||||
fsyncFirst: Boolean,
|
||||
gamescopeRealtime: Boolean,
|
||||
gpuClockPin: Boolean,
|
||||
prootNoSeccomp: Boolean,
|
||||
prootFastPath: Boolean,
|
||||
nativeUserland: Boolean,
|
||||
nativeDesktopAvailable: Boolean,
|
||||
desktopAsUser: Boolean,
|
||||
cursorComposite: Boolean,
|
||||
guestHostname: String,
|
||||
@@ -65,9 +63,6 @@ fun PerformancePage(
|
||||
onFsyncFirst: (Boolean) -> Unit,
|
||||
onGamescopeRealtime: (Boolean) -> Unit,
|
||||
onGpuClockPin: (Boolean) -> Unit,
|
||||
onProotNoSeccomp: (Boolean) -> Unit,
|
||||
onProotFastPath: (Boolean) -> Unit,
|
||||
onNativeUserland: (Boolean) -> Unit,
|
||||
onDesktopAsUser: (Boolean) -> Unit,
|
||||
onCursorComposite: (Boolean) -> Unit,
|
||||
onGuestHostname: (String) -> Unit,
|
||||
@@ -152,26 +147,6 @@ fun PerformancePage(
|
||||
stringResource(R.string.perf_fastsync_hint),
|
||||
fastSync, onChange = onFastSync,
|
||||
)
|
||||
ToggleRow(
|
||||
host, "seccomp", stringResource(R.string.perf_seccomp),
|
||||
stringResource(R.string.perf_seccomp_hint),
|
||||
prootNoSeccomp, onChange = onProotNoSeccomp,
|
||||
)
|
||||
ToggleRow(
|
||||
host, "fastpath", stringResource(R.string.perf_fastpath),
|
||||
when {
|
||||
nativeUserland -> stringResource(R.string.perf_fastpath_needs_proot)
|
||||
prootNoSeccomp -> stringResource(R.string.perf_fastpath_needs_seccomp)
|
||||
else -> stringResource(R.string.perf_fastpath_hint)
|
||||
},
|
||||
prootFastPath && !prootNoSeccomp && !nativeUserland, enabled = !prootNoSeccomp && !nativeUserland,
|
||||
onChange = onProotFastPath,
|
||||
)
|
||||
ToggleRow(
|
||||
host, "nativeuserland", stringResource(R.string.perf_native_userland),
|
||||
stringResource(R.string.perf_native_userland_hint),
|
||||
nativeUserland, onChange = onNativeUserland,
|
||||
)
|
||||
ToggleRow(
|
||||
host, "cursorcomposite", stringResource(R.string.perf_cursor_composite),
|
||||
stringResource(R.string.perf_cursor_composite_hint),
|
||||
@@ -198,8 +173,8 @@ fun PerformancePage(
|
||||
}
|
||||
ToggleRow(
|
||||
host, "desktopasuser", stringResource(R.string.perf_desktop_as_user),
|
||||
stringResource(if (nativeUserland) R.string.perf_desktop_as_user_hint else R.string.perf_desktop_as_user_needs_native),
|
||||
desktopAsUser && nativeUserland, enabled = nativeUserland,
|
||||
stringResource(R.string.perf_desktop_as_user_hint),
|
||||
desktopAsUser && nativeDesktopAvailable, enabled = nativeDesktopAvailable,
|
||||
onChange = onDesktopAsUser,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -177,6 +177,7 @@ 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
|
||||
@@ -406,6 +407,8 @@ 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,
|
||||
@@ -1009,6 +1012,10 @@ 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)
|
||||
|
||||
@@ -85,9 +85,6 @@ internal object SettingsIndex {
|
||||
s(SettingsSection.PERFORMANCE, R.string.perf_esync, "esync", "sync", "wine"),
|
||||
s(SettingsSection.PERFORMANCE, R.string.perf_fsync, "fsync", "sync", "wine"),
|
||||
s(SettingsSection.PERFORMANCE, R.string.perf_fastsync, "ntsync", "sync", "wine"),
|
||||
s(SettingsSection.PERFORMANCE, R.string.perf_seccomp, "proot"),
|
||||
s(SettingsSection.PERFORMANCE, R.string.perf_fastpath, "proot"),
|
||||
s(SettingsSection.PERFORMANCE, R.string.perf_native_userland, "proot"),
|
||||
s(SettingsSection.PERFORMANCE, R.string.perf_cursor_composite, "mouse", "cursor"),
|
||||
s(SettingsSection.PERFORMANCE, R.string.perf_hostname, "name"),
|
||||
s(SettingsSection.PERFORMANCE, R.string.perf_desktop_as_user, "root", "user", "sudo", "fakeroot"),
|
||||
@@ -116,7 +113,8 @@ 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_fullscreen),
|
||||
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_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"),
|
||||
@@ -130,7 +128,8 @@ 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_title, "agent", "ai", "claude", "codex"),
|
||||
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),
|
||||
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"),
|
||||
|
||||
@@ -16,6 +16,10 @@ import androidx.compose.runtime.setValue
|
||||
import androidx.compose.runtime.withFrameNanos
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.drawBehind
|
||||
import androidx.compose.ui.geometry.Offset
|
||||
import androidx.compose.ui.geometry.Rect
|
||||
import androidx.compose.ui.layout.LayoutCoordinates
|
||||
import androidx.compose.ui.layout.onPlaced
|
||||
|
||||
/** The row a settings search result opens, so the page it lands on can scroll to it and flash it. */
|
||||
internal object SettingsJump {
|
||||
@@ -31,12 +35,32 @@ private const val JUMP_WINDOW_MS = 5_000L
|
||||
/** False in the search results, whose rows carry the same labels as the rows they open. */
|
||||
internal val LocalSearchTargets = staticCompositionLocalOf { true }
|
||||
|
||||
/** How far a page has to be scrolled to show a row in its middle, or as near to it as the page's ends allow. */
|
||||
internal fun centeredScroll(rowTop: Float, rowHeight: Float, page: Float, content: Float): Float =
|
||||
(rowTop + rowHeight / 2f - page / 2f).coerceIn(0f, (content - page).coerceAtLeast(0f))
|
||||
|
||||
/** The part of the page to show around a row to have it in the middle, relative to the row. Null when nothing around it scrolls. */
|
||||
private fun pageAround(row: LayoutCoordinates): Rect? {
|
||||
var content = row
|
||||
while (true) {
|
||||
val page = content.parentCoordinates ?: return null
|
||||
if (content.size.height > page.size.height) {
|
||||
val top = content.localPositionOf(row, Offset.Zero).y
|
||||
val height = page.size.height.toFloat()
|
||||
val from = centeredScroll(top, row.size.height.toFloat(), height, content.size.height.toFloat()) - top
|
||||
return Rect(0f, from, row.size.width.toFloat(), from + height)
|
||||
}
|
||||
content = page
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(androidx.compose.foundation.ExperimentalFoundationApi::class)
|
||||
@Composable
|
||||
internal fun Modifier.searchTarget(label: String): Modifier {
|
||||
val pal = LocalPalette.current
|
||||
val flash = remember { Animatable(0f) }
|
||||
val reveal = remember { BringIntoViewRequester() }
|
||||
val row = remember { arrayOfNulls<LayoutCoordinates>(1) }
|
||||
var claimed by remember { mutableStateOf<SettingsJump.Target?>(null) }
|
||||
val target = SettingsJump.target.takeIf { LocalSearchTargets.current }
|
||||
if (target != null && target.label == label) SideEffect {
|
||||
@@ -48,7 +72,7 @@ internal fun Modifier.searchTarget(label: String): Modifier {
|
||||
claimed?.let { mine ->
|
||||
LaunchedEffect(mine) {
|
||||
withFrameNanos { }
|
||||
reveal.bringIntoView()
|
||||
reveal.bringIntoView(row[0]?.takeIf { it.isAttached }?.let(::pageAround))
|
||||
repeat(2) {
|
||||
flash.animateTo(1f, tween(220))
|
||||
flash.animateTo(0f, tween(420))
|
||||
@@ -56,7 +80,7 @@ internal fun Modifier.searchTarget(label: String): Modifier {
|
||||
claimed = null
|
||||
}
|
||||
}
|
||||
return bringIntoViewRequester(reveal).drawBehind {
|
||||
return bringIntoViewRequester(reveal).onPlaced { row[0] = it }.drawBehind {
|
||||
if (flash.value > 0f) drawRect(pal.signal.copy(alpha = 0.28f * flash.value))
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ import androidx.compose.ui.semantics.clearAndSetSemantics
|
||||
@Composable
|
||||
internal fun SettingsPillSearch(
|
||||
modifier: Modifier, searching: Boolean, query: String, onQuery: (String) -> Unit,
|
||||
onOpen: () -> Unit, onClose: () -> Unit, pills: @Composable () -> Unit,
|
||||
onOpen: () -> Unit, onClose: () -> Unit, keepOpen: Boolean = false, onSearch: () -> Unit = {}, pills: @Composable () -> Unit,
|
||||
) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val open by animateFloatAsState(if (searching) 1f else 0f, Motion.sp(0.75f, 420f), label = "settingsSearch")
|
||||
@@ -53,10 +53,11 @@ internal fun SettingsPillSearch(
|
||||
var fieldFocused by remember { mutableStateOf(false) }
|
||||
CancelPendingFocus(focusOnOpen, focusTap, fieldFocused) {
|
||||
focusOnOpen = false
|
||||
if (query.isEmpty()) onClose()
|
||||
if (query.isEmpty() && !keepOpen) onClose()
|
||||
}
|
||||
val close = { toIcon = true; focusOnOpen = false; onClose() }
|
||||
BackHandler(enabled = searching) { close() }
|
||||
LaunchedEffect(keepOpen) { if (!keepOpen && searching && !fieldFocused && !focusOnOpen && query.isEmpty()) close() }
|
||||
LaunchedEffect(toIcon, searching, open <= 0.01f) {
|
||||
if (searching) toIcon = false
|
||||
else if (toIcon && open <= 0.01f) { focusSoon { icon }; toIcon = false }
|
||||
@@ -80,10 +81,13 @@ internal fun SettingsPillSearch(
|
||||
AdbTextField(
|
||||
value = query, onValueChange = onQuery, label = "", keyboardType = KeyboardType.Text, imeAction = ImeAction.Search,
|
||||
placeholder = stringResource(R.string.settings_search), compact = true, showLabel = false, focusOnShow = focusOnOpen, focusAtTap = focusTap,
|
||||
clearFocus = !searching,
|
||||
clearFocus = !searching, onDone = onSearch,
|
||||
onFocusChange = { focused ->
|
||||
fieldFocused = focused
|
||||
if (!focused && query.isEmpty() && searching) { focusOnOpen = false; onClose() }
|
||||
if (!focused && query.isEmpty() && searching) {
|
||||
focusOnOpen = false
|
||||
if (!keepOpen) onClose()
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
@@ -96,13 +100,19 @@ internal fun SettingsPillSearch(
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun SettingsSearchResults(query: String, frost: Boolean, onOpen: (SettingsSection) -> Unit) {
|
||||
internal fun SettingsSearchResults(query: String, frost: Boolean, focusFirst: Boolean = false, onSearched: () -> Unit = {}, onOpen: (SettingsSection) -> Unit) {
|
||||
val ctx = LocalContext.current
|
||||
val found = remember(query, frost) { SettingsIndex.search(ctx, query, frost) }
|
||||
if (found.isEmpty()) {
|
||||
Note(stringResource(R.string.settings_search_none, query.trim()))
|
||||
return
|
||||
}
|
||||
val first = remember { FocusRequester() }
|
||||
val firstToOpen = found.groupBy { it.place }.values.flatten().firstOrNull { it.section != null || it.tab != null }
|
||||
val inputMode = androidx.compose.ui.platform.LocalInputModeManager.current
|
||||
LaunchedEffect(Unit) {
|
||||
if (focusFirst && firstToOpen != null && inputMode.inputMode == androidx.compose.ui.input.InputMode.Keyboard) focusSoon { first }
|
||||
}
|
||||
androidx.compose.runtime.CompositionLocalProvider(LocalSearchTargets provides false) { Column {
|
||||
found.groupBy { it.place }.forEach { (place, entries) ->
|
||||
SettingsGroup(stringResource(place.title)) {
|
||||
@@ -111,10 +121,12 @@ internal fun SettingsSearchResults(query: String, frost: Boolean, onOpen: (Setti
|
||||
val title = stringResource(entry.title)
|
||||
val section = entry.section
|
||||
val tab = entry.tab
|
||||
val button = if (entry === firstToOpen) Modifier.focusRequester(first) else Modifier
|
||||
if (section != null) {
|
||||
ActionRow(title, within, stringResource(R.string.store_open), onClick = { SettingsJump.to(title); onOpen(section) })
|
||||
ActionRow(title, within, stringResource(R.string.store_open), modifier = button, onClick = { onSearched(); SettingsJump.to(title); onOpen(section) })
|
||||
} else if (tab != null) {
|
||||
ActionRow(title, within, stringResource(R.string.store_open), onClick = {
|
||||
ActionRow(title, within, stringResource(R.string.store_open), modifier = button, onClick = {
|
||||
onSearched()
|
||||
SettingsJump.to(title)
|
||||
if (tab == NavTabs.MORE) MoreTabs.editing = true
|
||||
if (tab == "downloads") DownloadsNav.showSettings = true
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.content.Context
|
||||
import androidx.compose.foundation.LocalIndication
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.hoverable
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
||||
import androidx.compose.foundation.layout.FlowRow
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.heightIn
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.widthIn
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.Delete
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
|
||||
/** What was searched for in Settings, newest first. */
|
||||
internal object SettingsSearchHistory {
|
||||
const val MAX = 8
|
||||
|
||||
var items by mutableStateOf<List<String>>(emptyList())
|
||||
private set
|
||||
|
||||
fun load(context: Context) { items = SessionPrefs.settingsSearches(context) }
|
||||
|
||||
fun add(context: Context, query: String) {
|
||||
val next = withSearch(items, query)
|
||||
if (next == items) return
|
||||
items = next
|
||||
SessionPrefs.setSettingsSearches(context, next)
|
||||
}
|
||||
|
||||
fun clear(context: Context) {
|
||||
items = emptyList()
|
||||
SessionPrefs.setSettingsSearches(context, emptyList())
|
||||
}
|
||||
|
||||
fun withSearch(items: List<String>, query: String): List<String> {
|
||||
val text = query.trim().replace(Regex("\\s+"), " ")
|
||||
if (text.isEmpty()) return items
|
||||
return (listOf(text) + items.filterNot { it.equals(text, ignoreCase = true) }).take(MAX)
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalLayoutApi::class)
|
||||
@Composable
|
||||
internal fun SettingsSearchHistoryList(onPick: (String) -> Unit, onClear: () -> Unit) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
Column(Modifier.fillMaxWidth()) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth().padding(top = 12.dp, bottom = 8.dp)) {
|
||||
Text(
|
||||
stringResource(R.string.settings_search_history), fontSize = 16.sp, fontWeight = FontWeight.SemiBold, color = colors.onSurfaceVariant,
|
||||
modifier = Modifier.weight(1f).padding(start = 4.dp),
|
||||
)
|
||||
SmallIconButton(Icons.Outlined.Delete, stringResource(R.string.settings_search_history_clear), tint = colors.onSurfaceVariant, onClick = onClear)
|
||||
}
|
||||
FlowRow(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
SettingsSearchHistory.items.forEach { HistoryChip(it) { onPick(it) } }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun HistoryChip(text: String, onClick: () -> Unit) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
val src = remember { MutableInteractionSource() }
|
||||
val hot = rememberHot(src)
|
||||
Box(
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = Modifier.heightIn(min = 40.dp).widthIn(min = 56.dp, max = 260.dp).clip(CircleShape)
|
||||
.background(colors.surface).glideBorder(hot, CircleShape, pal.signal, pal.line)
|
||||
.hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, role = Role.Button, onClick = onClick)
|
||||
.controllerConfirm(onClick = onClick)
|
||||
.padding(horizontal = 16.dp, vertical = 8.dp),
|
||||
) { Text(text, fontSize = 14.sp, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis) }
|
||||
}
|
||||
@@ -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, control: @Composable () -> Unit) {
|
||||
fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hintLines: Int? = null, stacked: Boolean = false, tightControlSpacing: Boolean = false, sideBySide: 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) Column(
|
||||
if (compact && !stacked && !sideBySide) 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) Column(
|
||||
} else if (stacked || (LocalNarrowPane.current && !sideBySide)) 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, onChange: (Boolean) -> Unit) =
|
||||
SettingsRow(label, hint) {
|
||||
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) {
|
||||
ToggleSwitch(checked, enabled, label, chipModifier.testTag("setting-$key")) { host.open = null; onChange(it) }
|
||||
}
|
||||
|
||||
@@ -774,8 +774,10 @@ fun MultiRow(
|
||||
}
|
||||
|
||||
@Composable
|
||||
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) }
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
||||
@@ -14,6 +14,7 @@ import androidx.compose.animation.core.infiniteRepeatable
|
||||
import androidx.compose.animation.core.rememberInfiniteTransition
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.derivedStateOf
|
||||
import androidx.compose.runtime.key
|
||||
import androidx.compose.runtime.SideEffect
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
@@ -88,7 +89,7 @@ object Themes {
|
||||
var rgbSpeed by mutableStateOf(DEFAULT_RGB_SPEED)
|
||||
private set
|
||||
|
||||
var rgbHue by mutableStateOf(0f)
|
||||
@Volatile var rgbHue = 0f
|
||||
private set
|
||||
|
||||
fun moveRgbHue(hue: Float) {
|
||||
@@ -237,8 +238,36 @@ fun DroidDeckTheme(theme: String? = null, appScale: Int = AppUiPrefs.DEFAULT_SCA
|
||||
val context = LocalContext.current
|
||||
remember(context) { Themes.loadGradient(context) }
|
||||
val id = theme ?: SessionPrefs.theme(context)
|
||||
if (id == Themes.INNER_GAMER) InnerGamerHue(Themes.rgbSpeed)
|
||||
val solid = Themes.byId(id)
|
||||
val solid = if (id == Themes.INNER_GAMER) {
|
||||
rememberInnerGamerPalette(Themes.rgbSpeed)
|
||||
} else {
|
||||
Themes.byId(id)
|
||||
}
|
||||
DroidDeckThemePalette(solid, appScale, frost, content)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun rememberInnerGamerPalette(speed: Int): Palette = key(speed) {
|
||||
val start = remember { Themes.rgbHue }
|
||||
val animatedHue by rememberInfiniteTransition(label = "innerGamer").animateFloat(
|
||||
start, start + 360f,
|
||||
infiniteRepeatable(
|
||||
tween(Themes.rgbCycleMillis(speed).coerceAtLeast(1), easing = LinearEasing),
|
||||
RepeatMode.Restart,
|
||||
),
|
||||
label = "hue",
|
||||
)
|
||||
val steppedHue by remember {
|
||||
derivedStateOf {
|
||||
((animatedHue % 360f) / Themes.RGB_HUE_STEP).toInt() * Themes.RGB_HUE_STEP
|
||||
}
|
||||
}
|
||||
SideEffect { Themes.moveRgbHue(steppedHue) }
|
||||
Themes.innerGamer(steppedHue)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun DroidDeckThemePalette(solid: Palette, appScale: Int, frost: FrostChoice?, content: @Composable () -> Unit) {
|
||||
val look = frost?.let { frostLook(solid, it) }
|
||||
val p = if (look == null) solid else solid.frosted(look)
|
||||
val baseDensity = LocalDensity.current
|
||||
@@ -286,17 +315,3 @@ private val ContentDirected = Typography().run {
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun InnerGamerHue(speed: Int) {
|
||||
key(speed) { InnerGamerCycle(speed) }
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun InnerGamerCycle(speed: Int) {
|
||||
val start = remember { Themes.rgbHue }
|
||||
val hue by rememberInfiniteTransition(label = "innerGamer").animateFloat(
|
||||
start, start + 360f, infiniteRepeatable(tween(Themes.rgbCycleMillis(speed).coerceAtLeast(1), easing = LinearEasing), RepeatMode.Restart), label = "hue",
|
||||
)
|
||||
val stepped = ((hue % 360f) / Themes.RGB_HUE_STEP).toInt() * Themes.RGB_HUE_STEP
|
||||
SideEffect { Themes.moveRgbHue(stepped) }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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>
|
||||
@@ -891,7 +891,6 @@
|
||||
<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>
|
||||
@@ -2419,7 +2418,6 @@
|
||||
<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>
|
||||
@@ -4358,4 +4356,6 @@
|
||||
<string name="glasses_show_shortcut_hint">إظهار زر النظارات الذكية العائم فوق اللعبة.</string>
|
||||
<string name="display_filter_game_profile">استخدام ملف تعريف %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">استخدام الملف التعريفي الافتراضي: %1$s</string>
|
||||
<string name="settings_search_history">سجل البحث</string>
|
||||
<string name="settings_search_history_clear">مسح سجل البحث</string>
|
||||
</resources>
|
||||
@@ -909,7 +909,6 @@
|
||||
<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>
|
||||
@@ -2411,7 +2410,6 @@
|
||||
<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>
|
||||
@@ -4236,4 +4234,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Mostrar el botón flotante de Smart Glasses sobre el juego.</string>
|
||||
<string name="display_filter_game_profile">Usando el perfil %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Usando el perfil predeterminado: %1$s</string>
|
||||
<string name="settings_search_history">Historial de búsqueda</string>
|
||||
<string name="settings_search_history_clear">Borrar historial de búsqueda</string>
|
||||
</resources>
|
||||
@@ -879,7 +879,6 @@
|
||||
<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>
|
||||
@@ -2315,7 +2314,6 @@
|
||||
<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>
|
||||
@@ -4198,4 +4196,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Показва плаващия бутон за Smart Glasses върху играта.</string>
|
||||
<string name="display_filter_game_profile">Използва се профил %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Използва се профилът по подразбиране: %1$s</string>
|
||||
<string name="settings_search_history">История на търсенето</string>
|
||||
<string name="settings_search_history_clear">Изчистване на историята на търсенето</string>
|
||||
</resources>
|
||||
@@ -885,7 +885,6 @@
|
||||
<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>
|
||||
@@ -2367,7 +2366,6 @@
|
||||
<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>
|
||||
@@ -4278,4 +4276,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Zobrazit plovoucí tlačítko Smart Glasses nad hrou.</string>
|
||||
<string name="display_filter_game_profile">Používá se profil %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Používá se výchozí profil: %1$s</string>
|
||||
<string name="settings_search_history">Historie hledání</string>
|
||||
<string name="settings_search_history_clear">Vymazat historii hledání</string>
|
||||
</resources>
|
||||
@@ -879,7 +879,6 @@
|
||||
<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>
|
||||
@@ -2315,7 +2314,6 @@
|
||||
<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>
|
||||
@@ -4198,4 +4196,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Vis den flydende Smart Glasses-knap oven på spillet.</string>
|
||||
<string name="display_filter_game_profile">Bruger profilen %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Bruger standardprofilen: %1$s</string>
|
||||
<string name="settings_search_history">Søgehistorik</string>
|
||||
<string name="settings_search_history_clear">Ryd søgehistorik</string>
|
||||
</resources>
|
||||
@@ -879,7 +879,6 @@
|
||||
<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>
|
||||
@@ -2307,7 +2306,6 @@
|
||||
<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>
|
||||
@@ -4198,4 +4196,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Die schwebende Smart-Glasses-Schaltfläche über dem Spiel anzeigen.</string>
|
||||
<string name="display_filter_game_profile">Profil %1$s wird verwendet: %2$s</string>
|
||||
<string name="display_filter_default_profile">Standardprofil wird verwendet: %1$s</string>
|
||||
<string name="settings_search_history">Suchverlauf</string>
|
||||
<string name="settings_search_history_clear">Suchverlauf löschen</string>
|
||||
</resources>
|
||||
@@ -879,7 +879,6 @@
|
||||
<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>
|
||||
@@ -2315,7 +2314,6 @@
|
||||
<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>
|
||||
@@ -4198,4 +4196,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Εμφάνιση του αιωρούμενου κουμπιού Smart Glasses πάνω από το παιχνίδι.</string>
|
||||
<string name="display_filter_game_profile">Χρήση προφίλ %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Χρήση προεπιλεγμένου προφίλ: %1$s</string>
|
||||
<string name="settings_search_history">Ιστορικό αναζήτησης</string>
|
||||
<string name="settings_search_history_clear">Εκκαθάριση ιστορικού αναζήτησης</string>
|
||||
</resources>
|
||||
@@ -882,7 +882,6 @@
|
||||
<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>
|
||||
@@ -2341,7 +2340,6 @@
|
||||
<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>
|
||||
@@ -4238,4 +4236,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Mostrar el botón flotante de Smart Glasses sobre el juego.</string>
|
||||
<string name="display_filter_game_profile">Usando el perfil %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Usando el perfil predeterminado: %1$s</string>
|
||||
<string name="settings_search_history">Historial de búsqueda</string>
|
||||
<string name="settings_search_history_clear">Borrar historial de búsqueda</string>
|
||||
</resources>
|
||||
@@ -879,7 +879,6 @@
|
||||
<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>
|
||||
@@ -2315,7 +2314,6 @@
|
||||
<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>
|
||||
@@ -4198,4 +4196,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Näytä pelin päällä kelluva Smart Glasses -painike.</string>
|
||||
<string name="display_filter_game_profile">Käytössä profiili %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Käytössä oletusprofiili: %1$s</string>
|
||||
<string name="settings_search_history">Hakuhistoria</string>
|
||||
<string name="settings_search_history_clear">Tyhjennä hakuhistoria</string>
|
||||
</resources>
|
||||
@@ -882,7 +882,6 @@
|
||||
<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>
|
||||
@@ -2340,7 +2339,6 @@
|
||||
<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>
|
||||
@@ -4237,4 +4235,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Afficher le bouton flottant Smart Glasses par-dessus le jeu.</string>
|
||||
<string name="display_filter_game_profile">Profil %1$s utilisé : %2$s</string>
|
||||
<string name="display_filter_default_profile">Profil par défaut utilisé : %1$s</string>
|
||||
<string name="settings_search_history">Historique de recherche</string>
|
||||
<string name="settings_search_history_clear">Effacer l\'historique de recherche</string>
|
||||
</resources>
|
||||
@@ -879,7 +879,6 @@
|
||||
<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>
|
||||
@@ -2315,7 +2314,6 @@
|
||||
<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>
|
||||
@@ -4198,4 +4196,6 @@
|
||||
<string name="glasses_show_shortcut_hint">गेम के ऊपर तैरता हुआ Smart Glasses बटन दिखाएँ।</string>
|
||||
<string name="display_filter_game_profile">%1$s प्रोफ़ाइल का उपयोग: %2$s</string>
|
||||
<string name="display_filter_default_profile">डिफ़ॉल्ट प्रोफ़ाइल का उपयोग: %1$s</string>
|
||||
<string name="settings_search_history">खोज इतिहास</string>
|
||||
<string name="settings_search_history_clear">खोज इतिहास मिटाएं</string>
|
||||
</resources>
|
||||
@@ -879,7 +879,6 @@
|
||||
<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>
|
||||
@@ -2315,7 +2314,6 @@
|
||||
<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>
|
||||
@@ -4198,4 +4196,6 @@
|
||||
<string name="glasses_show_shortcut_hint">A játék fölött lebegő Smart Glasses gomb megjelenítése.</string>
|
||||
<string name="display_filter_game_profile">Használt profil: %1$s – %2$s</string>
|
||||
<string name="display_filter_default_profile">Alapértelmezett profil használata: %1$s</string>
|
||||
<string name="settings_search_history">Keresési előzmények</string>
|
||||
<string name="settings_search_history_clear">Keresési előzmények törlése</string>
|
||||
</resources>
|
||||
@@ -876,7 +876,6 @@
|
||||
<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>
|
||||
@@ -2290,7 +2289,6 @@
|
||||
<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>
|
||||
@@ -4168,4 +4166,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Tampilkan tombol Smart Glasses mengambang di atas game.</string>
|
||||
<string name="display_filter_game_profile">Menggunakan profil %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Menggunakan profil default: %1$s</string>
|
||||
<string name="settings_search_history">Riwayat pencarian</string>
|
||||
<string name="settings_search_history_clear">Hapus riwayat pencarian</string>
|
||||
</resources>
|
||||
@@ -882,7 +882,6 @@
|
||||
<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>
|
||||
@@ -2332,7 +2331,6 @@
|
||||
<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>
|
||||
@@ -4237,4 +4235,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Mostra il pulsante mobile Smart Glasses sopra il gioco.</string>
|
||||
<string name="display_filter_game_profile">Profilo %1$s in uso: %2$s</string>
|
||||
<string name="display_filter_default_profile">Profilo predefinito in uso: %1$s</string>
|
||||
<string name="settings_search_history">Cronologia ricerche</string>
|
||||
<string name="settings_search_history_clear">Cancella cronologia ricerche</string>
|
||||
</resources>
|
||||
@@ -876,7 +876,6 @@
|
||||
<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>
|
||||
@@ -2290,7 +2289,6 @@
|
||||
<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>
|
||||
@@ -4168,4 +4166,6 @@
|
||||
<string name="glasses_show_shortcut_hint">ゲーム画面上に Smart Glasses のフローティングボタンを表示します。</string>
|
||||
<string name="display_filter_game_profile">%1$s プロファイルを使用中: %2$s</string>
|
||||
<string name="display_filter_default_profile">デフォルトプロファイルを使用中: %1$s</string>
|
||||
<string name="settings_search_history">検索履歴</string>
|
||||
<string name="settings_search_history_clear">検索履歴を消去</string>
|
||||
</resources>
|
||||
@@ -876,7 +876,6 @@
|
||||
<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>
|
||||
@@ -2290,7 +2289,6 @@
|
||||
<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>
|
||||
@@ -4168,4 +4166,6 @@
|
||||
<string name="glasses_show_shortcut_hint">게임 위에 떠 있는 Smart Glasses 버튼을 표시합니다.</string>
|
||||
<string name="display_filter_game_profile">%1$s 프로필 사용 중: %2$s</string>
|
||||
<string name="display_filter_default_profile">기본 프로필 사용 중: %1$s</string>
|
||||
<string name="settings_search_history">검색 기록</string>
|
||||
<string name="settings_search_history_clear">검색 기록 지우기</string>
|
||||
</resources>
|
||||
@@ -876,7 +876,6 @@
|
||||
<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>
|
||||
@@ -2290,7 +2289,6 @@
|
||||
<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>
|
||||
@@ -4168,4 +4166,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Tunjukkan butang Smart Glasses terapung di atas permainan.</string>
|
||||
<string name="display_filter_game_profile">Menggunakan profil %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Menggunakan profil lalai: %1$s</string>
|
||||
<string name="settings_search_history">Sejarah carian</string>
|
||||
<string name="settings_search_history_clear">Kosongkan sejarah carian</string>
|
||||
</resources>
|
||||
@@ -879,7 +879,6 @@
|
||||
<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>
|
||||
@@ -2315,7 +2314,6 @@
|
||||
<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>
|
||||
@@ -4198,4 +4196,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Vis den flytende Smart Glasses-knappen over spillet.</string>
|
||||
<string name="display_filter_game_profile">Bruker profilen %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Bruker standardprofilen: %1$s</string>
|
||||
<string name="settings_search_history">Søkelogg</string>
|
||||
<string name="settings_search_history_clear">Tøm søkeloggen</string>
|
||||
</resources>
|
||||
@@ -879,7 +879,6 @@
|
||||
<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>
|
||||
@@ -2315,7 +2314,6 @@
|
||||
<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>
|
||||
@@ -4198,4 +4196,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Toon de zwevende Smart Glasses-knop boven het spel.</string>
|
||||
<string name="display_filter_game_profile">Profiel %1$s in gebruik: %2$s</string>
|
||||
<string name="display_filter_default_profile">Standaardprofiel in gebruik: %1$s</string>
|
||||
<string name="settings_search_history">Zoekgeschiedenis</string>
|
||||
<string name="settings_search_history_clear">Zoekgeschiedenis wissen</string>
|
||||
</resources>
|
||||
@@ -885,7 +885,6 @@
|
||||
<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>
|
||||
@@ -2367,7 +2366,6 @@
|
||||
<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>
|
||||
@@ -4278,4 +4276,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Pokaż pływający przycisk Smart Glasses nad grą.</string>
|
||||
<string name="display_filter_game_profile">Używany profil %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Używany profil domyślny: %1$s</string>
|
||||
<string name="settings_search_history">Historia wyszukiwania</string>
|
||||
<string name="settings_search_history_clear">Wyczyść historię wyszukiwania</string>
|
||||
</resources>
|
||||
@@ -882,7 +882,6 @@
|
||||
<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>
|
||||
@@ -2347,7 +2346,6 @@
|
||||
<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>
|
||||
@@ -4237,4 +4235,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Mostrar o botão flutuante do Smart Glasses sobre o jogo.</string>
|
||||
<string name="display_filter_game_profile">Perfil %1$s em utilização: %2$s</string>
|
||||
<string name="display_filter_default_profile">Perfil predefinido em utilização: %1$s</string>
|
||||
<string name="settings_search_history">Histórico de pesquisa</string>
|
||||
<string name="settings_search_history_clear">Limpar histórico de pesquisa</string>
|
||||
</resources>
|
||||
@@ -889,7 +889,6 @@
|
||||
<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>
|
||||
@@ -2355,7 +2354,6 @@
|
||||
<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>
|
||||
@@ -4245,4 +4243,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Mostrar o botão flutuante do Smart Glasses sobre o jogo.</string>
|
||||
<string name="display_filter_game_profile">Perfil %1$s em uso: %2$s</string>
|
||||
<string name="display_filter_default_profile">Perfil predefinido em uso: %1$s</string>
|
||||
<string name="settings_search_history">Histórico de pesquisa</string>
|
||||
<string name="settings_search_history_clear">Limpar histórico de pesquisa</string>
|
||||
</resources>
|
||||
@@ -882,7 +882,6 @@
|
||||
<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>
|
||||
@@ -2341,7 +2340,6 @@
|
||||
<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>
|
||||
@@ -4238,4 +4236,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Afișează butonul plutitor Smart Glasses peste joc.</string>
|
||||
<string name="display_filter_game_profile">Se folosește profilul %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Se folosește profilul implicit: %1$s</string>
|
||||
<string name="settings_search_history">Istoricul căutărilor</string>
|
||||
<string name="settings_search_history_clear">Șterge istoricul căutărilor</string>
|
||||
</resources>
|
||||
@@ -885,7 +885,6 @@
|
||||
<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>
|
||||
@@ -2368,7 +2367,6 @@
|
||||
<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>
|
||||
@@ -4279,4 +4277,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Показывать плавающую кнопку Smart Glasses поверх игры.</string>
|
||||
<string name="display_filter_game_profile">Используется профиль %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Используется профиль по умолчанию: %1$s</string>
|
||||
<string name="settings_search_history">История поиска</string>
|
||||
<string name="settings_search_history_clear">Очистить историю поиска</string>
|
||||
</resources>
|
||||
@@ -879,7 +879,6 @@
|
||||
<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>
|
||||
@@ -2315,7 +2314,6 @@
|
||||
<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>
|
||||
@@ -4198,4 +4196,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Visa den flytande Smart Glasses-knappen ovanpå spelet.</string>
|
||||
<string name="display_filter_game_profile">Använder profilen %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Använder standardprofilen: %1$s</string>
|
||||
<string name="settings_search_history">Sökhistorik</string>
|
||||
<string name="settings_search_history_clear">Rensa sökhistorik</string>
|
||||
</resources>
|
||||
@@ -876,7 +876,6 @@
|
||||
<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>
|
||||
@@ -2290,7 +2289,6 @@
|
||||
<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>
|
||||
@@ -4168,4 +4166,6 @@
|
||||
<string name="glasses_show_shortcut_hint">แสดงปุ่ม Smart Glasses แบบลอยทับบนเกม</string>
|
||||
<string name="display_filter_game_profile">ใช้โปรไฟล์ %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">ใช้โปรไฟล์เริ่มต้น: %1$s</string>
|
||||
<string name="settings_search_history">ประวัติการค้นหา</string>
|
||||
<string name="settings_search_history_clear">ล้างประวัติการค้นหา</string>
|
||||
</resources>
|
||||
@@ -879,7 +879,6 @@
|
||||
<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>
|
||||
@@ -2307,7 +2306,6 @@
|
||||
<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>
|
||||
@@ -4198,4 +4196,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Oyun üzerinde yüzen Smart Glasses düğmesini göster.</string>
|
||||
<string name="display_filter_game_profile">%1$s profili kullanılıyor: %2$s</string>
|
||||
<string name="display_filter_default_profile">Varsayılan profil kullanılıyor: %1$s</string>
|
||||
<string name="settings_search_history">Arama geçmişi</string>
|
||||
<string name="settings_search_history_clear">Arama geçmişini temizle</string>
|
||||
</resources>
|
||||
@@ -885,7 +885,6 @@
|
||||
<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,7 +2366,6 @@
|
||||
<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>
|
||||
@@ -4278,4 +4276,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Показувати плаваючу кнопку Smart Glasses поверх гри.</string>
|
||||
<string name="display_filter_game_profile">Використовується профіль %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Використовується профіль за замовчуванням: %1$s</string>
|
||||
<string name="settings_search_history">Історія пошуку</string>
|
||||
<string name="settings_search_history_clear">Очистити історію пошуку</string>
|
||||
</resources>
|
||||
@@ -876,7 +876,6 @@
|
||||
<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>
|
||||
@@ -2290,7 +2289,6 @@
|
||||
<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>
|
||||
@@ -4168,4 +4166,6 @@
|
||||
<string name="glasses_show_shortcut_hint">Hiển thị nút Smart Glasses nổi phía trên trò chơi.</string>
|
||||
<string name="display_filter_game_profile">Đang dùng hồ sơ %1$s: %2$s</string>
|
||||
<string name="display_filter_default_profile">Đang dùng hồ sơ mặc định: %1$s</string>
|
||||
<string name="settings_search_history">Lịch sử tìm kiếm</string>
|
||||
<string name="settings_search_history_clear">Xóa lịch sử tìm kiếm</string>
|
||||
</resources>
|
||||
@@ -876,7 +876,6 @@
|
||||
<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,7 +2366,6 @@
|
||||
<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>
|
||||
@@ -4166,4 +4164,6 @@
|
||||
<string name="glasses_show_shortcut_hint">在游戏画面上显示悬浮的 Smart Glasses 按钮。</string>
|
||||
<string name="display_filter_game_profile">正在使用 %1$s 配置:%2$s</string>
|
||||
<string name="display_filter_default_profile">正在使用默认配置:%1$s</string>
|
||||
<string name="settings_search_history">搜索历史</string>
|
||||
<string name="settings_search_history_clear">清除搜索历史</string>
|
||||
</resources>
|
||||
@@ -875,7 +875,6 @@
|
||||
<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,7 +2288,6 @@
|
||||
<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>
|
||||
@@ -4166,4 +4164,6 @@
|
||||
<string name="glasses_show_shortcut_hint">在遊戲畫面上顯示浮動的 Smart Glasses 按鈕。</string>
|
||||
<string name="display_filter_game_profile">正在使用 %1$s 設定檔:%2$s</string>
|
||||
<string name="display_filter_default_profile">正在使用預設設定檔:%1$s</string>
|
||||
<string name="settings_search_history">搜尋記錄</string>
|
||||
<string name="settings_search_history_clear">清除搜尋記錄</string>
|
||||
</resources>
|
||||
@@ -875,7 +875,6 @@
|
||||
<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,7 +2288,6 @@
|
||||
<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>
|
||||
@@ -4166,4 +4164,6 @@
|
||||
<string name="glasses_show_shortcut_hint">在遊戲畫面上顯示浮動的 Smart Glasses 按鈕。</string>
|
||||
<string name="display_filter_game_profile">正在使用 %1$s 設定檔:%2$s</string>
|
||||
<string name="display_filter_default_profile">正在使用預設設定檔:%1$s</string>
|
||||
<string name="settings_search_history">搜尋記錄</string>
|
||||
<string name="settings_search_history_clear">清除搜尋記錄</string>
|
||||
</resources>
|
||||
@@ -74,6 +74,7 @@
|
||||
<string name="input_keep_shared">Keep shared</string>
|
||||
<string name="input_independent_copy">Independent copy</string>
|
||||
<string name="input_floating_stick">Start stick at touch position</string>
|
||||
<string name="input_adaptive_capture">Adaptive touch area</string>
|
||||
<string name="input_hide_idle">Hide stick when not in use</string>
|
||||
<string name="input_tools">Tools</string>
|
||||
<string name="input_quick_auto">Auto (%1$s)</string>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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>
|
||||
@@ -737,6 +737,8 @@
|
||||
<string name="hud_size_minimal">Minimal</string>
|
||||
<string name="hud_size_mega">Mega</string>
|
||||
<string name="hud_size_strip">Strip</string>
|
||||
<string name="hud_size_side_strip">Side strip</string>
|
||||
<string name="hud_size_side_strip_hint">Drag the column to either side of the game. Tap the HUD to cycle sizes.</string>
|
||||
<string name="hud_locked">Lock in place</string>
|
||||
<string name="hud_locked_hint">Drag the HUD to move it. While it is locked, on-screen controls under it still work.</string>
|
||||
<string name="hud_hold">Long press</string>
|
||||
@@ -976,7 +978,8 @@
|
||||
<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">Debugging tools</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_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>
|
||||
@@ -1042,6 +1045,9 @@
|
||||
<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>
|
||||
@@ -1468,7 +1474,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">Type the code into the DroidDeck notification</string>
|
||||
<string name="gate_step3">Tap ▼ to keep the keypad open. Swipe down if it closes.</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>
|
||||
@@ -2639,10 +2645,11 @@
|
||||
<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_code_hint">Tap Enter code and type the 6 digits shown in Settings.</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_title_code">Enter the Wi-Fi pairing code</string>
|
||||
<string name="adbpair_title_retry">Try the code again</string>
|
||||
<string name="adbpair_enter_code">Enter code</string>
|
||||
<string name="adbpair_enter_code">Tap ✓ to pair</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>
|
||||
@@ -4452,11 +4459,18 @@
|
||||
<string name="settings_search">Search settings</string>
|
||||
<string name="settings_search_none">No setting matches \"%1$s\"</string>
|
||||
<string name="settings_search_clear">Clear search</string>
|
||||
<string name="settings_search_history">Search history</string>
|
||||
<string name="settings_search_history_clear">Clear search history</string>
|
||||
<string name="settings_place_settings">Settings</string>
|
||||
<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_logs">Logs</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_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>
|
||||
@@ -4505,7 +4519,8 @@
|
||||
<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_hint">Agent, graphics logs and other tools for testing DroidDeck</string>
|
||||
<string name="dev_tools_show">Show developer tools</string>
|
||||
<string name="dev_tools_hint">Show advanced testing and diagnostics controls.</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>
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
<style name="AppTheme" parent="@android:style/Theme.Material.NoActionBar">
|
||||
<item name="android:colorBackground">#FF101418</item>
|
||||
<item name="android:navigationBarColor">@android:color/black</item>
|
||||
<item name="android:statusBarColor">@android:color/black</item>
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
</style>
|
||||
<style name="SessionTheme" parent="@android:style/Theme.Material.NoActionBar.Fullscreen">
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
import com.droiddeck.launcher.session.SessionFiles
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
class CpuFeaturesTest {
|
||||
@Test fun anArmv80CpuLacksAtomics() {
|
||||
val cpuInfo = """
|
||||
processor : 0
|
||||
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
|
||||
processor : 1
|
||||
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
|
||||
""".trimIndent()
|
||||
assertTrue(CpuFeatures.lacksAtomics(cpuInfo))
|
||||
}
|
||||
|
||||
@Test fun oneCoreWithoutAtomicsIsEnough() {
|
||||
val cpuInfo = """
|
||||
processor : 0
|
||||
Features : fp asimd atomics
|
||||
processor : 4
|
||||
Features : fp asimd
|
||||
""".trimIndent()
|
||||
assertTrue(CpuFeatures.lacksAtomics(cpuInfo))
|
||||
}
|
||||
|
||||
@Test fun anArmv82CpuHasAtomics() {
|
||||
val cpuInfo = """
|
||||
processor : 0
|
||||
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
|
||||
""".trimIndent()
|
||||
assertFalse(CpuFeatures.lacksAtomics(cpuInfo))
|
||||
}
|
||||
|
||||
@Test fun noFeatureLinesMeansNoEmulation() {
|
||||
assertFalse(CpuFeatures.lacksAtomics("processor : 0\n"))
|
||||
assertFalse(CpuFeatures.lacksAtomics(""))
|
||||
}
|
||||
|
||||
@Test fun theEmulatorIsPreloadedFirstOnlyWhenNeededAndStaged() {
|
||||
assertEquals("/usr/local/lib/droiddeck-lse/liblse_emu.so\n", SessionFiles.lsePreload(lacksAtomics = true, staged = true))
|
||||
assertEquals("", SessionFiles.lsePreload(lacksAtomics = true, staged = false))
|
||||
assertEquals("", SessionFiles.lsePreload(lacksAtomics = false, staged = true))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
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,5 +1,6 @@
|
||||
package com.droiddeck.launcher.files
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
@@ -37,4 +38,26 @@ 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 })
|
||||
}
|
||||
}
|
||||
@@ -205,6 +205,36 @@ class WinCompSourcesTest {
|
||||
assertEquals("GOG", picks.getValue("vcredist2015_dll").kind)
|
||||
}
|
||||
|
||||
@Test fun nativeD3dxSelectsItsEffectCompilersForEveryAutomaticSource() {
|
||||
val catalog = listOf(ready("d3dx9"), ready("d3dcompiler_42"), ready("d3dcompiler_43")).associateBy { it.name }
|
||||
for (origin in WinCompSources.Origin.values()) {
|
||||
val finding = WinCompSources.Finding("d3dx9", "DirectX", origin, true)
|
||||
val picks = AutoComponents.autoPicks(listOf(finding), catalog)
|
||||
assertEquals(setOf("d3dx9", "d3dcompiler_42", "d3dcompiler_43"), picks.keys)
|
||||
assertEquals(origin.name, picks.getValue("d3dcompiler_43").kind)
|
||||
assertEquals(picks.getValue("d3dx9").args, picks.getValue("d3dcompiler_43").args)
|
||||
assertEquals(setOf("d3dx9"), AutoComponents.autoPicks(listOf(finding), catalog, mapOf("d3dx9" to false)).keys)
|
||||
assertTrue(AutoComponents.autoPicks(listOf(finding.copy(auto = false)), catalog).isEmpty())
|
||||
}
|
||||
assertEquals(setOf("d3dcompiler_42", "d3dcompiler_43"),
|
||||
AutoComponents.autoPicks(emptyList(), catalog, mapOf("d3dx9" to true)).keys)
|
||||
assertTrue(AutoComponents.autoPicks(emptyList(), catalog, mapOf("xact" to true)).isEmpty())
|
||||
}
|
||||
|
||||
@Test fun effectCompilerSelectionKeepsIndependentFindingsAndSkipsUnavailableComponents() {
|
||||
val catalog = listOf(ready("d3dx9"), ready("d3dcompiler_43"),
|
||||
WinComponents.Component("d3dcompiler_42", "", "", "broken", emptyList(), emptyList())).associateBy { it.name }
|
||||
val findings = listOf(
|
||||
WinCompSources.Finding("d3dx9", "DirectX", WinCompSources.Origin.GOG, true),
|
||||
WinCompSources.Finding("d3dcompiler_43", "Compiler", WinCompSources.Origin.STEAM, true),
|
||||
)
|
||||
val picks = AutoComponents.autoPicks(findings, catalog)
|
||||
assertEquals(setOf("d3dx9", "d3dcompiler_43"), picks.keys)
|
||||
assertEquals("STEAM", picks.getValue("d3dcompiler_43").kind)
|
||||
assertEquals(picks.keys, AutoComponents.autoPicks(findings, catalog, mapOf("d3dx9" to false)).keys)
|
||||
assertEquals(setOf("d3dx9"), AutoComponents.autoPicks(findings.take(1), catalog - "d3dcompiler_43").keys)
|
||||
}
|
||||
|
||||
@Test fun theUsersSwitchWinsOverAnAutoPickEitherWay() {
|
||||
val key = "12345"
|
||||
WinComponents.setAuto(app, key, mapOf("d3dx9" to WinComponents.AutoReason("GOG", listOf("DirectX")), "xact" to WinComponents.AutoReason("GOG", listOf("XACT"))))
|
||||
@@ -279,6 +309,42 @@ class WinCompSourcesTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun installedD3dxGainsCompilersWithoutReplacingUserChoices() = withFakeWorker {
|
||||
AutoComponents.catalogOf = { _, _ -> catalog3 + ready("d3dcompiler_42") + ready("d3dcompiler_43") }
|
||||
installedNow.addAll(catalog3.map { it.name })
|
||||
val game = payback()
|
||||
WinComponents.setUser(app, "1262580", "d3dcompiler_42", false)
|
||||
AutoComponents.queueGame(app, game, asked = true)
|
||||
assertEquals(listOf("d3dcompiler_43"), downloaded)
|
||||
assertEquals(setOf("d3dx9", "vcredist2013_dll", "vcredist2019_dll", "d3dcompiler_43"), WinComponents.picks(app, "1262580").toSet())
|
||||
assertEquals(mapOf("d3dcompiler_42" to false), WinComponents.selection(app, "1262580").user)
|
||||
assertTrue(AutoComponents.Pending.ids(app, "1262580").isEmpty())
|
||||
AutoComponents.queueGame(app, game, asked = true)
|
||||
assertEquals(listOf("d3dcompiler_43"), downloaded)
|
||||
WinComponents.setUser(app, "1262580", "d3dx9", false)
|
||||
AutoComponents.queueGame(app, game, asked = true)
|
||||
assertEquals(setOf("vcredist2013_dll", "vcredist2019_dll"), WinComponents.picks(app, "1262580").toSet())
|
||||
}
|
||||
|
||||
@Test fun manuallySelectedD3dxQueuesCompilersBeforeLaunch() = withFakeWorker {
|
||||
AutoComponents.catalogOf = { _, _ -> catalog3 + ready("d3dcompiler_42") + ready("d3dcompiler_43") }
|
||||
installedNow.add("d3dx9")
|
||||
val game = game(tmp.newFolder("ManualEffects"), Library.ADDED)
|
||||
val key = AutoComponents.appKey(game)!!
|
||||
WinComponents.setUser(app, key, "d3dx9", true)
|
||||
WinComponents.setUser(app, key, "d3dcompiler_42", false)
|
||||
session = true
|
||||
gameUp = true
|
||||
assertTrue(AutoComponents.prepareLaunch(app, game))
|
||||
assertEquals(listOf("d3dcompiler_43"), AutoComponents.Pending.ids(app, key))
|
||||
assertTrue(downloaded.isEmpty())
|
||||
gameUp = false
|
||||
AutoComponents.drain(app)
|
||||
assertEquals(listOf("d3dcompiler_43"), downloaded)
|
||||
assertEquals(setOf("d3dx9", "d3dcompiler_43"), WinComponents.picks(app, key).toSet())
|
||||
assertTrue(AutoComponents.Pending.ids(app, key).isEmpty())
|
||||
}
|
||||
|
||||
@Test fun anExplicitCheckRefreshesTheCatalogAndAnOfflineCheckUsesTheCache() = withFakeWorker {
|
||||
installedNow.addAll(catalog3.map { it.name })
|
||||
val requests = ArrayList<Boolean>()
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -133,6 +133,38 @@ class DroidDeckHudPanelTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun sideStripOffersOnlyTheOnePercentLow() {
|
||||
val readings = DroidDeckHudSize.SIDE_STRIP.rows
|
||||
assertEquals(listOf("showLow1"), readings.filter { it.startsWith("showLow") })
|
||||
}
|
||||
|
||||
@Test fun sideStripFitsOneSideOfAWideScreenAndUsesItsOwnReadingOrder() {
|
||||
val app = RuntimeEnvironment.getApplication()
|
||||
val view = DroidDeckHudView(app)
|
||||
val config = DroidDeckHudConfig.DEFAULTS + mapOf(
|
||||
"hudSize" to "side_strip",
|
||||
"hudOrder" to "strip:showCPUUsage|showRAM;side_strip:showRAM|showFPS|showFPSGraph",
|
||||
"showClock" to "0",
|
||||
)
|
||||
view.applyConfig(DroidDeckHudConfig.encode(config))
|
||||
view.showForTest(SNAPSHOT, "DXVK", 0L)
|
||||
|
||||
val density = app.resources.displayMetrics.density
|
||||
val height = (360 * density).toInt()
|
||||
val width = height * 21 / 9
|
||||
val sideMargin = (width - height * 16 / 9) / 2
|
||||
view.measure(
|
||||
View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.AT_MOST),
|
||||
View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.AT_MOST),
|
||||
)
|
||||
|
||||
assertTrue("HUD fits in one side margin", view.measuredWidth <= sideMargin)
|
||||
assertTrue("HUD is taller than it is wide", view.measuredHeight > view.measuredWidth)
|
||||
assertTrue("RAM is first", view.linesForTest().first().startsWith("RAM"))
|
||||
assertTrue("FPS is second", view.linesForTest()[1].startsWith("FPS"))
|
||||
assertTrue("The graph is inside the column", view.graphForTest()!!.right < view.measuredWidth)
|
||||
}
|
||||
|
||||
@Test fun everySizeDrawsTheDPanelWithEverythingInsideIt() {
|
||||
val stats = FrameStats()
|
||||
var now = 1_000_000_000L
|
||||
|
||||
@@ -467,6 +467,7 @@ class InputLibraryTest {
|
||||
val enabled = InputLibraries.read(context)
|
||||
val changed = enabled.layouts.single { it.id == overlay.id }
|
||||
assertEquals(true, changed.adaptiveSticks)
|
||||
assertTrue(changed.elements.filter { it.kind == InputElementKind.STICK }.all { !it.hideStickAtRest && it.adaptiveCapture == true })
|
||||
assertTrue(ControllerPrefs.read(context).adaptiveSticks)
|
||||
assertEquals(overlay.elements.filter { it.kind != InputElementKind.STICK }, changed.elements.filter { it.kind != InputElementKind.STICK })
|
||||
assertEquals(library.layouts.filter { it.id != overlay.id }, enabled.layouts.filter { it.id != overlay.id })
|
||||
|
||||
Loaded 100 of 148 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user