feat(bottom): bottom screen research, Quick Access, game art, guides and mirror panels (#3290)
* docs: bottom screen research and proposals * docs: expand bottom screen region mirror, guides and companion API * feat(bottom): idle home card, per-game panel memory, Steam achievements tab and screen off * feat(bottom): quick tiles page on the dashboard * feat(bottom): Steam guides tab with per-game reading position * feat(bottom): companion page with Stardew, Skyrim and Fallout 4 adapters * docs: bottom screen implementation status * feat(bottom): mirror a region of the game picture on the bottom screen * fix(bottom): follow Steam's selection for any game, composite while mirroring * docs: bottom screen hardware results and screenshots * feat(bottom): guides wiki, fixes, maps and saved pages; hide mirrored region on top * feat(bottom): guides, mirror and companion as their own panels in the app's settings style * feat(bottom): Steam's Quick Access menu as a bottom screen panel * fix(bottom): park Steam's Quick Access through its own bounds and keep it open on a lease * feat(bottom): align Quick Access left, centre or right; keep its tab and Decky working * fix(bottom): quieter Quick Access move handles, instant reopen, Decky tab after a cold start * fix(bottom): lay Quick Access out at the panel's shape so every tab keeps one size * feat(bottom): Quick Access tabs fill the bottom screen * fix(bottom): the Quick Access button still opens the menu on the top screen * feat(bottom): choose Quick Access layout from the bar: full width, left, center or right * feat(bottom): brightness slider for the bottom screen with screen off at its end * feat(bottom): game art panel, hideable bar with a pull tab, direct guide links, centred guide tabs * fix(bottom): mirror fills the panel, options open from the bar * docs: drop the removed dashboard row screenshot * refactor(bottom): split the companion panel into its own change * fix(bottom): Steam dialogs take input over the parked Quick Access menu; review fixes * fix(bottom): extract the Quick Access relay at session start; second review round * fix(bottom): game art refreshes details for the same game * fix(bottom): Quick Access retries back off; art never shows another game for the running one * fix(bottom): Quick Access keeps its lease through retry backoff * fix(bottom): renew the Quick Access lease apart from discovery * fix(bottom): a Quick Access panel releases only its own lease * fix(bottom): an older Quick Access panel cannot take back a newer panel's lease * test(bottom): an expired Quick Access lease can be taken by any panel * fix(bottom): only the Quick Access lease owner sets the menu's shape
No files matched your search
@@ -3,6 +3,9 @@ package com.droiddeck.launcher.ui
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
@@ -344,7 +344,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
private lateinit var threeFingerTap: com.droiddeck.launcher.input.ThreeFingerTap
|
||||
private lateinit var touchscreenGestures: TouchscreenGestures
|
||||
private var gestureConfig = com.droiddeck.launcher.input.TouchGestureConfig()
|
||||
private var gestureGame: String? = null
|
||||
private var gestureGame by mutableStateOf<String?>(null)
|
||||
private var gameStarts by mutableIntStateOf(0)
|
||||
private var gestureSettingsOpen by mutableStateOf(false)
|
||||
private var steamImportAsk by mutableStateOf<com.droiddeck.launcher.session.SteamImportPrompt.Ask?>(null)
|
||||
@@ -1313,6 +1313,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
if (nextGame != null) gameStarts++
|
||||
gestureGame = nextGame
|
||||
refreshGestureConfig()
|
||||
restoreGamePanel(nextGame)
|
||||
}
|
||||
if (
|
||||
SessionState.mode == SessionService.MODE_STEAM &&
|
||||
@@ -2936,7 +2937,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
val on = SessionState.hdrCapable && SessionPrefs.hdr(this, mode)
|
||||
SessionState.hdr = on
|
||||
WaylandCompositor.nativeSetHdrOutput(on)
|
||||
WaylandCompositor.nativeSetZeroCopy(on || SessionPrefs.zeroCopy(this, mode))
|
||||
WaylandCompositor.nativeSetZeroCopy(on || SessionPrefs.zeroCopy(this, mode) && composedOutputFree())
|
||||
Log.i(TAG, "hdr: " + (if (on) "on" else "off") + " for this $mode session")
|
||||
}
|
||||
com.droiddeck.launcher.gpu.DriverSetupLog.write(this, "compositor.start driver=$driverId")
|
||||
@@ -3989,6 +3990,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
val presentation = secondScreenPresentation ?: return
|
||||
presentation.showMenu(false)
|
||||
if (secondScreenMode == SecondScreenMode.NONE) closeSecondScreen(reset = false) else updateKeyboardRoute()
|
||||
if (gamePanelPending) uiHandler.post { restoreGamePanel(gestureGame) }
|
||||
}
|
||||
|
||||
|
||||
@@ -4428,8 +4430,13 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
if (secondScreenMode == SecondScreenMode.DECK_CONTROLS && !SessionState.deckPad) selectSecondScreenMode(secondScreenMode)
|
||||
}
|
||||
|
||||
private fun openingPanel() = SecondScreenMode.opening(SessionPrefs.secondScreenPanel(this, desktopSession), SessionState.deckPad,
|
||||
bottomPages().isNotEmpty(), com.droiddeck.launcher.session.BottomDesktop.available())
|
||||
private fun openingPanel(): SecondScreenMode {
|
||||
val saved = bottomGameKey()?.let { SessionPrefs.gameSecondScreenPanel(this, it) }
|
||||
// A game's own panel counts as applied, so the next game without one returns to the global choice.
|
||||
if (saved != null) gamePanelApplied = true
|
||||
return SecondScreenMode.opening(saved ?: SessionPrefs.secondScreenPanel(this, desktopSession), SessionState.deckPad,
|
||||
bottomPages().isNotEmpty(), com.droiddeck.launcher.session.BottomDesktop.available(), SessionState.mode == SessionService.MODE_STEAM)
|
||||
}
|
||||
|
||||
private fun openingSurface() = openingPanel().takeIf { it != SecondScreenMode.MENU } ?: SecondScreenMode.KEYBOARD_TRACKPAD
|
||||
|
||||
@@ -4455,9 +4462,16 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
typingReturnMode = null
|
||||
automaticPanel = false
|
||||
SessionPrefs.setSecondScreenPanel(this, desktopSession, SecondScreenMode.MENU.id)
|
||||
bottomGameKey()?.let { SessionPrefs.setGameSecondScreenPanel(this, it, SecondScreenMode.MENU.id) }
|
||||
gamePanelApplied = bottomGameKey() != null
|
||||
drawerOpen = true
|
||||
}
|
||||
|
||||
/** What bottom-screen memory is kept under: the game id in direct-run mode when there is one, else the focused game. */
|
||||
private fun bottomGameKey(): String? =
|
||||
if (SessionState.mode == SessionService.MODE_RUN) SessionState.gameId?.takeIf { it.isNotBlank() }?.let { "game:$it" } ?: gestureGame
|
||||
else gestureGame
|
||||
|
||||
private fun settleDualScreenControls() {
|
||||
if (!dualControlsProvisional || pipUi || !started || (::loading.isInitialized && loading.visible)) return
|
||||
dualControlsProvisional = false
|
||||
@@ -4575,10 +4589,36 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
typingReturnMode = null
|
||||
automaticPanel = false
|
||||
SessionState.bottomMenu = false
|
||||
if (mode != SecondScreenMode.NONE) SessionPrefs.setSecondScreenPanel(this, desktopSession, mode.id)
|
||||
if (mode != SecondScreenMode.NONE) {
|
||||
SessionPrefs.setSecondScreenPanel(this, desktopSession, mode.id)
|
||||
bottomGameKey()?.let { SessionPrefs.setGameSecondScreenPanel(this, it, mode.id) }
|
||||
gamePanelApplied = bottomGameKey() != null
|
||||
}
|
||||
selectSecondScreenMode(mode)
|
||||
}
|
||||
|
||||
private var gamePanelApplied = false
|
||||
private var gamePanelPending = false
|
||||
|
||||
private fun restoreGamePanel(game: String?) {
|
||||
if (secondScreenMode == SecondScreenMode.NONE || pipUi) return
|
||||
// The bottom menu or field keyboard is in the way; the panel is restored once it closes.
|
||||
if (typingReturnMode != null || menuShownOnBottom()) {
|
||||
gamePanelPending = true
|
||||
return
|
||||
}
|
||||
gamePanelPending = false
|
||||
val remembered = game?.let { bottomGameKey() }?.let { SessionPrefs.gameSecondScreenPanel(this, it) }
|
||||
val wanted = when {
|
||||
remembered != null -> SecondScreenMode.opening(remembered, SessionState.deckPad, bottomPages().isNotEmpty(),
|
||||
com.droiddeck.launcher.session.BottomDesktop.available(), SessionState.mode == SessionService.MODE_STEAM)
|
||||
gamePanelApplied -> openingPanel()
|
||||
else -> return
|
||||
}
|
||||
gamePanelApplied = remembered != null
|
||||
if (wanted != SecondScreenMode.MENU && wanted != secondScreenMode) selectSecondScreenMode(wanted)
|
||||
}
|
||||
|
||||
private fun bottomScreenPicker(mode: SecondScreenMode) = com.droiddeck.launcher.ui.ScreenPicker(
|
||||
com.droiddeck.launcher.ui.secondScreenModes(false, SessionState.deckPad, bottomPages().isNotEmpty(),
|
||||
com.droiddeck.launcher.session.BottomDesktop.available()),
|
||||
@@ -4594,6 +4634,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
onKeyboardClosed = ::bottomKeyboardClosed,
|
||||
onMenu = { drawerOpen = true },
|
||||
picker = ::bottomScreenPicker,
|
||||
panel = ::bottomPanel,
|
||||
onMenuTouched = {
|
||||
if (drawerPinned) {
|
||||
drawerPinned = false
|
||||
@@ -4630,7 +4671,11 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
BottomDashboard(
|
||||
bottomPages(), com.droiddeck.launcher.ui.SessionBottomTab.picked(SessionState.sessionId),
|
||||
gameStarts = gameStarts,
|
||||
onPage = { com.droiddeck.launcher.ui.SessionBottomTab.pick(SessionState.sessionId, it) },
|
||||
gamePage = { bottomGameKey()?.let { SessionPrefs.gameBottomPage(this@SessionActivity, it) } },
|
||||
onPage = {
|
||||
com.droiddeck.launcher.ui.SessionBottomTab.pick(SessionState.sessionId, it)
|
||||
bottomGameKey()?.let { game -> SessionPrefs.setGameBottomPage(this@SessionActivity, game, it) }
|
||||
},
|
||||
strip = { pageId ->
|
||||
com.droiddeck.launcher.ui.SessionBottomStrip(pageId) { if (::hud.isInitialized) hud.liveFps else null }
|
||||
},
|
||||
@@ -4639,11 +4684,21 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
}),
|
||||
)
|
||||
|
||||
private fun bottomPages(): List<BottomPage> = sessionBottomPages(BottomPageActions(
|
||||
private fun bottomPages(): List<BottomPage> = sessionBottomPages(bottomActions())
|
||||
|
||||
private fun bottomPanel(mode: SecondScreenMode): (@androidx.compose.runtime.Composable () -> Unit)? =
|
||||
if (!mode.sessionPanel) null else ({ DroidDeckTheme { com.droiddeck.launcher.ui.BottomSessionPanel(mode, bottomActions()) } })
|
||||
|
||||
private fun bottomActions() = BottomPageActions(
|
||||
takeScreenshot = ::captureScreenshot,
|
||||
fps = { if (::hud.isInitialized) hud.liveFps else null },
|
||||
runningGame = { gestureGame },
|
||||
))
|
||||
gameKey = ::bottomGameKey,
|
||||
copyRegion = ::copyGameRegion,
|
||||
sourceAspect = { gameSource()?.takeIf { it.width > 0 && it.height > 0 }?.let { it.width.toFloat() / it.height } ?: (16f / 9f) },
|
||||
holdComposed = ::holdComposedOutput,
|
||||
maskRegion = ::maskGameRegion,
|
||||
)
|
||||
|
||||
private fun captureScreenshot(onDone: (Boolean) -> Unit) = copyGameFrame { bitmap ->
|
||||
if (bitmap == null) {
|
||||
@@ -4692,6 +4747,46 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
}
|
||||
}
|
||||
|
||||
private fun gameSource(): android.view.SurfaceView? = if (glassesOutputActive) glassesScreen?.surfaceView
|
||||
else if (bottomOutputActive) bottomGame?.surfaceView else if (::surfaceView.isInitialized) surfaceView else null
|
||||
|
||||
private fun copyGameRegion(region: android.graphics.RectF?, outWidth: Int, outHeight: Int, onFrame: (android.graphics.Bitmap?) -> Unit) {
|
||||
val source = gameSource()
|
||||
val width = source?.width ?: 0
|
||||
val height = source?.height ?: 0
|
||||
if (source == null || width <= 0 || height <= 0 || outWidth <= 0 || outHeight <= 0 || source.holder.surface?.isValid != true) {
|
||||
onFrame(null)
|
||||
return
|
||||
}
|
||||
val r = region ?: android.graphics.RectF(0f, 0f, 1f, 1f)
|
||||
val src = android.graphics.Rect((r.left * width).toInt(), (r.top * height).toInt(), (r.right * width).toInt(), (r.bottom * height).toInt())
|
||||
if (src.width() <= 0 || src.height() <= 0) {
|
||||
onFrame(null)
|
||||
return
|
||||
}
|
||||
val bitmap = try {
|
||||
android.graphics.Bitmap.createBitmap(outWidth, outHeight, android.graphics.Bitmap.Config.ARGB_8888)
|
||||
} catch (_: OutOfMemoryError) {
|
||||
onFrame(null)
|
||||
return
|
||||
}
|
||||
withPictureFrame { done ->
|
||||
try {
|
||||
android.view.PixelCopy.request(source, src, bitmap, { result ->
|
||||
done()
|
||||
if (result == android.view.PixelCopy.SUCCESS) onFrame(bitmap) else {
|
||||
bitmap.recycle()
|
||||
onFrame(null)
|
||||
}
|
||||
}, uiHandler)
|
||||
} catch (_: IllegalArgumentException) {
|
||||
done()
|
||||
bitmap.recycle()
|
||||
onFrame(null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** PixelCopy reads the last queued buffer, which black frame insertion makes black every other refresh. */
|
||||
private fun withPictureFrame(copy: (done: () -> Unit) -> Unit) {
|
||||
if (!CompositorHost.holdPicture()) return copy {}
|
||||
@@ -4994,7 +5089,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
com.droiddeck.launcher.ui.SessionTyping.returnFocus(this, taskId)
|
||||
val mode = typingReturnMode ?: return
|
||||
typingReturnMode = null
|
||||
uiHandler.post { if (secondScreenMode == SecondScreenMode.KEYBOARD_TRACKPAD) selectSecondScreenMode(mode) }
|
||||
uiHandler.post {
|
||||
if (secondScreenMode == SecondScreenMode.KEYBOARD_TRACKPAD) selectSecondScreenMode(mode)
|
||||
if (gamePanelPending) restoreGamePanel(gestureGame)
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateKeyboardRoute() {
|
||||
@@ -5925,7 +6023,13 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
if (zeroCopyActive()) {
|
||||
WaylandCompositor.nativeSetZeroCopy(false)
|
||||
val restore = java.util.concurrent.atomic.AtomicBoolean(false)
|
||||
val back = { if (restore.compareAndSet(false, true)) WaylandCompositor.nativeSetZeroCopy(true) }
|
||||
pauseCaptures++
|
||||
val back = {
|
||||
if (restore.compareAndSet(false, true)) {
|
||||
pauseCaptures--
|
||||
if (!isDestroyed) WaylandCompositor.nativeSetZeroCopy(composedOutputFree())
|
||||
}
|
||||
}
|
||||
uiHandler.postDelayed({ capturePausedFrame(manual = true, onDone = back) }, ZERO_COPY_SETTLE_MS)
|
||||
uiHandler.postDelayed({ back() }, ZERO_COPY_RESTORE_MS)
|
||||
} else {
|
||||
@@ -5934,6 +6038,53 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
SessionService.pause(this)
|
||||
}
|
||||
|
||||
private var composedHolds = 0
|
||||
private var pauseCaptures = 0
|
||||
|
||||
private fun composedOutputFree() = composedHolds == 0 && pauseCaptures == 0
|
||||
private var mirrorMask: android.view.View? = null
|
||||
private var maskedRegion: android.graphics.RectF? = null
|
||||
private var maskDim = false
|
||||
private val maskLayout = android.view.View.OnLayoutChangeListener { _, _, _, _, _, _, _, _, _ -> placeMirrorMask() }
|
||||
|
||||
private fun maskGameRegion(region: android.graphics.RectF?, dim: Boolean) {
|
||||
maskedRegion = region
|
||||
maskDim = dim
|
||||
if (region != null && mirrorMask == null && ::sessionRoot.isInitialized && ::surfaceView.isInitialized) {
|
||||
val mask = android.view.View(this).apply {
|
||||
isClickable = false
|
||||
isFocusable = false
|
||||
importantForAccessibility = android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO
|
||||
}
|
||||
sessionRoot.addView(mask, sessionRoot.indexOfChild(surfaceView) + 1, FrameLayout.LayoutParams(0, 0))
|
||||
surfaceView.addOnLayoutChangeListener(maskLayout)
|
||||
mirrorMask = mask
|
||||
}
|
||||
placeMirrorMask()
|
||||
}
|
||||
|
||||
private fun placeMirrorMask() {
|
||||
val mask = mirrorMask ?: return
|
||||
val r = maskedRegion
|
||||
if (r == null || glassesOutputActive || bottomOutputActive || surfaceView.width <= 0) {
|
||||
mask.visibility = android.view.View.GONE
|
||||
return
|
||||
}
|
||||
mask.setBackgroundColor(if (maskDim) 0xB3000000.toInt() else android.graphics.Color.BLACK)
|
||||
val w = surfaceView.width
|
||||
val h = surfaceView.height
|
||||
mask.layoutParams = FrameLayout.LayoutParams(((r.right - r.left) * w).toInt(), ((r.bottom - r.top) * h).toInt(), Gravity.TOP or Gravity.START).apply {
|
||||
leftMargin = surfaceView.left - sessionRoot.paddingLeft + (r.left * w).toInt()
|
||||
topMargin = surfaceView.top - sessionRoot.paddingTop + (r.top * h).toInt()
|
||||
}
|
||||
mask.visibility = android.view.View.VISIBLE
|
||||
}
|
||||
|
||||
private fun holdComposedOutput(hold: Boolean) {
|
||||
composedHolds = (composedHolds + if (hold) 1 else -1).coerceAtLeast(0)
|
||||
if (zeroCopyActive()) WaylandCompositor.nativeSetZeroCopy(composedOutputFree())
|
||||
}
|
||||
|
||||
private fun zeroCopyActive(): Boolean =
|
||||
CompositorHost.isStarted && !SessionState.hdr && SessionPrefs.zeroCopy(this, SessionState.mode)
|
||||
|
||||
@@ -6651,11 +6802,21 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
modifier = Modifier.fillMaxWidth().weight(1f),
|
||||
)
|
||||
}
|
||||
secondScreenMode.sessionPanel -> androidx.compose.foundation.layout.Column(Modifier.fillMaxSize()) {
|
||||
com.droiddeck.launcher.ui.BottomScreenBar(bar(getString(secondScreenMode.label)))
|
||||
androidx.compose.foundation.layout.Box(Modifier.fillMaxWidth().weight(1f)) {
|
||||
com.droiddeck.launcher.ui.BottomSessionPanel(secondScreenMode, bottomActions())
|
||||
}
|
||||
}
|
||||
pages.isEmpty() -> com.droiddeck.launcher.ui.BottomScreenBar(bar(null))
|
||||
else -> BottomDashboard(
|
||||
pages, com.droiddeck.launcher.ui.SessionBottomTab.picked(SessionState.sessionId),
|
||||
gameStarts = gameStarts,
|
||||
onPage = { com.droiddeck.launcher.ui.SessionBottomTab.pick(SessionState.sessionId, it) },
|
||||
gamePage = { bottomGameKey()?.let { SessionPrefs.gameBottomPage(this@SessionActivity, it) } },
|
||||
onPage = {
|
||||
com.droiddeck.launcher.ui.SessionBottomTab.pick(SessionState.sessionId, it)
|
||||
bottomGameKey()?.let { game -> SessionPrefs.setGameBottomPage(this@SessionActivity, game, it) }
|
||||
},
|
||||
bar = bar(getString(R.string.second_mode_dashboard)),
|
||||
strip = { pageId ->
|
||||
com.droiddeck.launcher.ui.SessionBottomStrip(pageId) { if (::hud.isInitialized) hud.liveFps else null }
|
||||
|
||||
@@ -15,17 +15,24 @@ enum class SecondScreenMode(val id: String, @StringRes val label: Int, val bindi
|
||||
DECK_CONTROLS("deck-controls", R.string.second_mode_deck_controls, InputStockLayouts.DECK),
|
||||
CUSTOM_CONTROLS("custom-controls", R.string.input_profile_controls_mode),
|
||||
DASHBOARD("dashboard", R.string.second_mode_dashboard),
|
||||
GUIDES("guides", R.string.bottom_page_guides),
|
||||
MIRROR("mirror", R.string.bottom_page_mirror),
|
||||
STEAM_QAM("steam-qam", R.string.bottom_qam_title),
|
||||
ART("art", R.string.bottom_art_title),
|
||||
DESKTOP("desktop", R.string.second_mode_desktop);
|
||||
|
||||
val sessionPanel: Boolean get() = this == GUIDES || this == MIRROR || this == STEAM_QAM || this == ART
|
||||
|
||||
val controls: Boolean get() = this == CUSTOM_CONTROLS || bindings != null
|
||||
|
||||
fun panel(context: Context): String? = if (this == DECK_CONTROLS) SessionPrefs.deckPanel(context).bindings else bindings
|
||||
|
||||
companion object {
|
||||
/** The mode the bottom screen opens in: the one picked last if it is still available, else the DroidDeck menu. */
|
||||
fun opening(remembered: String?, deckPad: Boolean, dashboard: Boolean = false, bottomDesktop: Boolean = false): SecondScreenMode =
|
||||
fun opening(remembered: String?, deckPad: Boolean, dashboard: Boolean = false, bottomDesktop: Boolean = false,
|
||||
steam: Boolean = false): SecondScreenMode =
|
||||
entries.firstOrNull {
|
||||
it != NONE && it.id == remembered && (it != DECK_CONTROLS || deckPad) && (it != DASHBOARD || dashboard) &&
|
||||
it != NONE && it.id == remembered && (it != DECK_CONTROLS || deckPad) && (it != DASHBOARD && !it.sessionPanel || dashboard) && (it != STEAM_QAM && it != ART || steam) &&
|
||||
(it != DESKTOP || bottomDesktop)
|
||||
} ?: MENU
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import org.json.JSONObject
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.concurrent.Executors
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import java.util.concurrent.CompletableFuture
|
||||
import kotlin.concurrent.thread
|
||||
|
||||
class CdpPage(port: Int, path: String, private val onEvent: (String, JSONObject) -> Unit) : AutoCloseable {
|
||||
private val ws = LoopbackWebSocket(port, path, connectTimeoutMs = 2_000)
|
||||
private val ids = AtomicInteger()
|
||||
private val pending = ConcurrentHashMap<Int, CompletableFuture<JSONObject>>()
|
||||
private val sender = Executors.newSingleThreadExecutor { r -> Thread(r, "cdp-send").apply { isDaemon = true } }
|
||||
@Volatile var closed = false
|
||||
private set
|
||||
private val tornDown = java.util.concurrent.atomic.AtomicBoolean(false)
|
||||
|
||||
init {
|
||||
thread(name = "cdp-read", isDaemon = true) {
|
||||
try {
|
||||
while (true) {
|
||||
val m = JSONObject(ws.receive() ?: break)
|
||||
if (m.has("id")) pending.remove(m.optInt("id"))?.complete(m)
|
||||
else onEvent(m.optString("method"), m.optJSONObject("params") ?: JSONObject())
|
||||
}
|
||||
} catch (_: Exception) {
|
||||
}
|
||||
close()
|
||||
}
|
||||
}
|
||||
|
||||
fun send(method: String, params: JSONObject = JSONObject()) {
|
||||
if (closed) return
|
||||
val id = ids.incrementAndGet()
|
||||
val text = JSONObject().put("id", id).put("method", method).put("params", params).toString()
|
||||
runCatching { sender.execute { runCatching { ws.send(text) } } }
|
||||
}
|
||||
|
||||
fun call(method: String, params: JSONObject = JSONObject(), timeoutMs: Long = 3_000): JSONObject? {
|
||||
if (closed) return null
|
||||
val id = ids.incrementAndGet()
|
||||
val future = CompletableFuture<JSONObject>()
|
||||
pending[id] = future
|
||||
val text = JSONObject().put("id", id).put("method", method).put("params", params).toString()
|
||||
runCatching { sender.execute { runCatching { ws.send(text) }.onFailure { future.complete(JSONObject()) } } }
|
||||
.onFailure { future.complete(JSONObject()) }
|
||||
return runCatching { future.get(timeoutMs, TimeUnit.MILLISECONDS) }.getOrNull().also { pending.remove(id) }
|
||||
}
|
||||
|
||||
fun evaluate(expression: String): Any? =
|
||||
call("Runtime.evaluate", JSONObject().put("expression", expression).put("returnByValue", true))
|
||||
?.optJSONObject("result")?.optJSONObject("result")?.opt("value")
|
||||
|
||||
override fun close() {
|
||||
closed = true
|
||||
if (!tornDown.compareAndSet(false, true)) return
|
||||
pending.values.forEach { it.complete(JSONObject()) }
|
||||
sender.shutdown()
|
||||
runCatching { ws.close() }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,284 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
import java.net.HttpURLConnection
|
||||
import java.net.URL
|
||||
import java.net.URLEncoder
|
||||
|
||||
object GameLinks {
|
||||
enum class Kind { WIKI, STRATEGYWIKI, PCGAMINGWIKI, GAMEFAQS, IGN, HOWLONGTOBEAT, MAPGENIE }
|
||||
|
||||
data class Link(val kind: Kind, val url: String)
|
||||
|
||||
data class Search(val id: String, val url: String)
|
||||
|
||||
internal fun sparql(appId: Long): String = """
|
||||
SELECT ?fandom ?pcgw ?gamefaqs ?ign ?hltb ?sw WHERE {
|
||||
?g wdt:P1733 "$appId".
|
||||
OPTIONAL { ?g wdt:P4073 ?fandom }
|
||||
OPTIONAL { ?g wdt:P6337 ?pcgw }
|
||||
OPTIONAL { ?g wdt:P4769 ?gamefaqs }
|
||||
OPTIONAL { ?g wdt:P5385 ?ign }
|
||||
OPTIONAL { ?g wdt:P2816 ?hltb }
|
||||
OPTIONAL { ?g wdt:P9075 ?sw }
|
||||
} LIMIT 50
|
||||
""".trimIndent()
|
||||
|
||||
internal fun parse(json: String): List<Link> {
|
||||
val rows = JSONObject(json).optJSONObject("results")?.optJSONArray("bindings") ?: return emptyList()
|
||||
val values = HashMap<String, MutableList<String>>()
|
||||
for (i in 0 until rows.length()) {
|
||||
val row = rows.optJSONObject(i) ?: continue
|
||||
for (key in row.keys()) {
|
||||
val v = row.optJSONObject(key)?.optString("value").orEmpty()
|
||||
if (v.isNotEmpty() && v !in values.getOrPut(key) { mutableListOf() }) values.getValue(key) += v
|
||||
}
|
||||
}
|
||||
fun first(key: String) = values[key]?.firstOrNull()
|
||||
// Wikidata is editable by anyone, and this id becomes a URL host.
|
||||
val fandomId = Regex("[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)?")
|
||||
val fandom = values["fandom"]?.filter(fandomId::matches)?.let { all -> all.firstOrNull { '.' !in it } ?: all.firstOrNull() }
|
||||
return listOfNotNull(
|
||||
fandom?.let { id -> if ('.' in id) id.split('.', limit = 2).let { (lang, wiki) -> "https://$wiki.fandom.com/$lang/" } else "https://$id.fandom.com/" }
|
||||
?.let { Link(Kind.WIKI, it) },
|
||||
first("sw")?.let { Link(Kind.STRATEGYWIKI, "https://strategywiki.org/wiki/" + path(it)) },
|
||||
first("pcgw")?.let { Link(Kind.PCGAMINGWIKI, "https://www.pcgamingwiki.com/wiki/" + path(it)) },
|
||||
first("gamefaqs")?.takeIf { it.all(Char::isDigit) }?.let { Link(Kind.GAMEFAQS, "https://gamefaqs.gamespot.com/-/$it-") },
|
||||
first("ign")?.let { Link(Kind.IGN, "https://www.ign.com/games/" + path(it)) },
|
||||
first("hltb")?.takeIf { it.all(Char::isDigit) }?.let { Link(Kind.HOWLONGTOBEAT, "https://howlongtobeat.com/game/$it") },
|
||||
)
|
||||
}
|
||||
|
||||
/** Site slugs to try for a game name, longest first: "Bully: Scholarship Edition" gives bully-scholarship-edition, then bully. */
|
||||
internal fun slugs(name: String): List<String> {
|
||||
fun slug(s: String) = s.lowercase().replace("&", "and").replace(Regex("['’™®©]"), "")
|
||||
.replace(Regex("[^a-z0-9]+"), "-").trim('-')
|
||||
val short = name.split(Regex(":| - | – |\\("), limit = 2).first()
|
||||
return listOf(slug(name), slug(short)).filter { it.isNotEmpty() }.distinct()
|
||||
}
|
||||
|
||||
/** Direct pages for what Wikidata has no ID for, found from each site's own routes rather than a web search. */
|
||||
internal fun direct(name: String, found: List<Link>, exists: (String) -> Boolean, strategyWiki: (String) -> String?): List<Link> =
|
||||
merge(found, discover(name, found, exists, strategyWiki))
|
||||
|
||||
/** Wikidata's links with the discovered ones; a discovered IGN wiki replaces Wikidata's IGN game page. */
|
||||
internal fun merge(found: List<Link>, extra: List<Link>): List<Link> =
|
||||
found.filterNot { it.kind == Kind.IGN && extra.any { e -> e.kind == Kind.IGN } } +
|
||||
extra.filterNot { e -> e.kind != Kind.IGN && found.any { it.kind == e.kind } }
|
||||
|
||||
internal fun discover(name: String, found: List<Link>, exists: (String) -> Boolean, strategyWiki: (String) -> String?): List<Link> {
|
||||
val have = found.map { it.kind }.toSet()
|
||||
val slugs = slugs(name)
|
||||
fun first(urls: List<String>) = urls.firstOrNull(exists)
|
||||
val ignWiki = found.firstOrNull { it.kind == Kind.IGN }?.url?.substringAfter("/games/", "")?.takeIf { it.isNotEmpty() }
|
||||
val extra = listOfNotNull(
|
||||
first(slugs.map { "https://mapgenie.io/$it" })?.let { Link(Kind.MAPGENIE, it) },
|
||||
first((listOfNotNull(ignWiki) + slugs).distinct().map { "https://www.ign.com/wikis/$it" })?.let { Link(Kind.IGN, it) },
|
||||
// Fandom answers pages with a bot check, but its API with 200 for a wiki that exists and 404 for one that does not.
|
||||
if (Kind.WIKI in have) null else slugs.map { it.replace("-", "") }.distinct()
|
||||
.firstOrNull { exists("https://$it.fandom.com/api.php?action=query&meta=siteinfo&format=json") }
|
||||
?.let { Link(Kind.WIKI, "https://$it.fandom.com/") },
|
||||
if (Kind.STRATEGYWIKI in have) null else strategyWiki(name.split(":").first().trim())?.let { Link(Kind.STRATEGYWIKI, it) },
|
||||
)
|
||||
return extra
|
||||
}
|
||||
|
||||
internal fun parseOpenSearch(json: String, title: String): String? = runCatching {
|
||||
val a = JSONArray(json)
|
||||
val titles = a.getJSONArray(1)
|
||||
val urls = a.getJSONArray(3)
|
||||
(0 until titles.length()).firstOrNull { titles.getString(it).equals(title, ignoreCase = true) }?.let { urls.getString(it) }
|
||||
}.getOrNull()
|
||||
|
||||
/** Whether the page exists, or null when the site could not be asked. */
|
||||
private fun exists(url: String): Boolean? = runCatching {
|
||||
val c = URL(url).openConnection() as HttpURLConnection
|
||||
c.instanceFollowRedirects = false
|
||||
c.connectTimeout = 6_000
|
||||
c.readTimeout = 6_000
|
||||
c.setRequestProperty("User-Agent", BROWSER)
|
||||
try { c.responseCode.takeIf { it < 500 }?.let { it in 200..399 } } finally { c.disconnect() }
|
||||
}.getOrNull()
|
||||
|
||||
private fun strategyWiki(title: String): Result<String?> = runCatching {
|
||||
parseOpenSearch(get("https://strategywiki.org/w/api.php?action=opensearch&namespace=0&limit=5&format=json&search=" +
|
||||
URLEncoder.encode(title, "UTF-8")), title)
|
||||
}
|
||||
|
||||
fun links(context: Context, appId: Long, name: String? = null): List<Link> {
|
||||
val cache = File(context.cacheDir, "game-links/$appId.json")
|
||||
val fresh = cache.isFile && System.currentTimeMillis() - cache.lastModified() < CACHE_MS
|
||||
val text = if (fresh) runCatching { cache.readText() }.getOrNull() else null
|
||||
val fetched = text ?: runCatching {
|
||||
get("https://query.wikidata.org/sparql?format=json&query=" + URLEncoder.encode(sparql(appId), "UTF-8"))
|
||||
}.getOrNull()?.also { runCatching { cache.parentFile?.mkdirs(); cache.writeText(it) } }
|
||||
val json = fetched ?: runCatching { cache.readText() }.getOrNull()
|
||||
val wikidata = json?.let { runCatching { parse(it) }.getOrNull() }.orEmpty()
|
||||
val withFixes = if (wikidata.any { it.kind == Kind.PCGAMINGWIKI }) wikidata
|
||||
else wikidata + Link(Kind.PCGAMINGWIKI, "https://www.pcgamingwiki.com/api/appid.php?appid=$appId")
|
||||
if (name.isNullOrBlank()) return withFixes
|
||||
// Only the discovered pages are cached, and only when every site answered, so an offline lookup is retried.
|
||||
val directCache = File(context.cacheDir, "game-links/$appId-direct-v3.json")
|
||||
val cached = directCache.takeIf { it.isFile && System.currentTimeMillis() - it.lastModified() < CACHE_MS }
|
||||
?.let { runCatching { readLinks(it.readText()) }.getOrNull() }
|
||||
if (cached != null) return merge(withFixes, cached)
|
||||
var complete = fetched != null
|
||||
val extra = discover(name, withFixes, { url -> exists(url).also { if (it == null) complete = false } == true }) { title ->
|
||||
strategyWiki(title).onFailure { complete = false }.getOrNull()
|
||||
}
|
||||
if (complete) runCatching { directCache.parentFile?.mkdirs(); directCache.writeText(writeLinks(extra)) }
|
||||
return merge(withFixes, extra)
|
||||
}
|
||||
|
||||
internal fun writeLinks(links: List<Link>): String =
|
||||
JSONArray(links.map { JSONObject().put("kind", it.kind.name).put("url", it.url) }).toString()
|
||||
|
||||
internal fun readLinks(json: String): List<Link> = JSONArray(json).let { a ->
|
||||
(0 until a.length()).map { a.getJSONObject(it) }.map { Link(Kind.valueOf(it.getString("kind")), it.getString("url")) }
|
||||
}
|
||||
|
||||
fun protonTier(appId: Long): String? = runCatching {
|
||||
parseTier(get("https://www.protondb.com/api/v1/reports/summaries/$appId.json"))
|
||||
}.getOrNull()
|
||||
|
||||
internal fun parseTier(json: String): String? =
|
||||
JSONObject(json).optString("tier").takeIf { it in TIERS }
|
||||
|
||||
/** Searches on the sites themselves, for what has no direct page. */
|
||||
fun searches(name: String, found: List<Link>): List<Search> {
|
||||
val q = URLEncoder.encode(name, "UTF-8")
|
||||
return listOfNotNull(
|
||||
Search("youtube", "https://m.youtube.com/results?search_query=$q+walkthrough"),
|
||||
Search("gamefaqs", "https://gamefaqs.gamespot.com/search?game=$q").takeIf { found.none { it.kind == Kind.GAMEFAQS } },
|
||||
)
|
||||
}
|
||||
|
||||
private fun path(id: String) = id.replace(' ', '_')
|
||||
|
||||
private fun get(url: String): String {
|
||||
val c = URL(url).openConnection() as HttpURLConnection
|
||||
c.connectTimeout = 10_000
|
||||
c.readTimeout = 15_000
|
||||
c.setRequestProperty("User-Agent", "DroidDeck (bottom screen guides)")
|
||||
c.setRequestProperty("Accept", "application/sparql-results+json, application/json")
|
||||
try {
|
||||
if (c.responseCode != 200) throw java.io.IOException("HTTP ${c.responseCode}")
|
||||
return c.inputStream.bufferedReader().use { it.readText() }
|
||||
} finally {
|
||||
c.disconnect()
|
||||
}
|
||||
}
|
||||
|
||||
val TIERS = listOf("platinum", "gold", "silver", "bronze", "borked")
|
||||
private const val CACHE_MS = 7L * 24 * 3600 * 1000
|
||||
private const val BROWSER = "Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Mobile Safari/537.36"
|
||||
}
|
||||
|
||||
object GuideLibrary {
|
||||
data class Saved(val file: File, val title: String, val url: String)
|
||||
|
||||
data class PinnedMap(val file: File, val markers: List<Pair<Float, Float>>)
|
||||
|
||||
private fun dir(context: Context, game: String, kind: String) =
|
||||
File(context.filesDir, "guides/${game.replace(Regex("[^A-Za-z0-9._-]"), "_")}/$kind")
|
||||
|
||||
fun savedFile(context: Context, game: String): File = dir(context, game, "saved").apply { mkdirs() }.let { File(it, "${System.currentTimeMillis()}.mht") }
|
||||
|
||||
fun recordSaved(file: File, title: String, url: String) {
|
||||
runCatching { File(file.path.removeSuffix(".mht") + ".json").writeText(JSONObject().put("title", title).put("url", url).toString()) }
|
||||
}
|
||||
|
||||
fun saved(context: Context, game: String): List<Saved> = dir(context, game, "saved").listFiles { f -> f.name.endsWith(".mht") && f.length() > 0 }
|
||||
.orEmpty().sortedByDescending { it.lastModified() }.map { f ->
|
||||
val meta = runCatching { JSONObject(File(f.path.removeSuffix(".mht") + ".json").readText()) }.getOrNull()
|
||||
Saved(f, meta?.optString("title").orEmpty().ifEmpty { f.nameWithoutExtension }, meta?.optString("url").orEmpty())
|
||||
}
|
||||
|
||||
fun isSaved(context: Context, file: File): Boolean =
|
||||
file.canonicalPath.startsWith(File(context.filesDir, "guides").canonicalPath + File.separator) && file.name.endsWith(".mht")
|
||||
|
||||
fun delete(file: File) {
|
||||
file.delete()
|
||||
File(file.path.removeSuffix(".mht") + ".json").delete()
|
||||
File(file.path + ".markers.json").delete()
|
||||
}
|
||||
|
||||
fun maps(context: Context, game: String): List<PinnedMap> = dir(context, game, "maps")
|
||||
.listFiles { f -> f.extension in IMAGE_TYPES.values }.orEmpty().sortedByDescending { it.lastModified() }
|
||||
.map { PinnedMap(it, markers(it)) }
|
||||
|
||||
fun markers(map: File): List<Pair<Float, Float>> = runCatching {
|
||||
val arr = JSONArray(File(map.path + ".markers.json").readText())
|
||||
List(arr.length()) { i -> arr.getJSONArray(i).let { it.getDouble(0).toFloat() to it.getDouble(1).toFloat() } }
|
||||
}.getOrDefault(emptyList())
|
||||
|
||||
fun saveMarkers(map: File, markers: List<Pair<Float, Float>>) {
|
||||
runCatching { File(map.path + ".markers.json").writeText(JSONArray(markers.map { JSONArray(listOf(it.first.toDouble(), it.second.toDouble())) }).toString()) }
|
||||
}
|
||||
|
||||
/** Follows redirects itself so the page's cookies reach only the host they were read for. */
|
||||
private const val MAX_REDIRECTS = 5
|
||||
|
||||
private fun openMap(url: String, cookies: String?): HttpURLConnection? {
|
||||
val home = URL(url).host
|
||||
var target = URL(url)
|
||||
repeat(MAX_REDIRECTS + 1) {
|
||||
val c = target.openConnection() as HttpURLConnection
|
||||
c.instanceFollowRedirects = false
|
||||
c.connectTimeout = 10_000
|
||||
c.readTimeout = 30_000
|
||||
c.setRequestProperty("User-Agent", "Mozilla/5.0 (Linux; Android) DroidDeck")
|
||||
if (target.host.equals(home, ignoreCase = true)) cookies?.takeIf { it.isNotEmpty() }?.let { c.setRequestProperty("Cookie", it) }
|
||||
if (c.responseCode !in 300..399) return c
|
||||
val next = c.getHeaderField("Location")?.let { runCatching { URL(target, it) }.getOrNull() }
|
||||
c.disconnect()
|
||||
if (next == null || (next.protocol != "https" && next.protocol != "http")) return null
|
||||
target = next
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
fun pin(context: Context, game: String, url: String, cookies: String?): File? = runCatching {
|
||||
if (!url.startsWith("https://") && !url.startsWith("http://")) return null
|
||||
val c = openMap(url, cookies) ?: return null
|
||||
try {
|
||||
if (c.responseCode != 200) return null
|
||||
val ext = IMAGE_TYPES[c.contentType?.substringBefore(';')?.trim()?.lowercase()] ?: return null
|
||||
if (c.contentLengthLong > MAX_MAP_BYTES) return null
|
||||
val out = File(dir(context, game, "maps").apply { mkdirs() }, "${System.currentTimeMillis()}.$ext")
|
||||
// Written beside the map and renamed when complete, so the Maps list never shows a partial image.
|
||||
val part = File(out.path + ".part")
|
||||
try {
|
||||
c.inputStream.use { input ->
|
||||
part.outputStream().use { output ->
|
||||
val buf = ByteArray(64 * 1024)
|
||||
var total = 0L
|
||||
while (true) {
|
||||
val n = input.read(buf)
|
||||
if (n < 0) break
|
||||
total += n
|
||||
if (total > MAX_MAP_BYTES) return null
|
||||
output.write(buf, 0, n)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!part.renameTo(out)) return null
|
||||
} finally {
|
||||
part.delete()
|
||||
}
|
||||
out
|
||||
} finally {
|
||||
c.disconnect()
|
||||
}
|
||||
}.getOrNull()
|
||||
|
||||
fun clear(context: Context, game: String) {
|
||||
File(context.filesDir, "guides/${game.replace(Regex("[^A-Za-z0-9._-]"), "_")}").deleteRecursively()
|
||||
}
|
||||
|
||||
private val IMAGE_TYPES = mapOf("image/png" to "png", "image/jpeg" to "jpg", "image/webp" to "webp", "image/gif" to "gif")
|
||||
private const val MAX_MAP_BYTES = 40L * 1024 * 1024
|
||||
}
|
||||
@@ -22,6 +22,11 @@ object GameProfileManager {
|
||||
clear("component packages") { ComponentsManager.clearGameComponents(context, scope) }
|
||||
clear("texture filtering") { SessionPrefs.clearGameTextureFiltering(context, scope) }
|
||||
clear("Windows components") { WinComponents.setPicks(context, scope, emptyList()) }
|
||||
clear("bottom screen") { SessionPrefs.clearGameBottomScreen(context, scope) }
|
||||
clear("guides") {
|
||||
SteamGuides.clear(context, scope)
|
||||
GuideLibrary.clear(context, scope)
|
||||
}
|
||||
|
||||
if (failures.isNotEmpty()) {
|
||||
val names = failures.joinToString { it.first }
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.DataInputStream
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
import java.io.OutputStream
|
||||
import java.net.InetSocketAddress
|
||||
import java.net.Socket
|
||||
import java.security.MessageDigest
|
||||
import java.security.SecureRandom
|
||||
import java.util.Base64
|
||||
|
||||
class LoopbackWebSocket(port: Int, path: String = "/", connectTimeoutMs: Int = 1_000, readTimeoutMs: Int = 0) : AutoCloseable {
|
||||
private val socket = Socket()
|
||||
private val out: OutputStream
|
||||
private val input: DataInputStream
|
||||
private val random = SecureRandom()
|
||||
|
||||
init {
|
||||
try {
|
||||
socket.connect(InetSocketAddress("127.0.0.1", port), connectTimeoutMs)
|
||||
socket.soTimeout = UPGRADE_TIMEOUT_MS
|
||||
socket.tcpNoDelay = true
|
||||
out = socket.getOutputStream()
|
||||
input = DataInputStream(socket.getInputStream().buffered())
|
||||
val key = Base64.getEncoder().encodeToString(ByteArray(16).also(random::nextBytes))
|
||||
out.write(("GET $path HTTP/1.1\r\nHost: 127.0.0.1:$port\r\nUpgrade: websocket\r\nConnection: Upgrade\r\n" +
|
||||
"Sec-WebSocket-Key: $key\r\nSec-WebSocket-Version: 13\r\n\r\n").toByteArray())
|
||||
out.flush()
|
||||
val status = line(input) ?: throw IOException("no upgrade response")
|
||||
if (status.split(' ').getOrNull(1) != "101") throw IOException("upgrade refused: $status")
|
||||
val headers = HashMap<String, String>()
|
||||
while (true) {
|
||||
val header = line(input) ?: throw IOException("upgrade cut short")
|
||||
if (header.isEmpty()) break
|
||||
val colon = header.indexOf(':')
|
||||
if (colon > 0) headers[header.substring(0, colon).trim().lowercase()] = header.substring(colon + 1).trim()
|
||||
}
|
||||
if (!headers["upgrade"].equals("websocket", ignoreCase = true) ||
|
||||
headers["connection"]?.split(',')?.none { it.trim().equals("upgrade", ignoreCase = true) } != false ||
|
||||
headers["sec-websocket-accept"] != accept(key)
|
||||
) throw IOException("bad upgrade headers")
|
||||
socket.soTimeout = readTimeoutMs
|
||||
} catch (e: Exception) {
|
||||
runCatching { socket.close() }
|
||||
throw e
|
||||
}
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun send(text: String) = frame(0x1, text.toByteArray())
|
||||
|
||||
fun receive(): String? {
|
||||
val message = ByteArrayOutputStream()
|
||||
while (true) {
|
||||
val b0 = input.read().takeIf { it >= 0 } ?: return null
|
||||
val b1 = input.read().takeIf { it >= 0 } ?: return null
|
||||
var length = (b1 and 0x7F).toLong()
|
||||
if (length == 126L) length = input.readUnsignedShort().toLong() else if (length == 127L) length = input.readLong()
|
||||
if (length < 0 || length > MAX_FRAME) throw IOException("frame too large")
|
||||
val mask = if (b1 and 0x80 != 0) ByteArray(4).also(input::readFully) else null
|
||||
val data = ByteArray(length.toInt()).also(input::readFully)
|
||||
if (mask != null) for (i in data.indices) data[i] = (data[i].toInt() xor mask[i % 4].toInt()).toByte()
|
||||
when (b0 and 0x0F) {
|
||||
0x8 -> {
|
||||
sendClose(data.copyOf(minOf(2, data.size)))
|
||||
return null
|
||||
}
|
||||
0x9 -> synchronized(this) { frame(0xA, data) }
|
||||
0x0, 0x1, 0x2 -> {
|
||||
message.write(data)
|
||||
if (message.size() > MAX_FRAME) throw IOException("message too large")
|
||||
if (b0 and 0x80 != 0) return message.toString(Charsets.UTF_8.name())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun frame(opcode: Int, payload: ByteArray) {
|
||||
val mask = ByteArray(4).also(random::nextBytes)
|
||||
val frame = ByteArrayOutputStream(payload.size + 14)
|
||||
frame.write(0x80 or opcode)
|
||||
when {
|
||||
payload.size < 126 -> frame.write(0x80 or payload.size)
|
||||
payload.size < 65536 -> {
|
||||
frame.write(0x80 or 126)
|
||||
frame.write(payload.size ushr 8)
|
||||
frame.write(payload.size and 0xFF)
|
||||
}
|
||||
else -> {
|
||||
frame.write(0x80 or 127)
|
||||
for (k in 7 downTo 0) frame.write(((payload.size.toLong() ushr (8 * k)) and 0xFF).toInt())
|
||||
}
|
||||
}
|
||||
frame.write(mask)
|
||||
for (i in payload.indices) frame.write((payload[i].toInt() xor mask[i % 4].toInt()) and 0xFF)
|
||||
out.write(frame.toByteArray())
|
||||
out.flush()
|
||||
}
|
||||
|
||||
private fun line(s: InputStream): String? {
|
||||
val buf = ByteArrayOutputStream()
|
||||
while (true) {
|
||||
val b = s.read()
|
||||
if (b < 0) return if (buf.size() == 0) null else buf.toString(Charsets.UTF_8.name())
|
||||
if (b == '\n'.code) return buf.toString(Charsets.UTF_8.name()).trimEnd('\r')
|
||||
if (buf.size() > 8192) throw IOException("header line too long")
|
||||
buf.write(b)
|
||||
}
|
||||
}
|
||||
|
||||
private var closeSent = false
|
||||
|
||||
private fun sendClose(payload: ByteArray) {
|
||||
synchronized(this) {
|
||||
if (closeSent) return
|
||||
closeSent = true
|
||||
runCatching { frame(0x8, payload) }
|
||||
}
|
||||
}
|
||||
|
||||
override fun close() {
|
||||
sendClose(ByteArray(0))
|
||||
runCatching { socket.close() }
|
||||
}
|
||||
|
||||
internal companion object {
|
||||
const val MAX_FRAME = 16L * 1024 * 1024
|
||||
const val UPGRADE_TIMEOUT_MS = 3_000
|
||||
|
||||
fun accept(key: String): String = Base64.getEncoder().encodeToString(
|
||||
MessageDigest.getInstance("SHA-1").digest((key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11").toByteArray()))
|
||||
}
|
||||
}
|
||||
@@ -147,6 +147,7 @@ object SessionFiles {
|
||||
"usr/local/bin/droiddeck-login1" to "usr/local/bin/droiddeck-login1",
|
||||
"usr/local/bin/droiddeck-documents" to "usr/local/bin/droiddeck-documents",
|
||||
"usr/local/bin/droiddeck-steam-launch" to "usr/local/bin/droiddeck-steam-launch",
|
||||
"usr/local/bin/droiddeck-qam-relay" to "usr/local/bin/droiddeck-qam-relay",
|
||||
"usr/local/bin/droiddeck-desktop-games" to "usr/local/bin/droiddeck-desktop-games",
|
||||
"usr/local/bin/droiddeck-desktop-programs" to "usr/local/bin/droiddeck-desktop-programs",
|
||||
"usr/local/bin/droiddeck-desktop-bookmarks" to "usr/local/bin/droiddeck-desktop-bookmarks",
|
||||
|
||||
@@ -142,6 +142,55 @@ object SessionPrefs {
|
||||
|
||||
private fun secondScreenPanelKey(desktop: Boolean) = if (desktop) "secondScreenPanel.desktop" else "secondScreenPanel.game"
|
||||
|
||||
fun gameSecondScreenPanel(context: Context, game: String): String? = prefs(context).getString("secondScreenPanel.app.$game", null)
|
||||
|
||||
fun setGameSecondScreenPanel(context: Context, game: String, mode: String) {
|
||||
prefs(context).edit().putString("secondScreenPanel.app.$game", mode).apply()
|
||||
}
|
||||
|
||||
fun gameBottomPage(context: Context, game: String): String? = prefs(context).getString("bottomPage.app.$game", null)
|
||||
|
||||
fun setGameBottomPage(context: Context, game: String, page: String) {
|
||||
prefs(context).edit().putString("bottomPage.app.$game", page).apply()
|
||||
}
|
||||
|
||||
/** The bottom screen's brightness in percent, or null to follow the system. */
|
||||
fun bottomBrightness(context: Context): Int? = prefs(context).getInt("bottomBrightness", -1).takeIf { it >= 0 }
|
||||
|
||||
fun setBottomBrightness(context: Context, percent: Int) {
|
||||
prefs(context).edit().putInt("bottomBrightness", percent).apply()
|
||||
}
|
||||
|
||||
fun bottomAutoDim(context: Context): Boolean = prefs(context).getBoolean("bottomAutoDim", true)
|
||||
|
||||
fun setBottomAutoDim(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("bottomAutoDim", on).apply()
|
||||
}
|
||||
|
||||
fun mirrorRegion(context: Context, game: String): String? = prefs(context).getString("mirrorRegion.app.$game", null)
|
||||
|
||||
fun setMirrorRegion(context: Context, game: String, region: String) {
|
||||
prefs(context).edit().putString("mirrorRegion.app.$game", region).apply()
|
||||
}
|
||||
|
||||
fun mirrorHide(context: Context, game: String): String = prefs(context).getString("mirrorHide.app.$game", null) ?: "off"
|
||||
|
||||
fun setMirrorHide(context: Context, game: String, mode: String) {
|
||||
prefs(context).edit().putString("mirrorHide.app.$game", mode).apply()
|
||||
}
|
||||
|
||||
/** How Steam's Quick Access menu sits on the bottom screen: full, left, center or right. */
|
||||
fun quickAccessLayout(context: Context): String? = prefs(context).getString("bottomQamLayout", null)
|
||||
|
||||
fun setQuickAccessLayout(context: Context, id: String) {
|
||||
prefs(context).edit().putString("bottomQamLayout", id).apply()
|
||||
}
|
||||
|
||||
fun clearGameBottomScreen(context: Context, game: String) {
|
||||
prefs(context).edit().remove("secondScreenPanel.app.$game").remove("bottomPage.app.$game").remove("mirrorRegion.app.$game")
|
||||
.remove("mirrorHide.app.$game").apply()
|
||||
}
|
||||
|
||||
/** The bottom-screen desktop takes touch as a trackpad unless the user switched it to direct touch. */
|
||||
fun bottomDesktopDirectTouch(context: Context): Boolean = prefs(context).getBoolean("bottomDesktopDirectTouch", false)
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import android.text.Html
|
||||
import java.net.HttpURLConnection
|
||||
import java.net.URL
|
||||
|
||||
object SteamGuides {
|
||||
class Guide(val id: String, val title: String, val author: String, val summary: String, val preview: String?, val stars: Int) {
|
||||
val url: String get() = "https://steamcommunity.com/sharedfiles/filedetails/?id=$id"
|
||||
}
|
||||
|
||||
class Place(val url: String, val scroll: Float)
|
||||
|
||||
val TAGS = listOf("Walkthroughs", "Achievements", "Secrets", "Maps or Levels")
|
||||
|
||||
internal fun listUrl(appId: Long, tag: String?, language: String? = null): String =
|
||||
"https://steamcommunity.com/app/$appId/guides/?browsefilter=toprated&browsesort=toprated" +
|
||||
listOfNotNull(tag, language).joinToString("") { "&requiredtags%5B%5D=" + java.net.URLEncoder.encode(it, "UTF-8") }
|
||||
|
||||
internal fun language(locale: java.util.Locale): String {
|
||||
val tag = locale.toLanguageTag()
|
||||
return when {
|
||||
tag.startsWith("zh-Hant") || locale.country in setOf("TW", "HK", "MO") && locale.language == "zh" -> "tchinese"
|
||||
locale.language == "zh" -> "schinese"
|
||||
locale.language == "pt" && locale.country == "BR" -> "brazilian"
|
||||
locale.language == "es" && locale.country.isNotEmpty() && locale.country != "ES" -> "latam"
|
||||
else -> LANGUAGES[locale.language] ?: "english"
|
||||
}
|
||||
}
|
||||
|
||||
fun list(appId: Long, cookies: String?, tag: String? = null, language: String? = language(java.util.Locale.getDefault())): List<Guide>? {
|
||||
val found = fetch(appId, cookies, tag, language)
|
||||
return if (language != null && found != null && found.isEmpty()) fetch(appId, cookies, tag, null) else found
|
||||
}
|
||||
|
||||
private fun fetch(appId: Long, cookies: String?, tag: String?, language: String?): List<Guide>? = runCatching {
|
||||
val connection = URL(listUrl(appId, tag, language)).openConnection() as HttpURLConnection
|
||||
connection.connectTimeout = 10_000
|
||||
connection.readTimeout = 15_000
|
||||
connection.setRequestProperty("User-Agent", "Mozilla/5.0 (X11; Linux x86_64) DroidDeck")
|
||||
cookies?.takeIf { it.isNotEmpty() }?.let { connection.setRequestProperty("Cookie", it) }
|
||||
try {
|
||||
if (connection.responseCode != 200) return null
|
||||
parse(connection.inputStream.bufferedReader().use { it.readText() })
|
||||
} finally {
|
||||
connection.disconnect()
|
||||
}
|
||||
}.getOrNull()
|
||||
|
||||
internal fun parse(html: String): List<Guide> = html.split("class=\"workshopItemCollectionContainer\"").drop(1).mapNotNull { card ->
|
||||
val id = ID.find(card)?.groupValues?.get(1) ?: return@mapNotNull null
|
||||
val title = TITLE.find(card)?.groupValues?.get(1)?.let(::text)?.takeIf { it.isNotEmpty() } ?: return@mapNotNull null
|
||||
Guide(
|
||||
id, title,
|
||||
AUTHOR.find(card)?.groupValues?.get(1)?.let(::text).orEmpty(),
|
||||
SUMMARY.find(card)?.groupValues?.get(1)?.let(::text).orEmpty(),
|
||||
PREVIEW.find(card)?.groupValues?.get(1)?.let { Html.fromHtml(it, Html.FROM_HTML_MODE_LEGACY).toString() },
|
||||
STARS.find(card)?.groupValues?.get(1)?.toIntOrNull() ?: 0,
|
||||
)
|
||||
}.distinctBy { it.id }
|
||||
|
||||
fun place(context: Context, game: String): Place? {
|
||||
val prefs = context.getSharedPreferences(PREFS, Context.MODE_PRIVATE)
|
||||
val url = prefs.getString("$game.url", null)?.takeIf(::isGuide) ?: return null
|
||||
return Place(url, prefs.getFloat("$game.scroll", 0f))
|
||||
}
|
||||
|
||||
fun savePlace(context: Context, game: String, url: String, scroll: Float) {
|
||||
if (!isGuide(url)) return
|
||||
context.getSharedPreferences(PREFS, Context.MODE_PRIVATE).edit()
|
||||
.putString("$game.url", url).putFloat("$game.scroll", scroll.coerceIn(0f, 1f)).apply()
|
||||
}
|
||||
|
||||
fun clear(context: Context, game: String) {
|
||||
context.getSharedPreferences(PREFS, Context.MODE_PRIVATE).edit().remove("$game.url").remove("$game.scroll").apply()
|
||||
}
|
||||
|
||||
internal fun isGuide(url: String): Boolean = GUIDE_URL.matches(url)
|
||||
|
||||
private fun text(html: String): String = Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY).toString().trim().replace(Regex("\\s+"), " ")
|
||||
|
||||
private val LANGUAGES = mapOf(
|
||||
"en" to "english", "de" to "german", "fr" to "french", "it" to "italian", "es" to "spanish", "pt" to "portuguese",
|
||||
"ru" to "russian", "pl" to "polish", "ja" to "japanese", "ko" to "koreana", "tr" to "turkish", "uk" to "ukrainian",
|
||||
"nl" to "dutch", "sv" to "swedish", "da" to "danish", "fi" to "finnish", "nb" to "norwegian", "no" to "norwegian",
|
||||
"cs" to "czech", "hu" to "hungarian", "ro" to "romanian", "bg" to "bulgarian", "el" to "greek", "th" to "thai",
|
||||
"vi" to "vietnamese", "id" to "indonesian", "in" to "indonesian", "ar" to "arabic",
|
||||
)
|
||||
private const val PREFS = "steam_guides"
|
||||
private val GUIDE_URL = Regex("https://steamcommunity\\.com/sharedfiles/filedetails/\\?id=\\d+(#[\\w-]*)?")
|
||||
private val ID = Regex("""filedetails/\?id=(\d+)""")
|
||||
private val TITLE = Regex("""class="workshopItemTitle">(.*?)</div>""", RegexOption.DOT_MATCHES_ALL)
|
||||
private val AUTHOR = Regex("""class="workshopItemAuthorName">(.*?)</span>""", RegexOption.DOT_MATCHES_ALL)
|
||||
private val SUMMARY = Regex("""class="workshopItemShortDesc">(.*?)</div>""", RegexOption.DOT_MATCHES_ALL)
|
||||
private val PREVIEW = Regex("""class="workshopItemPreviewImage" src="([^"]+)"""")
|
||||
private val STARS = Regex("""/(\d)-star\.png""")
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import com.droiddeck.launcher.frontend.AddedGames
|
||||
import java.io.File
|
||||
|
||||
object SteamLocalConfig {
|
||||
class AppStats(val playtimeMinutes: Long, val lastPlayed: Long)
|
||||
|
||||
fun appStats(steamRoot: File, appId: Int): AppStats? {
|
||||
val config = AddedGames.accountConfig(steamRoot) ?: return null
|
||||
val text = runCatching { File(config, "localconfig.vdf").readText() }.getOrNull() ?: return null
|
||||
return appStats(text, appId)
|
||||
}
|
||||
|
||||
internal fun appStats(text: String, appId: Int): AppStats? {
|
||||
val apps = blocks(text, "apps").firstNotNullOfOrNull { blocks(it, appId.toString(), topLevel = true).firstOrNull() } ?: return null
|
||||
val minutes = PLAYTIME.find(apps)?.groupValues?.get(1)?.toLongOrNull() ?: 0L
|
||||
val last = LAST_PLAYED.find(apps)?.groupValues?.get(1)?.toLongOrNull() ?: 0L
|
||||
return AppStats(minutes, last)
|
||||
}
|
||||
|
||||
private fun blocks(text: String, key: String, topLevel: Boolean = false): List<String> {
|
||||
val out = mutableListOf<String>()
|
||||
val quoted = "\"$key\""
|
||||
var depth = 0
|
||||
var i = 0
|
||||
while (i < text.length) {
|
||||
when (val c = text[i]) {
|
||||
'{' -> depth++
|
||||
'}' -> depth--
|
||||
'"' -> {
|
||||
val end = text.indexOf('"', i + 1).takeIf { it > 0 } ?: return out
|
||||
if ((!topLevel || depth == 0) && text.regionMatches(i, quoted, 0, quoted.length) && end == i + quoted.length - 1) {
|
||||
val open = text.indexOfFirst(end + 1) { !it.isWhitespace() }
|
||||
if (open >= 0 && text[open] == '{') {
|
||||
val close = matching(text, open)
|
||||
if (close > open) out += text.substring(open + 1, close)
|
||||
}
|
||||
}
|
||||
i = end
|
||||
}
|
||||
else -> if (c == '/' && text.startsWith("//", i)) i = text.indexOf('\n', i).takeIf { it > 0 } ?: text.length
|
||||
}
|
||||
i++
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
private fun matching(text: String, open: Int): Int {
|
||||
var depth = 0
|
||||
var i = open
|
||||
while (i < text.length) {
|
||||
when (text[i]) {
|
||||
'{' -> depth++
|
||||
'}' -> if (--depth == 0) return i
|
||||
'"' -> i = text.indexOf('"', i + 1).takeIf { it > 0 } ?: return -1
|
||||
}
|
||||
i++
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
private inline fun String.indexOfFirst(from: Int, predicate: (Char) -> Boolean): Int {
|
||||
for (i in from until length) if (predicate(this[i])) return i
|
||||
return -1
|
||||
}
|
||||
|
||||
private val PLAYTIME = Regex(""""Playtime"\s*"(\d+)"""")
|
||||
private val LAST_PLAYED = Regex(""""LastPlayed"\s*"(\d+)"""")
|
||||
}
|
||||
@@ -0,0 +1,249 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import com.droiddeck.launcher.agent.AgentGuest
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
|
||||
// Steam renders the quick access menu only while it is open. While the app holds it, the menu is kept open with its
|
||||
// browser view placed outside the Big Picture window, composition capped at "notification" so gamescope keeps the game
|
||||
// focused, and gamepad focus on the main UI. The hold is a lease the app renews, so Steam recovers if the app goes away.
|
||||
object SteamQam {
|
||||
data class Target(val port: Int, val path: String)
|
||||
|
||||
const val QUICK_ACCESS = 2
|
||||
const val LEASE_MS = 5_000
|
||||
private const val TAG = "SteamQam"
|
||||
private const val EVAL_MS = 6_000L
|
||||
|
||||
private val owners = java.util.concurrent.atomic.AtomicLong(0)
|
||||
|
||||
/** A new panel's lease owner: later panels get larger numbers, also across app restarts. */
|
||||
fun newOwner(): Long = owners.updateAndGet { maxOf(it + 1, System.currentTimeMillis()) }
|
||||
|
||||
/**
|
||||
* Takes or renews the lease for [owner], or releases it. A live lease held by a newer panel is never taken back by an
|
||||
* older one, so a late request from a panel being torn down cannot end its replacement's lease or change its layout.
|
||||
*/
|
||||
internal fun leaseScript(on: Boolean, owner: Long, aspect: Float = 0f): String =
|
||||
if (on) "if (!(g.__ddQamUntil > Date.now()) || !(g.__ddQamOwner > $owner)) { g.__ddQamOwner = $owner; g.__ddQamUntil = Date.now() + $LEASE_MS;" +
|
||||
(if (aspect > 0f) " g.__ddQamAspect = $aspect;" else "") + " }"
|
||||
else "if (g.__ddQamOwner === $owner) g.__ddQamUntil = 0;"
|
||||
|
||||
/** [aspect] is the panel's width over height: the menu is laid out at that shape so every tab shows at one scale. */
|
||||
internal fun script(on: Boolean, aspect: Float = 0f, owner: Long = 0): String = """(() => {
|
||||
const g = globalThis, QAM = 2;
|
||||
const W = SteamUIStore.WindowStore.SteamUIWindows[0];
|
||||
const m = W.MenuStore, c = W.m_CompositionStateStore;
|
||||
const nav = W.m_FocusNavContext;
|
||||
const popup = g_PopupManager.GetExistingPopup("SP BPM_uid0");
|
||||
const held = () => g.__ddQamUntil > Date.now();
|
||||
const ours = () => held() && m.m_eOpenSideMenu === QAM && !g.__ddQamTop;
|
||||
const width = (h) => g.__ddQamAspect > 0 ? Math.round(h * g.__ddQamAspect) : 0;
|
||||
if (!c.__ddQam) {
|
||||
c.__ddQam = c.ComputeOverallMinimumRequestedComposition;
|
||||
m.__ddQam = m.OnMenuDeactivated;
|
||||
m.OnMenuDeactivated = function (d) { if (d === QAM && held() && !g.__ddQamTop) return; return m.__ddQam.call(this, d); };
|
||||
}
|
||||
if (c.__ddQamV !== 2) {
|
||||
c.__ddQamV = 2;
|
||||
// Only the menu's own overlay request is lowered: a dialog over the game still needs Steam to take input.
|
||||
c.ComputeOverallMinimumRequestedComposition = function (...a) {
|
||||
const v = c.__ddQam.apply(this, a);
|
||||
if (v !== 2 || !ours()) return v;
|
||||
m.IsSideMenuVisible = () => false;
|
||||
m.IsSideMenuInteractable = () => false;
|
||||
let without;
|
||||
try { without = c.__ddQam.apply(this, a); } finally { delete m.IsSideMenuVisible; delete m.IsSideMenuInteractable; }
|
||||
return without >= 2 ? v : 1;
|
||||
};
|
||||
}
|
||||
const views = () => popup?.m_rgChildBrowserViews || [];
|
||||
const backdrop = (hide) => {
|
||||
const doc = popup?.m_popup?.document;
|
||||
if (!doc) return;
|
||||
for (const e of doc.querySelectorAll("div")) {
|
||||
if (e.dataset.ddQam) { if (!hide) { e.style.removeProperty("visibility"); delete e.dataset.ddQam; } continue; }
|
||||
if (!hide) continue;
|
||||
const s = getComputedStyle(e), r = e.getBoundingClientRect(), v = doc.defaultView;
|
||||
if (s.backdropFilter && s.backdropFilter !== "none" && r.width >= v.innerWidth - 2 && r.height >= v.innerHeight - 2) {
|
||||
e.dataset.ddQam = "1";
|
||||
e.style.setProperty("visibility", "hidden", "important");
|
||||
}
|
||||
}
|
||||
};
|
||||
const keep = () => {
|
||||
for (const v of views()) {
|
||||
if (v.__ddQam) continue;
|
||||
v.__ddQam = v.SetBounds;
|
||||
v.SetBounds = function (x, y, w, h, ...r) {
|
||||
v.__ddAsked = [x, y, w, h];
|
||||
if (w > 0 && ours()) { x = popup.m_popup.innerWidth + 64; w = width(h) || w; }
|
||||
v.__ddAt = x;
|
||||
v.__ddW = w;
|
||||
return v.__ddQam.call(this, x, y, w, h, ...r);
|
||||
};
|
||||
}
|
||||
if (!held()) {
|
||||
const parked = !g.__ddQamTop;
|
||||
g.__ddQamTop = false;
|
||||
g.__ddQamPress = undefined;
|
||||
if (!g.__ddQamOn) return;
|
||||
g.__ddQamOn = false;
|
||||
backdrop(false);
|
||||
if (parked && m.m_eOpenSideMenu === QAM) m.CloseSideMenus();
|
||||
c.EnsureCorrectComposition?.();
|
||||
return;
|
||||
}
|
||||
// Steam sends the pad to an open side menu, so a dialog over the game would get no input: step aside until it closes.
|
||||
const dialog = nav?.m_rgGamepadNavigationTrees?.some(t => t.m_ID?.startsWith("ModalDialogOverlay") && t.m_Root?.m_element?.isConnected);
|
||||
if (dialog && !g.__ddQamTop) {
|
||||
g.__ddQamPress = W.m_flLastQuickAccessPressMS || 0;
|
||||
if (m.m_eOpenSideMenu === QAM) m.CloseSideMenus();
|
||||
if (g.__ddQamOn) { g.__ddQamOn = false; backdrop(false); c.EnsureCorrectComposition?.(); }
|
||||
return;
|
||||
}
|
||||
// The Quick Access button shows the menu on the top screen as usual; closing it there parks it again.
|
||||
const press = W.m_flLastQuickAccessPressMS || 0;
|
||||
if (g.__ddQamPress === undefined) g.__ddQamPress = press;
|
||||
if (press !== g.__ddQamPress) {
|
||||
g.__ddQamPress = press;
|
||||
g.__ddQamTop = !g.__ddQamTop;
|
||||
if (!g.__ddQamTop) { if (m.m_eOpenSideMenu === QAM) m.CloseSideMenus(); return; }
|
||||
backdrop(false);
|
||||
if (m.m_eOpenSideMenu !== QAM) m.OpenQuickAccessMenu(g.__ddQamTab ?? undefined);
|
||||
for (const v of views()) if (v.__ddAsked?.[2] > 0) { v.__ddAt = v.__ddAsked[0]; v.__ddW = v.__ddAsked[2]; v.__ddQam.call(v, ...v.__ddAsked); }
|
||||
c.EnsureCorrectComposition?.();
|
||||
return;
|
||||
}
|
||||
if (g.__ddQamTop) {
|
||||
if (m.m_eOpenSideMenu === QAM) {
|
||||
if (m.m_eQuickAccessTab != null) g.__ddQamTab = m.m_eQuickAccessTab;
|
||||
return;
|
||||
}
|
||||
g.__ddQamTop = false;
|
||||
}
|
||||
const decky = !!g.DeckyPluginLoader?.tabsHook?.qamBrowserViewPatch;
|
||||
// Decky hooks the menu after Steam starts; the menu has to unmount for its tab to appear, so reopen on the next tick.
|
||||
if (m.m_eOpenSideMenu === QAM && decky && !g.__ddQamDecky) { g.__ddQamDecky = true; m.CloseSideMenus(); return; }
|
||||
if (m.m_eOpenSideMenu === 0) {
|
||||
m.OpenQuickAccessMenu(g.__ddQamTab ?? undefined);
|
||||
g.__ddQamDecky = decky;
|
||||
c.EnsureCorrectComposition?.();
|
||||
}
|
||||
if (m.m_eOpenSideMenu !== QAM) return;
|
||||
if (m.m_eQuickAccessTab != null) g.__ddQamTab = m.m_eQuickAccessTab;
|
||||
if (!g.__ddQamOn) { g.__ddQamOn = true; c.EnsureCorrectComposition?.(); }
|
||||
for (const v of views()) {
|
||||
if (!v.__ddAsked) {
|
||||
const b = v.GetBounds?.();
|
||||
if (b && b.width > 0) { v.__ddAsked = [b.x, b.y, b.width, b.height]; v.__ddAt = b.x; v.__ddW = b.width; }
|
||||
}
|
||||
const a = v.__ddAsked;
|
||||
if (a?.[2] > 0 && (v.__ddAt < popup.m_popup.innerWidth || (width(a[3]) && v.__ddW !== width(a[3])))) v.SetBounds(...a);
|
||||
}
|
||||
const main = nav?.m_rgGamepadNavigationTrees?.find(t => t.m_ID === "GamepadUI_Full_Root");
|
||||
if (main && nav.m_LastActiveNavTree?.m_ID?.startsWith("QuickAccess")) nav.SetActiveNavTree(main);
|
||||
backdrop(true);
|
||||
};
|
||||
${leaseScript(on, owner, aspect)}
|
||||
keep();
|
||||
if (held() && !g.__ddQamTimer) {
|
||||
g.__ddQamTimer = setInterval(() => {
|
||||
keep();
|
||||
if (!held() && !g.__ddQamOn) { clearInterval(g.__ddQamTimer); g.__ddQamTimer = 0; }
|
||||
}, 250);
|
||||
}
|
||||
return JSON.stringify([m.m_eOpenSideMenu, g.__ddQamTop ? 1 : 0]);
|
||||
})()"""
|
||||
|
||||
/** [open] is Steam's open side menu; [top] is true while the menu is shown on the top screen. */
|
||||
data class Hold(val open: Int, val top: Boolean)
|
||||
|
||||
fun hold(context: Context, aspect: Float, owner: Long): Hold? = eval(context, script(true, aspect, owner))?.let(::parseHold)
|
||||
|
||||
internal fun parseHold(text: String): Hold? = runCatching {
|
||||
val a = JSONArray(text)
|
||||
Hold(a.getInt(0), a.getInt(1) == 1)
|
||||
}.getOrNull()
|
||||
|
||||
fun release(context: Context, relayPort: Int, owner: Long) {
|
||||
eval(context, script(false, owner = owner))
|
||||
stopRelay(context, relayPort)
|
||||
}
|
||||
|
||||
fun stopRelay(context: Context, relayPort: Int) {
|
||||
if (relayPort > 0) helper(context, "stop", relayPort.toString())
|
||||
}
|
||||
|
||||
/** Starts the guest relay to Steam's DevTools and finds the menu's page; the relay is stopped again when there is none. */
|
||||
fun target(context: Context): Target? = runCatching {
|
||||
val devtools = File(AgentGuest.dir(context), "cdp-port").readText().trim().toInt()
|
||||
val (relay, secret) = parseRelay(helper(context, "start", devtools.toString())) ?: return null
|
||||
val found = runCatching { parseTarget(relay, get(relay, "/$secret/json"))?.let { it.copy(path = "/$secret${it.path}") } }
|
||||
if (found.getOrNull() == null) helper(context, "stop", relay.toString())
|
||||
found.getOrThrow()
|
||||
}.onFailure { android.util.Log.e(TAG, "no quick access target: $it") }.getOrNull()
|
||||
|
||||
internal fun parseRelay(text: String?): Pair<Int, String>? {
|
||||
val parts = text?.trim()?.split(' ') ?: return null
|
||||
val port = parts.getOrNull(0)?.toIntOrNull() ?: return null
|
||||
val secret = parts.getOrNull(1)?.takeIf { it.matches(Regex("[0-9a-f]{16,64}")) } ?: return null
|
||||
return port to secret
|
||||
}
|
||||
|
||||
private fun helper(context: Context, vararg args: String): String? = runCatching {
|
||||
val request = JSONObject().put("kind", "exec").put("argv", JSONArray(listOf("droiddeck-qam-relay") + args)).put("timeout", 5.0)
|
||||
val answer = AgentGuest.call(context, request, 8_000, trusted = true)
|
||||
if (answer.optInt("exitCode", -1) == 0) answer.optJSONObject("stdout")?.optString("text") ?: answer.optString("stdout") else null
|
||||
}.getOrNull()
|
||||
|
||||
private fun get(port: Int, path: String): String = java.net.Socket().use { s ->
|
||||
s.connect(java.net.InetSocketAddress("127.0.0.1", port), 2_000)
|
||||
s.soTimeout = 3_000
|
||||
s.getOutputStream().apply {
|
||||
write("GET $path HTTP/1.1\r\nHost: 127.0.0.1:$port\r\nAccept: */*\r\nConnection: close\r\n\r\n".toByteArray())
|
||||
flush()
|
||||
}
|
||||
httpBody(s.getInputStream())
|
||||
}
|
||||
|
||||
/** Reads one response, by its Content-Length when it has one: DevTools does not always close the connection. */
|
||||
internal fun httpBody(input: java.io.InputStream): String {
|
||||
val head = StringBuilder()
|
||||
while (!head.endsWith("\r\n\r\n")) {
|
||||
val b = input.read()
|
||||
check(b >= 0 && head.length < 16_384) { "devtools answered ${head.take(80)}" }
|
||||
head.append(b.toChar())
|
||||
}
|
||||
check(head.startsWith("HTTP/1.1 200")) { "devtools answered ${head.take(80)}" }
|
||||
val length = Regex("(?im)^content-length:\\s*(\\d+)").find(head)?.groupValues?.get(1)?.toInt()
|
||||
val body = if (length == null) input.readBytes() else ByteArray(length).also { buf ->
|
||||
var read = 0
|
||||
while (read < length) {
|
||||
val n = input.read(buf, read, length - read)
|
||||
check(n > 0) { "devtools closed after $read of $length bytes" }
|
||||
read += n
|
||||
}
|
||||
}
|
||||
return body.toString(Charsets.UTF_8)
|
||||
}
|
||||
|
||||
internal fun parseTarget(port: Int, json: String): Target? {
|
||||
val list = JSONArray(json)
|
||||
for (i in 0 until list.length()) {
|
||||
val t = list.optJSONObject(i) ?: continue
|
||||
if (!t.optString("title").startsWith("QuickAccess")) continue
|
||||
val ws = t.optString("webSocketDebuggerUrl")
|
||||
val path = Regex("^ws://[^/]+(/devtools/page/[A-Za-z0-9-]+)$").find(ws)?.groupValues?.get(1) ?: continue
|
||||
return Target(port, path)
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
private fun eval(context: Context, expression: String): String? = runCatching {
|
||||
val answer = AgentGuest.steamEval(context, expression, EVAL_MS)
|
||||
if (answer.optBoolean("ok")) answer.opt("value")?.takeIf { it != JSONObject.NULL }?.toString() else null
|
||||
}.getOrNull()
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.droiddeck.launcher.stores
|
||||
|
||||
import android.content.Context
|
||||
import com.droiddeck.launcher.agent.AgentGuest
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
import org.json.JSONObject
|
||||
|
||||
object SteamAchievements : StoreAchievements("steam", "Steam") {
|
||||
fun game(appId: Long) = Game(source, appId.toString())
|
||||
|
||||
override fun request(context: Context, game: Game): Result {
|
||||
val appId = game.id.toLongOrNull()?.takeIf { it in 1..4_294_967_295L } ?: return Result.Failed(Reason.NO_SERVICE)
|
||||
if (!SessionState.running || SessionState.mode != SessionService.MODE_STEAM) return Result.Failed(Reason.UNREACHABLE)
|
||||
val answer = AgentGuest.steamEval(context, expression(appId), EVAL_TIMEOUT_MS)
|
||||
if (!answer.optBoolean("ok")) return Result.Failed(Reason.UNREACHABLE)
|
||||
val value = answer.opt("value")?.takeIf { it != JSONObject.NULL }?.toString() ?: return Result.Failed(Reason.UNREACHABLE)
|
||||
return parse(appId, value)
|
||||
}
|
||||
|
||||
internal fun expression(appId: Long) = """(async () => {
|
||||
const r = await SteamClient.Apps.GetMyAchievementsForApp('$appId');
|
||||
return typeof r === 'string' ? r : JSON.stringify(r);
|
||||
})()"""
|
||||
|
||||
internal fun parse(appId: Long, json: String): Result {
|
||||
val root = runCatching { JSONObject(json) }.getOrNull() ?: return Result.Failed(Reason.UNREACHABLE)
|
||||
if (root.optInt("result", 1) != 1) return Result.Found(emptyList())
|
||||
val items = root.optJSONObject("data")?.optJSONArray("rgAchievements") ?: return Result.Found(emptyList())
|
||||
val out = ArrayList<Achievement>(items.length())
|
||||
for (i in 0 until items.length()) {
|
||||
val a = items.optJSONObject(i) ?: continue
|
||||
val id = a.optString("strID")
|
||||
if (id.isEmpty()) continue
|
||||
val unlocked = a.optBoolean("bAchieved")
|
||||
out += Achievement(
|
||||
id = id,
|
||||
name = a.optString("strName").ifEmpty { id },
|
||||
description = a.optString("strDescription"),
|
||||
hidden = a.optBoolean("bHidden"),
|
||||
unlocked = unlocked,
|
||||
unlockedAt = if (unlocked) a.optLong("rtUnlocked") else 0,
|
||||
icon = image(appId, a.optString("strImage")),
|
||||
iconLocked = null,
|
||||
)
|
||||
}
|
||||
return Result.Found(out)
|
||||
}
|
||||
|
||||
private fun image(appId: Long, value: String): String? = when {
|
||||
value.isEmpty() -> null
|
||||
value.startsWith("https://") -> value
|
||||
value.startsWith("http://") -> "https://" + value.removePrefix("http://")
|
||||
else -> "https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/apps/$appId/${value.substringAfterLast('/')}"
|
||||
}
|
||||
|
||||
private const val EVAL_TIMEOUT_MS = 8_000L
|
||||
}
|
||||
@@ -95,7 +95,7 @@ abstract class StoreAchievements(val source: String, val label: String) {
|
||||
private set
|
||||
fun invalidate() { revision++ }
|
||||
|
||||
private val all: List<StoreAchievements> by lazy { listOf(GogAchievements, EpicAchievements) }
|
||||
private val all: List<StoreAchievements> by lazy { listOf(GogAchievements, EpicAchievements, SteamAchievements) }
|
||||
|
||||
fun forSource(source: String?): StoreAchievements? = all.firstOrNull { it.source == source }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.animation.Crossfade
|
||||
import androidx.compose.animation.core.LinearEasing
|
||||
import androidx.compose.animation.core.RepeatMode
|
||||
import androidx.compose.animation.core.animateFloat
|
||||
import androidx.compose.animation.core.infiniteRepeatable
|
||||
import androidx.compose.animation.core.rememberInfiniteTransition
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.BoxWithConstraints
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.widthIn
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
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.graphics.Brush
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
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 coil.compose.AsyncImage
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.agent.AgentGuest
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.isActive
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
private const val ART_POLL_MS = 2_000L
|
||||
private const val RESCAN_MS = 30_000L
|
||||
private const val DRIFT_MS = 28_000
|
||||
|
||||
/** The game's art filling the bottom screen with a slow pan and zoom, for the running game or the one selected in Steam. */
|
||||
@Composable
|
||||
internal fun ArtPanel(runningGame: () -> String?) {
|
||||
val context = LocalContext.current.applicationContext
|
||||
var game by remember { mutableStateOf<IdleGame?>(null) }
|
||||
var playing by remember { mutableStateOf(false) }
|
||||
FullScreenChrome()
|
||||
LaunchedEffect(Unit) {
|
||||
var games = emptyList<Library.SteamGame>()
|
||||
var scanned = 0L
|
||||
while (isActive) {
|
||||
val running = runningGame()?.toLongOrNull()
|
||||
val shown = running ?: withContext(Dispatchers.IO) { runCatching { AgentGuest.selectedSteamAppId(context) }.getOrNull() }
|
||||
val missing = games.isEmpty() || (shown != null && games.none { it.appId.toLong() == shown })
|
||||
if (missing && (scanned == 0L || System.currentTimeMillis() - scanned > RESCAN_MS)) {
|
||||
withContext(Dispatchers.IO) { runCatching { Library.steamGames(context) }.getOrNull() }?.let { games = it }
|
||||
scanned = System.currentTimeMillis()
|
||||
}
|
||||
// Reloaded every poll so stats that failed to load once still arrive; the crossfade is keyed by app id.
|
||||
// A running game that cannot be loaded is not stood in for by another game's art.
|
||||
val loaded = withContext(Dispatchers.IO) { IdleHome.load(context, games, shown) }
|
||||
?.takeIf { running == null || (it.appId.toLong() and 0xFFFFFFFFL) == running }
|
||||
if (loaded != game) game = loaded
|
||||
playing = running != null && running == game?.appId?.toLong()
|
||||
delay(ART_POLL_MS)
|
||||
}
|
||||
}
|
||||
Box(Modifier.fillMaxSize().background(Color.Black).testTag("bottom-art")) {
|
||||
// Keyed by app id so a refreshed game keeps its pan; the fading-out scene keeps its last details.
|
||||
val seen = remember { HashMap<Int, IdleGame>() }
|
||||
game?.let { seen[it.appId] = it }
|
||||
Crossfade(game?.appId, label = "art") { id ->
|
||||
// Read from state here, so refreshed details for the same game recompose this scene.
|
||||
val shown = game?.takeIf { it.appId == id } ?: seen[id]
|
||||
if (shown != null) ArtScene(shown, playing)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun ArtScene(game: IdleGame, playing: Boolean) {
|
||||
val drift = rememberInfiniteTransition(label = "drift")
|
||||
val t by drift.animateFloat(0f, 1f, infiniteRepeatable(tween(DRIFT_MS, easing = LinearEasing), RepeatMode.Reverse), label = "t")
|
||||
val eased = t * t * (3 - 2 * t)
|
||||
BoxWithConstraints(Modifier.fillMaxSize()) {
|
||||
if (game.art != null) AsyncImage(
|
||||
model = game.art, contentDescription = null, contentScale = ContentScale.Crop,
|
||||
modifier = Modifier.fillMaxSize().graphicsLayer {
|
||||
val scale = 1.08f + 0.14f * eased
|
||||
scaleX = scale
|
||||
scaleY = scale
|
||||
translationX = (eased - 0.5f) * size.width * (scale - 1f)
|
||||
translationY = (0.5f - eased) * size.height * (scale - 1f) * 0.5f
|
||||
},
|
||||
)
|
||||
Box(
|
||||
Modifier.fillMaxSize().background(
|
||||
Brush.verticalGradient(0.55f to Color.Transparent, 1f to Color.Black.copy(alpha = 0.78f)),
|
||||
),
|
||||
)
|
||||
Column(Modifier.align(Alignment.BottomStart).padding(28.dp).fillMaxWidth(0.6f)) {
|
||||
Text(
|
||||
stringResource(if (playing) R.string.bottom_art_playing else if (game.highlighted) R.string.bottom_idle_selected
|
||||
else R.string.bottom_idle_recent).uppercase(),
|
||||
fontSize = 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.4.sp, color = Color.White.copy(alpha = 0.7f),
|
||||
)
|
||||
if (game.logo != null) AsyncImage(
|
||||
model = game.logo, contentDescription = game.name, contentScale = ContentScale.Fit, alignment = Alignment.BottomStart,
|
||||
modifier = Modifier.padding(top = 10.dp).widthIn(max = 460.dp).height(128.dp),
|
||||
) else Text(
|
||||
game.name, fontSize = 34.sp, fontWeight = FontWeight.Bold, color = Color.White, maxLines = 2,
|
||||
overflow = TextOverflow.Ellipsis, modifier = Modifier.padding(top = 4.dp),
|
||||
)
|
||||
Text(idleDetails(game), fontSize = 14.sp, color = Color.White.copy(alpha = 0.75f), maxLines = 1,
|
||||
modifier = Modifier.padding(top = 8.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.provider.Settings
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.DarkMode
|
||||
import androidx.compose.material.icons.outlined.LightMode
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
|
||||
/** The bottom screen's own brightness, in percent. It never goes below [MIN] so the slider cannot leave the screen dark. */
|
||||
internal object BottomBrightness {
|
||||
const val MIN = 5
|
||||
const val STEP = 5
|
||||
|
||||
/** The window brightness to use while the screen is on, or null to follow the system. */
|
||||
fun level(context: Context): Float? = SessionPrefs.bottomBrightness(context)?.let { clamp(it) / 100f }
|
||||
|
||||
fun clamp(percent: Int): Int = percent.coerceIn(MIN, 100)
|
||||
|
||||
/** Where the slider starts: the saved level, else the system brightness as a percentage. */
|
||||
fun initial(context: Context): Int = clamp(SessionPrefs.bottomBrightness(context) ?: runCatching {
|
||||
Settings.System.getInt(context.contentResolver, Settings.System.SCREEN_BRIGHTNESS) * 100 / 255
|
||||
}.getOrDefault(60))
|
||||
|
||||
/** Auto-dim never brightens a screen the user set darker, here or in the system's manual brightness. */
|
||||
fun dimmed(context: Context, dim: Float): Float = minOf(dim, level(context) ?: system(context) ?: dim)
|
||||
|
||||
private fun system(context: Context): Float? = runCatching {
|
||||
val resolver = context.contentResolver
|
||||
if (Settings.System.getInt(resolver, Settings.System.SCREEN_BRIGHTNESS_MODE) != Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL) null
|
||||
else Settings.System.getInt(resolver, Settings.System.SCREEN_BRIGHTNESS) / 255f
|
||||
}.getOrNull()
|
||||
}
|
||||
|
||||
/** A dropdown under the bottom bar: a brightness slider and the screen-off button. A tap outside closes it. */
|
||||
@Composable
|
||||
internal fun BrightnessDrop(percent: Int, onChange: (Int) -> Unit, onScreenOff: () -> Unit, onDismiss: () -> Unit) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
val shape = RoundedCornerShape(16.dp)
|
||||
Box(
|
||||
Modifier.fillMaxSize().clickable(remember { MutableInteractionSource() }, indication = null, onClick = onDismiss)
|
||||
.padding(top = BAR_HEIGHT, start = 12.dp, end = 12.dp),
|
||||
) {
|
||||
Row(
|
||||
Modifier.fillMaxWidth().testTag("bottom-brightness").clip(shape).background(colors.surface).border(1.dp, pal.line, shape)
|
||||
.clickable(remember { MutableInteractionSource() }, indication = null) {}
|
||||
.padding(horizontal = 12.dp, vertical = 6.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
) {
|
||||
Icon(Icons.Outlined.LightMode, contentDescription = null, tint = colors.onSurfaceVariant, modifier = Modifier.size(22.dp))
|
||||
ValueSlider(
|
||||
percent, BottomBrightness.MIN..100, BottomBrightness.STEP, true, stringResource(R.string.bottom_brightness), { "$it%" },
|
||||
modifier = Modifier.weight(1f), track = 32.dp, onChange = onChange,
|
||||
)
|
||||
BarButton(stringResource(R.string.bottom_screen_off), Modifier.testTag("bottom-brightness-off"), vector = Icons.Filled.DarkMode,
|
||||
onClick = onScreenOff)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.gestures.detectVerticalDragGestures
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.ExpandMore
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.DisposableEffect
|
||||
import androidx.compose.runtime.mutableIntStateOf
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.input.pointer.pointerInput
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.semantics.contentDescription
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.droiddeck.launcher.R
|
||||
|
||||
/** Whether the bottom screen's bar is shown. Panels that need the whole screen ask for it hidden; a pull tab brings it back. */
|
||||
internal object BottomChrome {
|
||||
private val requests = mutableIntStateOf(0)
|
||||
|
||||
/** The user's choice, which wins until a panel's request changes; null follows the requests. */
|
||||
private val chosen = mutableStateOf<Boolean?>(null)
|
||||
|
||||
val barShown: Boolean get() = chosen.value ?: (requests.intValue == 0)
|
||||
|
||||
fun show(shown: Boolean) {
|
||||
chosen.value = shown
|
||||
}
|
||||
|
||||
fun reset() {
|
||||
chosen.value = null
|
||||
}
|
||||
|
||||
internal fun request(on: Boolean) {
|
||||
requests.intValue = (requests.intValue + if (on) 1 else -1).coerceAtLeast(0)
|
||||
chosen.value = null
|
||||
}
|
||||
}
|
||||
|
||||
/** Asks for the bar hidden while this is composed, as art, a page being read or a map being viewed do. */
|
||||
@Composable
|
||||
internal fun FullScreenChrome() {
|
||||
DisposableEffect(Unit) {
|
||||
BottomChrome.request(true)
|
||||
onDispose { BottomChrome.request(false) }
|
||||
}
|
||||
}
|
||||
|
||||
private const val PULL_PX = 6f
|
||||
|
||||
/** The tab at the top edge that brings the hidden bar back, by a tap or a pull down. */
|
||||
@Composable
|
||||
internal fun PullTab() {
|
||||
val description = stringResource(R.string.bottom_bar_show)
|
||||
val shape = RoundedCornerShape(bottomStart = 14.dp, bottomEnd = 14.dp)
|
||||
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.TopCenter) {
|
||||
Box(
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = Modifier.testTag("bottom-pull-tab").size(width = 72.dp, height = 26.dp)
|
||||
.semantics { contentDescription = description }
|
||||
.clip(shape).background(Color.Black.copy(alpha = 0.55f)).border(1.dp, Color.White.copy(alpha = 0.14f), shape)
|
||||
.pointerInput(Unit) {
|
||||
var pulled = 0f
|
||||
detectVerticalDragGestures(onDragStart = { pulled = 0f }, onDragEnd = { pulled = 0f }, onDragCancel = { pulled = 0f }) { change, drag ->
|
||||
pulled = (pulled + drag).coerceAtLeast(0f)
|
||||
if (pulled > PULL_PX) { change.consume(); pulled = 0f; BottomChrome.show(true) }
|
||||
}
|
||||
}
|
||||
.clickable(role = Role.Button) { BottomChrome.show(true) },
|
||||
) {
|
||||
Icon(Icons.Outlined.ExpandMore, contentDescription = null, tint = Color.White.copy(alpha = 0.85f), modifier = Modifier.size(22.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,8 @@ internal object SessionBottomTab {
|
||||
}
|
||||
}
|
||||
|
||||
internal fun pageForGameStart(ids: List<String>): String? = GAME_PAGE.takeIf { it in ids }
|
||||
internal fun pageForGameStart(ids: List<String>, remembered: String? = null): String? =
|
||||
remembered?.takeIf { it in ids } ?: GAME_PAGE.takeIf { it in ids }
|
||||
|
||||
private const val DEFAULT_PAGE = "telemetry"
|
||||
private const val GAME_PAGE = "telemetry"
|
||||
@@ -81,13 +82,14 @@ internal fun BottomDashboard(
|
||||
onPage: (String) -> Unit,
|
||||
bar: BottomBarModel? = null,
|
||||
gameStarts: Int = 0,
|
||||
gamePage: () -> String? = { null },
|
||||
strip: (@Composable (String?) -> Unit)? = null,
|
||||
) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
var current by remember { mutableStateOf(pickBottomPage(remembered, pages.map { it.id })) }
|
||||
var current by remember { mutableStateOf(gamePage()?.takeIf { id -> pages.any { it.id == id } } ?: pickBottomPage(remembered, pages.map { it.id })) }
|
||||
val startsWhenOpened = remember { gameStarts }
|
||||
LaunchedEffect(gameStarts) {
|
||||
if (gameStarts != startsWhenOpened) pageForGameStart(pages.map { it.id })?.let { current = it }
|
||||
if (gameStarts != startsWhenOpened) pageForGameStart(pages.map { it.id }, gamePage())?.let { current = it }
|
||||
}
|
||||
val page = pages.firstOrNull { it.id == current } ?: pages.firstOrNull()
|
||||
Column(Modifier.fillMaxSize().background(colors.background)) {
|
||||
|
||||
@@ -0,0 +1,585 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.BitmapFactory
|
||||
import android.net.Uri
|
||||
import android.view.ViewGroup
|
||||
import android.webkit.CookieManager
|
||||
import android.webkit.RenderProcessGoneDetail
|
||||
import android.webkit.WebResourceRequest
|
||||
import android.webkit.WebView
|
||||
import android.webkit.WebViewClient
|
||||
import androidx.compose.foundation.Canvas
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.gestures.detectTapGestures
|
||||
import androidx.compose.foundation.gestures.detectTransformGestures
|
||||
import androidx.compose.foundation.horizontalScroll
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.aspectRatio
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.key
|
||||
import androidx.compose.runtime.mutableFloatStateOf
|
||||
import androidx.compose.runtime.mutableIntStateOf
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.rememberCoroutineScope
|
||||
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.geometry.Offset
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ImageBitmap
|
||||
import androidx.compose.ui.graphics.asImageBitmap
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.input.pointer.pointerInput
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.testTag
|
||||
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.TextAlign
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.compose.ui.viewinterop.AndroidView
|
||||
import coil.compose.AsyncImage
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.stores.SteamAchievements
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.session.GameLinks
|
||||
import com.droiddeck.launcher.session.GuideLibrary
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
import com.droiddeck.launcher.session.SteamGuides
|
||||
import com.droiddeck.launcher.session.SteamWebLogin
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.File
|
||||
import kotlin.coroutines.resume
|
||||
|
||||
private sealed class GuideList {
|
||||
object Loading : GuideList()
|
||||
object Failed : GuideList()
|
||||
class Found(val guides: List<SteamGuides.Guide>) : GuideList()
|
||||
}
|
||||
|
||||
internal enum class GuideSection(val label: Int) {
|
||||
GUIDES(R.string.bottom_page_guides),
|
||||
ACHIEVEMENTS(R.string.achievements_title),
|
||||
WIKI(R.string.bottom_guides_wiki),
|
||||
MAPS(R.string.bottom_guides_maps),
|
||||
SAVED(R.string.bottom_guides_saved),
|
||||
}
|
||||
|
||||
private val TAG_LABELS = listOf(
|
||||
null to R.string.bottom_guides_tag_all,
|
||||
"Walkthroughs" to R.string.bottom_guides_tag_walkthroughs,
|
||||
"Achievements" to R.string.achievements_title,
|
||||
"Secrets" to R.string.bottom_guides_tag_secrets,
|
||||
"Maps or Levels" to R.string.bottom_guides_maps,
|
||||
)
|
||||
|
||||
@Composable
|
||||
internal fun GuidesPanel(runningGame: () -> String?) {
|
||||
val context = LocalContext.current
|
||||
val id = rememberShownGame(runningGame)
|
||||
if (id == null) {
|
||||
PanelNote(stringResource(R.string.bottom_guides_no_game))
|
||||
return
|
||||
}
|
||||
val game = id.toString()
|
||||
val scope = rememberCoroutineScope()
|
||||
val host = rememberMenuHost()
|
||||
val firstGame = remember { id }
|
||||
var reading by remember(id) { mutableStateOf(if (id == firstGame) SteamGuides.place(context, game)?.url else null) }
|
||||
var section by remember(id) { mutableStateOf(GuideSection.GUIDES) }
|
||||
var tag by remember(id) { mutableStateOf<String?>(null) }
|
||||
var list by remember(id) { mutableStateOf<GuideList>(GuideList.Loading) }
|
||||
var cookieHeader by remember(id) { mutableStateOf<String?>(null) }
|
||||
var name by remember(id) { mutableStateOf<String?>(null) }
|
||||
var openMap by remember(id) { mutableStateOf<File?>(null) }
|
||||
if (reading != null || openMap != null) FullScreenChrome()
|
||||
var libraryRevision by remember(id) { mutableIntStateOf(0) }
|
||||
var note by remember(id) { mutableStateOf<String?>(null) }
|
||||
LaunchedEffect(id) {
|
||||
val cookies = withContext(Dispatchers.IO) {
|
||||
runCatching {
|
||||
SteamWebLogin.read(LinuxRuntime.rootDir(context), SessionState.steamClientArch, File(context.cacheDir, "steam-web-login"))
|
||||
}.getOrDefault(emptyList())
|
||||
}
|
||||
val manager = CookieManager.getInstance()
|
||||
for (c in cookies) suspendCancellableCoroutine { cont -> manager.setCookie("https://${c.host}", c.header) { cont.resume(Unit) } }
|
||||
cookieHeader = cookies.filter { steamChatAllows(it.host) }.joinToString("; ") { it.header.substringBefore(';') }
|
||||
name = withContext(Dispatchers.IO) { IdleHome.overview(context, id)?.name }
|
||||
}
|
||||
LaunchedEffect(id, tag, cookieHeader) {
|
||||
val header = cookieHeader ?: return@LaunchedEffect
|
||||
list = GuideList.Loading
|
||||
list = withContext(Dispatchers.IO) { SteamGuides.list(id, header, tag) }?.let { GuideList.Found(it) } ?: GuideList.Failed
|
||||
}
|
||||
val pinnedMsg = stringResource(R.string.bottom_guides_pinned)
|
||||
val pinFailedMsg = stringResource(R.string.bottom_guides_pin_failed)
|
||||
val savedMsg = stringResource(R.string.bottom_guides_saved_note)
|
||||
openMap?.let { map ->
|
||||
MapViewer(map, onBack = { openMap = null; libraryRevision++ }, onDelete = {
|
||||
GuideLibrary.delete(map)
|
||||
openMap = null
|
||||
libraryRevision++
|
||||
})
|
||||
return
|
||||
}
|
||||
reading?.let { open ->
|
||||
// A new game or page needs a new WebView: its factory runs once and keeps the first page's callbacks.
|
||||
key(game, open) {
|
||||
GuideReaderPanel(
|
||||
url = open,
|
||||
scroll = SteamGuides.place(context, game)?.takeIf { it.url == open }?.scroll ?: 0f,
|
||||
note = note,
|
||||
onBack = { reading = null; note = null },
|
||||
onPlace = { url, s -> SteamGuides.savePlace(context, game, url, s) },
|
||||
onSave = { view ->
|
||||
val file = GuideLibrary.savedFile(context, game)
|
||||
val title = view.title.orEmpty()
|
||||
val url = view.url.orEmpty()
|
||||
view.saveWebArchive(file.path, false) { path ->
|
||||
if (path != null) {
|
||||
GuideLibrary.recordSaved(file, title, url)
|
||||
note = savedMsg
|
||||
libraryRevision++
|
||||
}
|
||||
}
|
||||
},
|
||||
onPin = { image ->
|
||||
scope.launch {
|
||||
val cookies = CookieManager.getInstance().getCookie(image)
|
||||
val file = withContext(Dispatchers.IO) { GuideLibrary.pin(context, game, image, cookies) }
|
||||
note = if (file != null) pinnedMsg else pinFailedMsg
|
||||
libraryRevision++
|
||||
}
|
||||
},
|
||||
onStopped = { reading = null },
|
||||
)
|
||||
}
|
||||
return
|
||||
}
|
||||
PanelColumn {
|
||||
TabStrip(GuideSection.entries.map { stringResource(it.label) }, section.ordinal, { section = GuideSection.entries[it] },
|
||||
modifier = Modifier.fillMaxWidth(), compact = true, centered = true)
|
||||
Column(Modifier.weight(1f).fillMaxWidth().verticalScroll(rememberScrollState())) {
|
||||
when (section) {
|
||||
GuideSection.GUIDES -> GuidesSection(host, list, tag, SteamGuides.place(context, game), onTag = { tag = it }, onOpen = { reading = it })
|
||||
GuideSection.ACHIEVEMENTS -> AchievementsSection(id)
|
||||
GuideSection.WIKI -> WikiSection(id, name, onOpen = { reading = it })
|
||||
GuideSection.MAPS -> MapsSection(id, game, name, libraryRevision, onOpenMap = { openMap = it }, onOpen = { reading = it })
|
||||
GuideSection.SAVED -> SavedSection(game, libraryRevision, onOpen = { reading = Uri.fromFile(it).toString() }, onDelete = {
|
||||
GuideLibrary.delete(it)
|
||||
libraryRevision++
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun GuidesSection(
|
||||
host: MenuHost, list: GuideList, tag: String?, last: SteamGuides.Place?, onTag: (String?) -> Unit, onOpen: (String) -> Unit,
|
||||
) {
|
||||
SettingsGroup(stringResource(R.string.bottom_guides_steam)) {
|
||||
if (last != null) PanelRow(stringResource(R.string.bottom_guides_continue), onClick = { onOpen(last.url) }, tag = "bottom-guides-continue",
|
||||
trailing = { SecondaryButton(stringResource(R.string.store_open), compact = true) { onOpen(last.url) } })
|
||||
ChoiceRow(host, "guides-tag", stringResource(R.string.bottom_guides_category), null,
|
||||
TAG_LABELS.map { (value, label) -> value to stringResource(label) }, tag) { onTag(it) }
|
||||
when (list) {
|
||||
GuideList.Loading -> PanelRow(stringResource(R.string.achievements_reading))
|
||||
GuideList.Failed -> PanelRow(stringResource(R.string.bottom_guides_failed))
|
||||
is GuideList.Found ->
|
||||
if (list.guides.isEmpty()) PanelRow(stringResource(R.string.bottom_guides_empty))
|
||||
else for (guide in list.guides) GuideRow(guide) { onOpen(guide.url) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun AchievementsSection(appId: Long) {
|
||||
val game = remember(appId) { SteamAchievements.game(appId) }
|
||||
val state = rememberAchievements(game) ?: return
|
||||
Box(Modifier.padding(top = 8.dp)) { AchievementsTab(SteamAchievements.label, state) }
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun WikiSection(appId: Long, name: String?, onOpen: (String) -> Unit) {
|
||||
val context = LocalContext.current
|
||||
var links by remember(appId) { mutableStateOf<List<GameLinks.Link>?>(null) }
|
||||
var tier by remember(appId) { mutableStateOf<String?>(null) }
|
||||
LaunchedEffect(appId, name) {
|
||||
val (found, t) = withContext(Dispatchers.IO) {
|
||||
val pending = async { GameLinks.protonTier(appId) }
|
||||
GameLinks.links(context, appId, name) to pending.await()
|
||||
}
|
||||
tier = t
|
||||
links = found
|
||||
}
|
||||
val open = stringResource(R.string.store_open)
|
||||
val found = links
|
||||
if (found == null) {
|
||||
SettingsGroup(stringResource(R.string.bottom_guides_wiki)) { PanelRow(stringResource(R.string.achievements_reading)) }
|
||||
return
|
||||
}
|
||||
tier?.let { t ->
|
||||
SettingsGroup(stringResource(R.string.fex_compatibility_label)) {
|
||||
PanelRow(stringResource(R.string.bottom_guides_protondb), tag = "guides-protondb", onClick = { onOpen("https://www.protondb.com/app/$appId") },
|
||||
trailing = { PanelValue(stringResource(tierLabel(t)), tierColor(t)) })
|
||||
}
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.bottom_guides_wiki)) {
|
||||
for (link in found.filter { it.kind != GameLinks.Kind.MAPGENIE }) PanelRow(stringResource(linkLabel(link.kind)), Uri.parse(link.url).host.orEmpty().removePrefix("www."),
|
||||
onClick = { onOpen(link.url) },
|
||||
trailing = { SecondaryButton(open, compact = true, modifier = Modifier.testTag("guides-link-${link.kind.name.lowercase()}")) { onOpen(link.url) } })
|
||||
}
|
||||
name?.let { n ->
|
||||
SettingsGroup(stringResource(R.string.bottom_guides_search)) {
|
||||
for (s in GameLinks.searches(n, found)) PanelRow(stringResource(searchLabel(s.id)), n, onClick = { onOpen(s.url) },
|
||||
trailing = { SecondaryButton(open, compact = true, modifier = Modifier.testTag("guides-search-${s.id}")) { onOpen(s.url) } })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun MapsSection(appId: Long, game: String, name: String?, revision: Int, onOpenMap: (File) -> Unit, onOpen: (String) -> Unit) {
|
||||
val context = LocalContext.current
|
||||
var maps by remember(game) { mutableStateOf<List<GuideLibrary.PinnedMap>>(emptyList()) }
|
||||
LaunchedEffect(game, revision) { maps = withContext(Dispatchers.IO) { GuideLibrary.maps(context, game) } }
|
||||
SettingsGroup(stringResource(R.string.bottom_guides_maps)) {
|
||||
if (maps.isEmpty()) PanelRow(stringResource(R.string.bottom_guides_maps_empty), stringResource(R.string.bottom_guides_pin_hint))
|
||||
maps.forEachIndexed { i, map ->
|
||||
PanelRow(
|
||||
stringResource(R.string.bottom_guides_map_name, i + 1), stringResource(R.string.bottom_guides_markers, map.markers.size),
|
||||
tag = "guides-map", onClick = { onOpenMap(map.file) },
|
||||
leading = {
|
||||
AsyncImage(model = map.file, contentDescription = null, contentScale = ContentScale.Crop,
|
||||
modifier = Modifier.size(64.dp, 40.dp).clip(RoundedCornerShape(6.dp)))
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
var mapSite by remember(name) { mutableStateOf<GameLinks.Link?>(null) }
|
||||
LaunchedEffect(name) {
|
||||
if (name != null) mapSite = withContext(Dispatchers.IO) { GameLinks.links(context, appId, name) }.firstOrNull { it.kind == GameLinks.Kind.MAPGENIE }
|
||||
}
|
||||
mapSite?.let { link ->
|
||||
val open = stringResource(R.string.store_open)
|
||||
SettingsGroup(stringResource(R.string.bottom_guides_find_maps)) {
|
||||
PanelRow(stringResource(R.string.bottom_guides_search_mapgenie), Uri.parse(link.url).run { host.orEmpty() + path.orEmpty() },
|
||||
onClick = { onOpen(link.url) },
|
||||
trailing = { SecondaryButton(open, compact = true, modifier = Modifier.testTag("guides-maps-mapgenie")) { onOpen(link.url) } })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun SavedSection(game: String, revision: Int, onOpen: (File) -> Unit, onDelete: (File) -> Unit) {
|
||||
val context = LocalContext.current
|
||||
var saved by remember(game) { mutableStateOf<List<GuideLibrary.Saved>>(emptyList()) }
|
||||
LaunchedEffect(game, revision) { saved = withContext(Dispatchers.IO) { GuideLibrary.saved(context, game) } }
|
||||
val delete = stringResource(R.string.common_delete)
|
||||
SettingsGroup(stringResource(R.string.bottom_guides_saved)) {
|
||||
if (saved.isEmpty()) PanelRow(stringResource(R.string.bottom_guides_saved_empty), stringResource(R.string.bottom_guides_saved_hint))
|
||||
for (page in saved) PanelRow(page.title, Uri.parse(page.url).host.orEmpty().removePrefix("www."), tag = "guides-saved",
|
||||
onClick = { onOpen(page.file) },
|
||||
trailing = { SecondaryButton(delete, compact = true, modifier = Modifier.testTag("guides-saved-delete")) { onDelete(page.file) } })
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun GuideReaderPanel(
|
||||
url: String,
|
||||
scroll: Float,
|
||||
note: String?,
|
||||
onBack: () -> Unit,
|
||||
onPlace: (String, Float) -> Unit,
|
||||
onSave: (WebView) -> Unit,
|
||||
onPin: (String) -> Unit,
|
||||
onStopped: () -> Unit,
|
||||
) {
|
||||
val pal = LocalPalette.current
|
||||
var view by remember { mutableStateOf<WebView?>(null) }
|
||||
var image by remember(url) { mutableStateOf<String?>(null) }
|
||||
val local = url.startsWith("file:")
|
||||
PanelColumn {
|
||||
Row(Modifier.fillMaxWidth().padding(bottom = 4.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
BackLink(stringResource(R.string.mode_back), compact = true, onClick = onBack)
|
||||
Text(note ?: stringResource(R.string.bottom_guides_pin_hint), fontSize = 11.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f))
|
||||
image?.let { img -> SecondaryButton(stringResource(R.string.bottom_guides_pin), compact = true, modifier = Modifier.testTag("bottom-guides-pin")) { onPin(img); image = null } }
|
||||
if (!local) SecondaryButton(stringResource(R.string.game_env_save), compact = true, modifier = Modifier.testTag("bottom-guides-save")) { view?.let(onSave) }
|
||||
}
|
||||
Box(Modifier.weight(1f).fillMaxWidth().padding(bottom = 6.dp).clip(RoundedCornerShape(14.dp)).border(1.dp, pal.line, RoundedCornerShape(14.dp))) {
|
||||
GuideReader(url, scroll, onPlace, onStopped, onView = { view = it }, onImage = { image = it })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun GuideRow(guide: SteamGuides.Guide, onOpen: () -> Unit) {
|
||||
val pal = LocalPalette.current
|
||||
PanelRow(
|
||||
guide.title,
|
||||
listOfNotNull(guide.author.takeIf { it.isNotEmpty() }, "★".repeat(guide.stars).takeIf { it.isNotEmpty() }).joinToString(" · "),
|
||||
tag = "guide-${guide.id}", onClick = onOpen,
|
||||
leading = {
|
||||
Box(Modifier.size(40.dp).clip(RoundedCornerShape(6.dp)).background(pal.line)) {
|
||||
if (guide.preview != null) AsyncImage(model = guide.preview, contentDescription = null, contentScale = ContentScale.Crop, modifier = Modifier.fillMaxSize())
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
internal object ReaderAds {
|
||||
private val HOSTS = setOf(
|
||||
"doubleclick.net", "googlesyndication.com", "googleadservices.com", "adservice.google.com", "google-analytics.com",
|
||||
"googletagservices.com", "googletagmanager.com", "amazon-adsystem.com", "adnxs.com", "criteo.com", "criteo.net",
|
||||
"taboola.com", "outbrain.com", "pubmatic.com", "rubiconproject.com", "casalemedia.com", "openx.net", "moatads.com",
|
||||
"scorecardresearch.com", "quantserve.com", "adsafeprotected.com", "3lift.com", "sharethrough.com", "teads.tv",
|
||||
"yieldmo.com", "media.net", "smartadserver.com", "adform.net", "bidswitch.net", "lijit.com", "sonobi.com",
|
||||
"indexww.com", "gumgum.com", "nativo.com", "zemanta.com", "primis.tech", "connatix.com", "playwire.com",
|
||||
"fandomadtags.com", "kargo.com", "33across.com", "onetag-sys.com", "adsrvr.org", "id5-sync.com", "ezoic.net",
|
||||
"ezojs.com", "mediavine.com", "intergient.com", "nitropay.com", "freestar.io", "pbxai.com",
|
||||
)
|
||||
|
||||
fun blocks(host: String?): Boolean {
|
||||
var h = host?.lowercase() ?: return false
|
||||
while (true) {
|
||||
if (h in HOSTS) return true
|
||||
val dot = h.indexOf('.')
|
||||
if (dot < 0 || h.indexOf('.', dot + 1) < 0) return false
|
||||
h = h.substring(dot + 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private const val REDIRECT_GRACE_MS = 10_000L
|
||||
|
||||
internal fun readerAllows(start: String, target: Uri, userInitiated: Boolean): Boolean {
|
||||
val host = target.host ?: return false
|
||||
if (target.scheme != "https" && target.scheme != "http") return false
|
||||
if (steamChatAllows(host) || userInitiated) return true
|
||||
val home = Uri.parse(start).host?.let(::siteOf) ?: return false
|
||||
return siteOf(host) == home
|
||||
}
|
||||
|
||||
private fun siteOf(host: String): String = host.split('.').takeLast(2).joinToString(".")
|
||||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
@Composable
|
||||
private fun GuideReader(
|
||||
url: String, scroll: Float, onPlace: (String, Float) -> Unit, onStopped: () -> Unit,
|
||||
onView: (WebView?) -> Unit, onImage: (String) -> Unit,
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
AndroidView(factory = { ctx ->
|
||||
WebView(ctx).apply {
|
||||
layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
||||
isFocusable = false
|
||||
isFocusableInTouchMode = false
|
||||
setBackgroundColor(0xFF1B2838.toInt())
|
||||
settings.javaScriptEnabled = true
|
||||
settings.domStorageEnabled = true
|
||||
settings.allowContentAccess = false
|
||||
settings.allowFileAccess = url.startsWith("file:") && GuideLibrary.isSaved(context, File(Uri.parse(url).path.orEmpty()))
|
||||
var restore = scroll
|
||||
// Opening the page and each tapped link may redirect off the site for a moment; a page's own navigation may not.
|
||||
var approvedUntil = android.os.SystemClock.uptimeMillis() + REDIRECT_GRACE_MS
|
||||
webViewClient = object : WebViewClient() {
|
||||
override fun shouldOverrideUrlLoading(view: WebView, request: WebResourceRequest): Boolean {
|
||||
val now = android.os.SystemClock.uptimeMillis()
|
||||
if (request.hasGesture()) approvedUntil = now + REDIRECT_GRACE_MS
|
||||
return !readerAllows(url, request.url, request.hasGesture() || (request.isRedirect && now < approvedUntil))
|
||||
}
|
||||
|
||||
override fun shouldInterceptRequest(view: WebView, request: WebResourceRequest): android.webkit.WebResourceResponse? =
|
||||
if (ReaderAds.blocks(request.url.host)) android.webkit.WebResourceResponse("text/plain", "utf-8", java.io.ByteArrayInputStream(ByteArray(0)))
|
||||
else null
|
||||
|
||||
override fun onPageFinished(view: WebView, url: String) {
|
||||
if (restore > 0f) {
|
||||
val ratio = restore
|
||||
restore = 0f
|
||||
view.postDelayed({ view.scrollTo(0, (view.contentHeight * view.scale * ratio).toInt()) }, 400)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onRenderProcessGone(view: WebView, detail: RenderProcessGoneDetail): Boolean {
|
||||
onStopped()
|
||||
return true
|
||||
}
|
||||
}
|
||||
setOnLongClickListener { v ->
|
||||
val hit = (v as WebView).hitTestResult
|
||||
val src = hit.extra
|
||||
if ((hit.type == WebView.HitTestResult.IMAGE_TYPE || hit.type == WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) &&
|
||||
src != null && src.startsWith("http")) {
|
||||
onImage(src)
|
||||
true
|
||||
} else false
|
||||
}
|
||||
setOnScrollChangeListener { v, _, y, _, _ ->
|
||||
val web = v as WebView
|
||||
val height = web.contentHeight * web.scale
|
||||
val current = web.url ?: return@setOnScrollChangeListener
|
||||
if (height > 0) onPlace(current, y / height)
|
||||
}
|
||||
onView(this)
|
||||
loadUrl(url)
|
||||
}
|
||||
}, modifier = Modifier.fillMaxSize(), onRelease = { view ->
|
||||
view.url?.let { current -> onPlace(current, view.scrollY / (view.contentHeight * view.scale).coerceAtLeast(1f)) }
|
||||
onView(null)
|
||||
view.destroy()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@Composable
|
||||
private fun MapViewer(file: File, onBack: () -> Unit, onDelete: () -> Unit) {
|
||||
var image by remember(file) { mutableStateOf<ImageBitmap?>(null) }
|
||||
var markers by remember(file) { mutableStateOf(GuideLibrary.markers(file)) }
|
||||
var scale by remember(file) { mutableFloatStateOf(1f) }
|
||||
var offset by remember(file) { mutableStateOf(Offset.Zero) }
|
||||
LaunchedEffect(file) { image = withContext(Dispatchers.IO) { decodeMap(file) } }
|
||||
val pal = LocalPalette.current
|
||||
PanelColumn {
|
||||
Row(Modifier.fillMaxWidth().padding(bottom = 4.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
BackLink(stringResource(R.string.mode_back), compact = true, onClick = onBack)
|
||||
Text(stringResource(R.string.bottom_guides_marker_hint), fontSize = 11.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
modifier = Modifier.weight(1f), maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
SecondaryButton(stringResource(R.string.common_delete), compact = true, modifier = Modifier.testTag("guides-map-delete"), onClick = onDelete)
|
||||
}
|
||||
Box(
|
||||
Modifier.weight(1f).fillMaxWidth().padding(bottom = 6.dp).clip(RoundedCornerShape(14.dp)).background(Color.Black)
|
||||
.border(1.dp, pal.line, RoundedCornerShape(14.dp))
|
||||
.pointerInput(file) {
|
||||
detectTransformGestures { _, pan, zoom, _ ->
|
||||
scale = (scale * zoom).coerceIn(1f, MAX_ZOOM)
|
||||
offset = if (scale == 1f) Offset.Zero else offset + pan
|
||||
}
|
||||
},
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
val img = image ?: return@Box
|
||||
Box(
|
||||
Modifier.aspectRatio(img.width.toFloat() / img.height)
|
||||
.graphicsLayer(scaleX = scale, scaleY = scale, translationX = offset.x, translationY = offset.y)
|
||||
.pointerInput(file) {
|
||||
detectTapGestures(
|
||||
onDoubleTap = { p ->
|
||||
if (scale > 1f) {
|
||||
scale = 1f
|
||||
offset = Offset.Zero
|
||||
} else {
|
||||
scale = DOUBLE_TAP_ZOOM
|
||||
offset = Offset((size.width / 2f - p.x) * DOUBLE_TAP_ZOOM, (size.height / 2f - p.y) * DOUBLE_TAP_ZOOM)
|
||||
}
|
||||
},
|
||||
onLongPress = { p ->
|
||||
markers = markers + (p.x / size.width to p.y / size.height)
|
||||
GuideLibrary.saveMarkers(file, markers)
|
||||
},
|
||||
onTap = { p ->
|
||||
val hit = markers.minByOrNull { (x, y) -> MapMarkers.distance(x * size.width, y * size.height, p.x, p.y) }
|
||||
if (hit != null && MapMarkers.distance(hit.first * size.width, hit.second * size.height, p.x, p.y) < MARKER_HIT_PX * density / scale) {
|
||||
markers = markers - hit
|
||||
GuideLibrary.saveMarkers(file, markers)
|
||||
}
|
||||
},
|
||||
)
|
||||
},
|
||||
) {
|
||||
Image(img, null, Modifier.fillMaxSize(), contentScale = ContentScale.FillBounds)
|
||||
Canvas(Modifier.fillMaxSize()) {
|
||||
for ((x, y) in markers) {
|
||||
val c = Offset(x * size.width, y * size.height)
|
||||
drawCircle(Color.Black.copy(alpha = 0.6f), radius = 9.dp.toPx() / scale, center = c)
|
||||
drawCircle(pal.signal, radius = 6.dp.toPx() / scale, center = c)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal object MapMarkers {
|
||||
fun distance(x0: Float, y0: Float, x1: Float, y1: Float): Float = kotlin.math.hypot(x0 - x1, y0 - y1)
|
||||
|
||||
fun sampleSize(width: Int, height: Int, longest: Int): Int {
|
||||
var sample = 1
|
||||
while (maxOf(width, height) / sample > longest) sample *= 2
|
||||
return sample
|
||||
}
|
||||
}
|
||||
|
||||
private fun decodeMap(file: File): ImageBitmap? = runCatching {
|
||||
val bounds = BitmapFactory.Options().apply { inJustDecodeBounds = true }
|
||||
BitmapFactory.decodeFile(file.path, bounds)
|
||||
val opts = BitmapFactory.Options().apply { inSampleSize = MapMarkers.sampleSize(bounds.outWidth, bounds.outHeight, MAP_LONGEST) }
|
||||
BitmapFactory.decodeFile(file.path, opts)?.asImageBitmap()
|
||||
}.getOrNull()
|
||||
|
||||
private const val MAX_ZOOM = 8f
|
||||
private const val DOUBLE_TAP_ZOOM = 2.5f
|
||||
private const val MARKER_HIT_PX = 20f
|
||||
private const val MAP_LONGEST = 4096
|
||||
private fun linkLabel(kind: GameLinks.Kind): Int = when (kind) {
|
||||
GameLinks.Kind.WIKI -> R.string.bottom_guides_link_wiki
|
||||
GameLinks.Kind.STRATEGYWIKI -> R.string.bottom_guides_link_strategywiki
|
||||
GameLinks.Kind.PCGAMINGWIKI -> R.string.bottom_guides_link_pcgw
|
||||
GameLinks.Kind.GAMEFAQS -> R.string.bottom_guides_link_gamefaqs
|
||||
GameLinks.Kind.IGN -> R.string.bottom_guides_link_ign
|
||||
GameLinks.Kind.HOWLONGTOBEAT -> R.string.bottom_guides_link_hltb
|
||||
GameLinks.Kind.MAPGENIE -> R.string.bottom_guides_search_mapgenie
|
||||
}
|
||||
|
||||
private fun searchLabel(id: String): Int = when (id) {
|
||||
"youtube" -> R.string.bottom_guides_search_youtube
|
||||
else -> R.string.bottom_guides_link_gamefaqs
|
||||
}
|
||||
|
||||
private fun tierLabel(tier: String): Int = when (tier) {
|
||||
"platinum" -> R.string.bottom_guides_tier_platinum
|
||||
"gold" -> R.string.bottom_guides_tier_gold
|
||||
"silver" -> R.string.bottom_guides_tier_silver
|
||||
"bronze" -> R.string.bottom_guides_tier_bronze
|
||||
else -> R.string.bottom_guides_tier_borked
|
||||
}
|
||||
|
||||
private fun tierColor(tier: String): Color = when (tier) {
|
||||
"platinum" -> Color(0xFFB4C7DC)
|
||||
"gold" -> Color(0xFFCFB53B)
|
||||
"silver" -> Color(0xFFA6A6A6)
|
||||
"bronze" -> Color(0xFFCD7F32)
|
||||
else -> Color(0xFFFF6B6B)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.text.format.DateUtils
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.agent.AgentGuest
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.session.SteamLocalConfig
|
||||
import java.io.File
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.isActive
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
data class IdleGame(
|
||||
val appId: Int,
|
||||
val name: String,
|
||||
val art: File?,
|
||||
val playtimeMinutes: Long,
|
||||
val lastPlayed: Long,
|
||||
val highlighted: Boolean,
|
||||
val logo: File? = null,
|
||||
)
|
||||
|
||||
internal object IdleHome {
|
||||
fun pick(games: List<Library.SteamGame>, selected: Long?): Pair<Library.SteamGame, Boolean>? {
|
||||
games.firstOrNull { selected != null && it.appId.toLong() == selected }?.let { return it to true }
|
||||
return games.filter { it.lastPlayed > 0 }.maxByOrNull { it.lastPlayed }?.let { it to false }
|
||||
}
|
||||
|
||||
class Overview(val name: String, val minutes: Long, val lastPlayed: Long)
|
||||
|
||||
fun overviewExpression(appId: Long): String = "(() => { const o = globalThis.appStore?.GetAppOverviewByAppID?.($appId); " +
|
||||
"return o ? JSON.stringify({name: o.display_name, minutes: o.minutes_playtime_forever, last: o.rt_last_time_played}) : null; })()"
|
||||
|
||||
fun parseOverview(json: String?): Overview? = runCatching {
|
||||
val o = org.json.JSONObject(json ?: return null)
|
||||
Overview(o.optString("name").ifEmpty { return null }, o.optLong("minutes"), o.optLong("last"))
|
||||
}.getOrNull()
|
||||
|
||||
internal fun overview(context: Context, appId: Long): Overview? = runCatching {
|
||||
val answer = AgentGuest.steamEval(context, overviewExpression(appId), 4_000)
|
||||
if (!answer.optBoolean("ok")) null else parseOverview(answer.opt("value")?.takeIf { it != org.json.JSONObject.NULL }?.toString())
|
||||
}.getOrNull()
|
||||
|
||||
fun load(context: Context, games: List<Library.SteamGame>, selected: Long?): IdleGame? {
|
||||
if (selected != null) overview(context, selected)?.let { o ->
|
||||
val id = selected.toInt()
|
||||
val known = games.firstOrNull { it.appId == id }
|
||||
val cache = File(SessionPrefs.activeSteamRoot(context), "appcache/librarycache")
|
||||
val art = known?.let { it.hero ?: it.art } ?: runCatching {
|
||||
Library.steamCacheImage(cache, id, listOf("library_hero.jpg", "library_600x900.jpg", "header.jpg"))
|
||||
}.getOrNull()
|
||||
val logo = known?.logo ?: runCatching { Library.steamCacheImage(cache, id, Library.STEAM_LOGOS) }.getOrNull()
|
||||
return IdleGame(id, o.name, art, o.minutes, o.lastPlayed, highlighted = true, logo = logo)
|
||||
}
|
||||
val (game, highlighted) = pick(games, selected) ?: return null
|
||||
val stats = runCatching { SteamLocalConfig.appStats(SessionPrefs.activeSteamRoot(context), game.appId) }.getOrNull()
|
||||
return IdleGame(
|
||||
game.appId, game.name, game.hero ?: game.art, stats?.playtimeMinutes ?: 0L,
|
||||
maxOf(stats?.lastPlayed ?: 0L, game.lastPlayed), highlighted, game.logo,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private const val SELECTION_MS = 2_000L
|
||||
|
||||
@Composable
|
||||
internal fun rememberShownGame(runningGame: () -> String?): Long? {
|
||||
val context = LocalContext.current
|
||||
var appId by remember { mutableStateOf(runningGame()?.toLongOrNull()) }
|
||||
LaunchedEffect(Unit) {
|
||||
while (isActive) {
|
||||
appId = runningGame()?.toLongOrNull()
|
||||
?: withContext(Dispatchers.IO) { runCatching { AgentGuest.selectedSteamAppId(context) }.getOrNull() }
|
||||
delay(SELECTION_MS)
|
||||
}
|
||||
}
|
||||
return appId
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun idleDetails(game: IdleGame): String {
|
||||
val hours = game.playtimeMinutes / 60
|
||||
val played = when {
|
||||
game.playtimeMinutes <= 0 -> stringResource(R.string.bottom_idle_never)
|
||||
hours == 0L -> stringResource(R.string.bottom_idle_minutes, game.playtimeMinutes.toInt())
|
||||
else -> stringResource(R.string.bottom_idle_hours, hours.toInt())
|
||||
}
|
||||
if (game.lastPlayed <= 0) return played
|
||||
val last = DateUtils.getRelativeTimeSpanString(game.lastPlayed * 1000, System.currentTimeMillis(), DateUtils.MINUTE_IN_MILLIS)
|
||||
return stringResource(R.string.bottom_idle_details, played, last)
|
||||
}
|
||||
@@ -0,0 +1,285 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.RectF
|
||||
import androidx.compose.foundation.Canvas
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.gestures.detectDragGestures
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.BoxWithConstraints
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.aspectRatio
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.DisposableEffect
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.foundation.layout.widthIn
|
||||
import androidx.compose.runtime.mutableIntStateOf
|
||||
import androidx.compose.runtime.key
|
||||
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.geometry.Offset
|
||||
import androidx.compose.ui.geometry.Size
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.FilterQuality
|
||||
import androidx.compose.ui.graphics.ImageBitmap
|
||||
import androidx.compose.ui.graphics.asImageBitmap
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.input.pointer.pointerInput
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
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
|
||||
import kotlin.coroutines.resume
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
import kotlin.math.roundToInt
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.isActive
|
||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
|
||||
internal enum class MirrorHide(val id: String, val label: Int) {
|
||||
OFF("off", R.string.bottom_mirror_hide_off),
|
||||
BLACK("black", R.string.bottom_mirror_hide_black),
|
||||
DIM("dim", R.string.bottom_mirror_hide_dim);
|
||||
|
||||
fun next(): MirrorHide = entries[(ordinal + 1) % entries.size]
|
||||
|
||||
companion object {
|
||||
fun from(id: String?): MirrorHide = entries.firstOrNull { it.id == id } ?: OFF
|
||||
}
|
||||
}
|
||||
|
||||
internal object MirrorRegion {
|
||||
const val MIN_SIZE = 0.02f
|
||||
|
||||
fun parse(text: String?): RectF? {
|
||||
val v = text?.split(',')?.mapNotNull { it.trim().toFloatOrNull() }?.takeIf { it.size == 4 } ?: return null
|
||||
return normalize(v[0], v[1], v[2], v[3])
|
||||
}
|
||||
|
||||
fun format(r: RectF): String = listOf(r.left, r.top, r.right, r.bottom).joinToString(",") { it.toString() }
|
||||
|
||||
fun normalize(x0: Float, y0: Float, x1: Float, y1: Float): RectF? {
|
||||
val r = RectF(min(x0, x1).coerceIn(0f, 1f), min(y0, y1).coerceIn(0f, 1f), max(x0, x1).coerceIn(0f, 1f), max(y0, y1).coerceIn(0f, 1f))
|
||||
return r.takeIf { it.width() >= MIN_SIZE && it.height() >= MIN_SIZE }
|
||||
}
|
||||
|
||||
fun outputSize(r: RectF, sourceAspect: Float, longest: Int): Pair<Int, Int> {
|
||||
val w = r.width() * sourceAspect
|
||||
val h = r.height()
|
||||
return if (w >= h) longest to max(1, (longest * h / w).roundToInt()) else max(1, (longest * w / h).roundToInt()) to longest
|
||||
}
|
||||
}
|
||||
|
||||
private const val FRAME_MS = 66L
|
||||
private const val COMPOSED_SETTLE_MS = 250L
|
||||
private const val EDIT_LONGEST = 960
|
||||
private const val EDIT_TRIES = 3
|
||||
private const val EDIT_RETRY_MS = 500L
|
||||
private const val LIVE_LONGEST = 720
|
||||
|
||||
@Composable
|
||||
internal fun MirrorPanel(actions: BottomPageActions) {
|
||||
val context = LocalContext.current
|
||||
val copy = actions.copyRegion
|
||||
if (copy == null) {
|
||||
MirrorNote(stringResource(R.string.bottom_mirror_no_frame))
|
||||
return
|
||||
}
|
||||
DisposableEffect(Unit) {
|
||||
actions.holdComposed(true)
|
||||
onDispose { actions.holdComposed(false) }
|
||||
}
|
||||
val game = actions.gameKey() ?: "steam"
|
||||
var region by remember(game) { mutableStateOf(MirrorRegion.parse(SessionPrefs.mirrorRegion(context, game))) }
|
||||
var editing by remember(game) { mutableStateOf(region == null) }
|
||||
var sharp by remember { mutableStateOf(true) }
|
||||
val host = rememberMenuHost()
|
||||
if (editing) {
|
||||
// A game change must not carry the last game's still or pick into this one's editor.
|
||||
key(game) {
|
||||
MirrorEditor(copy, region, actions.sourceAspect(),
|
||||
onSave = {
|
||||
region = it
|
||||
SessionPrefs.setMirrorRegion(context, game, MirrorRegion.format(it))
|
||||
editing = false
|
||||
},
|
||||
onCancel = if (region != null) ({ editing = false }) else null)
|
||||
}
|
||||
return
|
||||
}
|
||||
val r = region ?: return
|
||||
var hide by remember(game) { mutableStateOf(MirrorHide.from(SessionPrefs.mirrorHide(context, game))) }
|
||||
DisposableEffect(r, hide) {
|
||||
actions.maskRegion(r.takeIf { hide != MirrorHide.OFF }, hide == MirrorHide.DIM)
|
||||
onDispose { actions.maskRegion(null, false) }
|
||||
}
|
||||
var frame by remember(r) { mutableStateOf<ImageBitmap?>(null) }
|
||||
var failed by remember(r) { mutableStateOf(false) }
|
||||
LaunchedEffect(r) {
|
||||
while (isActive) {
|
||||
val (w, h) = MirrorRegion.outputSize(r, actions.sourceAspect(), LIVE_LONGEST)
|
||||
val bitmap = capture(copy, r, w, h)
|
||||
failed = bitmap == null
|
||||
if (bitmap != null) frame = bitmap.asImageBitmap()
|
||||
delay(FRAME_MS)
|
||||
}
|
||||
}
|
||||
val pal = LocalPalette.current
|
||||
DisposableEffect(Unit) { onDispose { MirrorOptions.open.value = false } }
|
||||
Box(Modifier.fillMaxSize().background(Color.Black), contentAlignment = Alignment.Center) {
|
||||
val f = frame
|
||||
if (f != null) Image(f, null, Modifier.fillMaxSize(), contentScale = ContentScale.Fit,
|
||||
filterQuality = if (sharp) FilterQuality.None else FilterQuality.Medium)
|
||||
else if (failed) MirrorNote(stringResource(R.string.bottom_mirror_no_frame))
|
||||
if (MirrorOptions.open.value) Box(
|
||||
Modifier.fillMaxSize().clickable(remember { MutableInteractionSource() }, indication = null) { MirrorOptions.open.value = false },
|
||||
contentAlignment = Alignment.TopEnd,
|
||||
) {
|
||||
val shape = RoundedCornerShape(16.dp)
|
||||
Column(
|
||||
Modifier.padding(12.dp).widthIn(max = 380.dp).fillMaxWidth().testTag("bottom-mirror-options").clip(shape).background(MaterialTheme.colorScheme.background)
|
||||
.border(1.dp, pal.line, shape).clickable(remember { MutableInteractionSource() }, indication = null) {}
|
||||
.padding(horizontal = 10.dp, vertical = 4.dp),
|
||||
) {
|
||||
SettingsGroup(stringResource(R.string.bottom_page_mirror)) {
|
||||
ActionRow(stringResource(R.string.bottom_mirror_region), null, stringResource(R.string.game_env_edit),
|
||||
onClick = { MirrorOptions.open.value = false; editing = true },
|
||||
modifier = Modifier.testTag("bottom-mirror-edit"))
|
||||
ChoiceRow(host, "mirror-hide", stringResource(R.string.bottom_mirror_top), null,
|
||||
MirrorHide.entries.map { it to stringResource(it.label) }, hide) {
|
||||
hide = it
|
||||
SessionPrefs.setMirrorHide(context, game, it.id)
|
||||
}
|
||||
ChoiceRow(host, "mirror-scaling", stringResource(R.string.bottom_mirror_scaling), null,
|
||||
listOf(true to stringResource(R.string.bottom_mirror_sharp), false to stringResource(R.string.bottom_mirror_smooth)), sharp) {
|
||||
sharp = it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Whether the mirror's options card is open, toggled from the bar so the mirror keeps the whole panel. */
|
||||
internal object MirrorOptions {
|
||||
val open = androidx.compose.runtime.mutableStateOf(false)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun MirrorEditor(
|
||||
copy: (RectF?, Int, Int, (Bitmap?) -> Unit) -> Unit,
|
||||
current: RectF?,
|
||||
sourceAspect: Float,
|
||||
onSave: (RectF) -> Unit,
|
||||
onCancel: (() -> Unit)?,
|
||||
) {
|
||||
val pal = LocalPalette.current
|
||||
var still by remember { mutableStateOf<ImageBitmap?>(null) }
|
||||
var failed by remember { mutableStateOf(false) }
|
||||
var start by remember { mutableStateOf<Offset?>(null) }
|
||||
var end by remember { mutableStateOf<Offset?>(null) }
|
||||
var picked by remember { mutableStateOf(current) }
|
||||
var attempt by remember { mutableIntStateOf(0) }
|
||||
LaunchedEffect(attempt) {
|
||||
delay(COMPOSED_SETTLE_MS)
|
||||
val (w, h) = MirrorRegion.outputSize(RectF(0f, 0f, 1f, 1f), sourceAspect, EDIT_LONGEST)
|
||||
// The surface can be briefly invalid while the session settles, so a failed still is retried a few times.
|
||||
var bitmap: Bitmap? = null
|
||||
for (i in 0 until EDIT_TRIES) {
|
||||
bitmap = capture(copy, null, w, h)
|
||||
if (bitmap != null) break
|
||||
delay(EDIT_RETRY_MS)
|
||||
}
|
||||
failed = bitmap == null
|
||||
still = bitmap?.asImageBitmap()
|
||||
}
|
||||
PanelColumn {
|
||||
Row(Modifier.fillMaxWidth().padding(bottom = 6.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
onCancel?.let { BackLink(stringResource(R.string.common_cancel), compact = true, onClick = it) }
|
||||
Text(stringResource(R.string.bottom_mirror_pick), fontSize = 11.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f))
|
||||
SecondaryButton(stringResource(R.string.bottom_mirror_save), enabled = picked != null, compact = true,
|
||||
modifier = Modifier.testTag("bottom-mirror-save")) { picked?.let(onSave) }
|
||||
}
|
||||
BoxWithConstraints(Modifier.weight(1f).fillMaxWidth().padding(bottom = 6.dp), contentAlignment = Alignment.Center) {
|
||||
val image = still
|
||||
if (image == null) {
|
||||
if (failed) Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Text(stringResource(R.string.bottom_mirror_no_frame), fontSize = 15.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
textAlign = TextAlign.Center, modifier = Modifier.padding(24.dp))
|
||||
SecondaryButton(stringResource(R.string.agent_retry), compact = true) { failed = false; attempt++ }
|
||||
}
|
||||
return@BoxWithConstraints
|
||||
}
|
||||
Box(Modifier.aspectRatio(image.width.toFloat() / image.height).clip(RoundedCornerShape(8.dp))) {
|
||||
Image(image, null, Modifier.fillMaxSize(), contentScale = ContentScale.FillBounds)
|
||||
Canvas(Modifier.fillMaxSize().pointerInput(Unit) {
|
||||
detectDragGestures(
|
||||
onDragStart = { start = it; end = it },
|
||||
onDrag = { change, _ -> end = change.position },
|
||||
onDragEnd = {
|
||||
val a = start
|
||||
val b = end
|
||||
if (a != null && b != null) MirrorRegion.normalize(a.x / size.width, a.y / size.height, b.x / size.width, b.y / size.height)
|
||||
?.let { picked = it }
|
||||
start = null
|
||||
end = null
|
||||
},
|
||||
)
|
||||
}) {
|
||||
val a = start
|
||||
val b = end
|
||||
val shown = if (a != null && b != null) RectF(min(a.x, b.x), min(a.y, b.y), max(a.x, b.x), max(a.y, b.y))
|
||||
else picked?.let { RectF(it.left * size.width, it.top * size.height, it.right * size.width, it.bottom * size.height) }
|
||||
if (shown != null) {
|
||||
val veil = Color.Black.copy(alpha = 0.5f)
|
||||
drawRect(veil, Offset.Zero, Size(size.width, shown.top))
|
||||
drawRect(veil, Offset(0f, shown.bottom), Size(size.width, size.height - shown.bottom))
|
||||
drawRect(veil, Offset(0f, shown.top), Size(shown.left, shown.height()))
|
||||
drawRect(veil, Offset(shown.right, shown.top), Size(size.width - shown.right, shown.height()))
|
||||
drawRect(pal.signal, Offset(shown.left, shown.top), Size(shown.width(), shown.height()), style = Stroke(3.dp.toPx()))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun MirrorNote(text: String) {
|
||||
Box(Modifier.fillMaxSize()) {
|
||||
Text(text, fontSize = 15.sp, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.Center,
|
||||
modifier = Modifier.align(Alignment.Center).padding(24.dp))
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun capture(copy: (RectF?, Int, Int, (Bitmap?) -> Unit) -> Unit, region: RectF?, width: Int, height: Int): Bitmap? =
|
||||
suspendCancellableCoroutine { cont -> copy(region, width, height) { if (cont.isActive) cont.resume(it) else it?.recycle() } }
|
||||
@@ -27,6 +27,11 @@ class BottomPageActions(
|
||||
val takeScreenshot: ((onDone: (Boolean) -> Unit) -> Unit)? = null,
|
||||
val fps: () -> Float? = { null },
|
||||
val runningGame: () -> String? = { null },
|
||||
val gameKey: () -> String? = runningGame,
|
||||
val copyRegion: ((android.graphics.RectF?, Int, Int, (android.graphics.Bitmap?) -> Unit) -> Unit)? = null,
|
||||
val sourceAspect: () -> Float = { 16f / 9f },
|
||||
val holdComposed: (Boolean) -> Unit = {},
|
||||
val maskRegion: (android.graphics.RectF?, Boolean) -> Unit = { _, _ -> },
|
||||
)
|
||||
|
||||
internal const val BOTTOM_PAGE_TELEMETRY = "telemetry"
|
||||
|
||||
@@ -25,6 +25,11 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.Close
|
||||
import androidx.compose.material.icons.outlined.Dashboard
|
||||
import androidx.compose.material.icons.outlined.Extension
|
||||
import androidx.compose.material.icons.outlined.ViewSidebar
|
||||
import androidx.compose.material.icons.outlined.Wallpaper
|
||||
import androidx.compose.material.icons.outlined.CropFree
|
||||
import androidx.compose.material.icons.outlined.MenuBook
|
||||
import androidx.compose.material.icons.outlined.DesktopAccessDisabled
|
||||
import androidx.compose.material.icons.outlined.DesktopWindows
|
||||
import androidx.compose.material.icons.outlined.ExpandLess
|
||||
@@ -236,6 +241,10 @@ internal val SecondScreenMode.icon: ImageVector get() = when (this) {
|
||||
SecondScreenMode.DECK_CONTROLS -> Icons.Outlined.SportsEsports
|
||||
SecondScreenMode.CUSTOM_CONTROLS -> Icons.Outlined.Tune
|
||||
SecondScreenMode.DASHBOARD -> Icons.Outlined.Dashboard
|
||||
SecondScreenMode.GUIDES -> Icons.Outlined.MenuBook
|
||||
SecondScreenMode.MIRROR -> Icons.Outlined.CropFree
|
||||
SecondScreenMode.STEAM_QAM -> Icons.Outlined.ViewSidebar
|
||||
SecondScreenMode.ART -> Icons.Outlined.Wallpaper
|
||||
SecondScreenMode.DESKTOP -> Icons.Outlined.DesktopWindows
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.ColumnScope
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.droiddeck.launcher.input.SecondScreenMode
|
||||
|
||||
@Composable
|
||||
internal fun BottomSessionPanel(mode: SecondScreenMode, actions: BottomPageActions) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
Box(Modifier.fillMaxSize().background(colors.background)) {
|
||||
CompositionLocalProvider(LocalChipMinWidth provides 96.dp, LocalCompactSettings provides true) {
|
||||
when (mode) {
|
||||
SecondScreenMode.GUIDES -> GuidesPanel(actions.runningGame)
|
||||
SecondScreenMode.MIRROR -> MirrorPanel(actions)
|
||||
SecondScreenMode.STEAM_QAM -> SteamQamPanel()
|
||||
SecondScreenMode.ART -> ArtPanel(actions.runningGame)
|
||||
else -> Unit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun PanelColumn(modifier: Modifier = Modifier, content: @Composable ColumnScope.() -> Unit) {
|
||||
Column(modifier.fillMaxSize().padding(horizontal = 14.dp, vertical = 6.dp), verticalArrangement = Arrangement.spacedBy(2.dp), content = content)
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun PanelRow(
|
||||
title: String,
|
||||
hint: String? = null,
|
||||
tag: String? = null,
|
||||
selected: Boolean = false,
|
||||
leading: (@Composable () -> Unit)? = null,
|
||||
trailing: (@Composable () -> Unit)? = null,
|
||||
onClick: (() -> Unit)? = null,
|
||||
) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
Row(
|
||||
Modifier.fillMaxWidth()
|
||||
.background(if (selected) pal.signal.copy(alpha = 0.10f) else Color.Transparent)
|
||||
.then(if (onClick != null) Modifier.clickable(role = Role.Button, onClick = onClick) else Modifier)
|
||||
.then(if (tag != null) Modifier.testTag(tag) else Modifier)
|
||||
.padding(horizontal = 10.dp, vertical = 7.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
) {
|
||||
leading?.invoke()
|
||||
Column(Modifier.weight(1f)) {
|
||||
Text(title, fontSize = 13.sp, lineHeight = 16.sp, fontWeight = FontWeight.SemiBold,
|
||||
color = if (selected) pal.signal else colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
if (!hint.isNullOrEmpty()) Text(hint, fontSize = 11.sp, lineHeight = 14.sp, color = colors.onSurfaceVariant,
|
||||
maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.padding(top = 2.dp))
|
||||
}
|
||||
trailing?.invoke()
|
||||
}
|
||||
Box(Modifier.fillMaxWidth().height(1.dp).background(pal.line))
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun PanelValue(text: String, color: Color = MaterialTheme.colorScheme.onBackground) {
|
||||
Text(text, fontSize = 13.sp, fontWeight = FontWeight.SemiBold, color = color, maxLines = 1)
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun PanelNote(text: String, modifier: Modifier = Modifier) {
|
||||
Box(modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
||||
Text(text, fontSize = 13.sp, color = MaterialTheme.colorScheme.onSurfaceVariant, textAlign = TextAlign.Center,
|
||||
modifier = Modifier.padding(24.dp))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,302 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.BitmapFactory
|
||||
import android.util.Base64
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.foundation.Canvas
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.BoxWithConstraints
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.AlignHorizontalCenter
|
||||
import androidx.compose.material.icons.outlined.AlignHorizontalLeft
|
||||
import androidx.compose.material.icons.outlined.AlignHorizontalRight
|
||||
import androidx.compose.material.icons.outlined.WidthFull
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.runtime.snapshotFlow
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.FilterQuality
|
||||
import androidx.compose.ui.graphics.ImageBitmap
|
||||
import androidx.compose.ui.graphics.asAndroidBitmap
|
||||
import androidx.compose.ui.graphics.asImageBitmap
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.input.pointer.PointerEventType
|
||||
import androidx.compose.ui.input.pointer.pointerInput
|
||||
import androidx.compose.ui.layout.onSizeChanged
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.IntOffset
|
||||
import androidx.compose.ui.unit.IntSize
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.session.CdpPage
|
||||
import com.droiddeck.launcher.session.SessionPhase
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
import com.droiddeck.launcher.session.SteamQam
|
||||
import kotlin.math.min
|
||||
import kotlin.math.roundToInt
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.NonCancellable
|
||||
import kotlinx.coroutines.cancelAndJoin
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.ensureActive
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.isActive
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import kotlinx.coroutines.withTimeoutOrNull
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
|
||||
internal class QamFrame(val image: ImageBitmap, val cssWidth: Float, val cssHeight: Float, val contentRight: Float) {
|
||||
val pxPerCss: Float get() = image.width / cssWidth
|
||||
|
||||
/** The menu's own background, sampled inside its right edge, to fill the panel around it. */
|
||||
val fill: Color = runCatching {
|
||||
val x = (contentRight * pxPerCss).roundToInt() - 4
|
||||
Color(image.asAndroidBitmap().getPixel(x.coerceIn(0, image.width - 1), image.height / 2))
|
||||
}.getOrDefault(Color.Black)
|
||||
}
|
||||
|
||||
/** How Steam's Quick Access menu sits on the bottom screen. */
|
||||
internal enum class QamFit(val id: String, @StringRes val label: Int, val icon: ImageVector, val align: Int) {
|
||||
FULL("full", R.string.bottom_qam_layout_full, Icons.Outlined.WidthFull, 0),
|
||||
LEFT("left", R.string.bottom_qam_layout_left, Icons.Outlined.AlignHorizontalLeft, -1),
|
||||
CENTER("center", R.string.bottom_qam_layout_center, Icons.Outlined.AlignHorizontalCenter, 0),
|
||||
RIGHT("right", R.string.bottom_qam_layout_right, Icons.Outlined.AlignHorizontalRight, 1);
|
||||
|
||||
val next: QamFit get() = entries[(ordinal + 1) % entries.size]
|
||||
|
||||
companion object {
|
||||
fun from(id: String?): QamFit = entries.firstOrNull { it.id == id } ?: FULL
|
||||
|
||||
private val state = mutableStateOf<QamFit?>(null)
|
||||
|
||||
fun current(context: Context): QamFit = state.value ?: from(SessionPrefs.quickAccessLayout(context)).also { state.value = it }
|
||||
|
||||
fun choose(context: Context, fit: QamFit) {
|
||||
state.value = fit
|
||||
SessionPrefs.setQuickAccessLayout(context, fit.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal object QamLayout {
|
||||
private const val WIDE_CSS = "div.BasicUI { width: 100% !important; } div[class*=\\\"tab_\\\"] { max-width: none !important; }"
|
||||
|
||||
/** Scale and left edge of the menu in a box; [align] -1, 0 or 1 places a narrower menu left, centred or right. */
|
||||
fun fit(boxWidth: Float, boxHeight: Float, contentRight: Float, cssHeight: Float, align: Int = 0): Pair<Float, Float> {
|
||||
val scale = min(boxWidth / contentRight, boxHeight / cssHeight)
|
||||
return scale to (boxWidth - contentRight * scale) * (align.coerceIn(-1, 1) + 1) / 2f
|
||||
}
|
||||
|
||||
fun toCss(x: Float, y: Float, scale: Float, left: Float): Pair<Float, Float> = (x - left) / scale to y / scale
|
||||
|
||||
/** Makes the menu follow the panel-shaped view (Steam sizes it once, on open) and lifts each tab's 300 px cap, then measures where the content ends. */
|
||||
/** [wide] is false while the menu is shown on the top screen, where it keeps Steam's own layout. */
|
||||
fun contentScript(wide: Boolean): String = "(() => { let s = document.getElementById('dd-qam-wide'); " +
|
||||
"if (!s) { s = document.createElement('style'); s.id = 'dd-qam-wide'; document.head.appendChild(s); } " +
|
||||
"const css = '${if (wide) WIDE_CSS else ""}'; " +
|
||||
"if (s.textContent !== css) s.textContent = css; if (document.scrollingElement.scrollLeft) document.scrollingElement.scrollLeft = 0; " +
|
||||
"const w = innerWidth; let right = 0; for (const e of document.body.querySelectorAll('*')) { " +
|
||||
"const r = e.getBoundingClientRect(); const tab = /(^| )tab_/.test(String(e.className)); " +
|
||||
"if (r.width > 0 && r.height > 0 && (tab || r.width < w * 0.75) && r.right > right) right = r.right; } " +
|
||||
"return JSON.stringify([w, innerHeight, devicePixelRatio, right]); })()"
|
||||
}
|
||||
|
||||
private const val TICK_MS = 1_000L
|
||||
private const val FAST_TICK_MS = 150L
|
||||
private const val MAX_RETRY_MS = 4_000L
|
||||
|
||||
/** The last frame shown, so returning to the panel shows the menu at once while the live stream reconnects. */
|
||||
private object QamCache {
|
||||
@Volatile var image: ImageBitmap? = null
|
||||
@Volatile var shape: FloatArray? = null
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun SteamQamPanel() {
|
||||
val context = LocalContext.current.applicationContext
|
||||
var image by remember { mutableStateOf(QamCache.image) }
|
||||
var shape by remember { mutableStateOf(QamCache.shape) }
|
||||
var failed by remember { mutableStateOf(false) }
|
||||
var slow by remember { mutableStateOf(false) }
|
||||
LaunchedEffect(Unit) {
|
||||
delay(2_500)
|
||||
slow = true
|
||||
}
|
||||
val fit = QamFit.current(context)
|
||||
val holder = remember { arrayOfNulls<CdpPage>(1) }
|
||||
val owner = remember { SteamQam.newOwner() }
|
||||
val relay = remember { intArrayOf(0) }
|
||||
val live = remember { java.util.concurrent.atomic.AtomicBoolean(false) }
|
||||
val aspect = remember { floatArrayOf(0f) }
|
||||
val measure = Modifier.fillMaxSize().onSizeChanged { if (it.height > 0) aspect[0] = it.width.toFloat() / it.height }
|
||||
val show = { frame: ImageBitmap -> image = frame; QamCache.image = frame; live.set(true) }
|
||||
LaunchedEffect(Unit) {
|
||||
withContext(Dispatchers.IO) {
|
||||
var misses = 0
|
||||
// The lease is renewed on its own, so slow discovery or a retry backoff never lets the held menu lapse.
|
||||
val renew = launch {
|
||||
while (isActive) {
|
||||
if (SessionState.phase == SessionPhase.READY && aspect[0] > 0f) SteamQam.hold(context, aspect[0], owner)
|
||||
delay(TICK_MS)
|
||||
}
|
||||
}
|
||||
try {
|
||||
while (isActive) {
|
||||
// Holding the menu before Steam's first frame keeps gamescope from presenting it.
|
||||
if (SessionState.phase != SessionPhase.READY) {
|
||||
delay(FAST_TICK_MS)
|
||||
continue
|
||||
}
|
||||
if (aspect[0] == 0f) {
|
||||
delay(FAST_TICK_MS)
|
||||
continue
|
||||
}
|
||||
val held = SteamQam.hold(context, aspect[0], owner)
|
||||
ensureActive()
|
||||
var reached = held != null
|
||||
if (held?.open == SteamQam.QUICK_ACCESS) {
|
||||
var page = holder[0]
|
||||
if (page == null || page.closed) {
|
||||
page?.close()
|
||||
live.set(false)
|
||||
page = SteamQam.target(context)?.let { t ->
|
||||
if (relay[0] != 0 && relay[0] != t.port) SteamQam.stopRelay(context, relay[0])
|
||||
relay[0] = t.port
|
||||
runCatching {
|
||||
CdpPage(t.port, t.path) { method, params ->
|
||||
if (method == "Page.screencastFrame") {
|
||||
holder[0]?.send("Page.screencastFrameAck", JSONObject().put("sessionId", params.optInt("sessionId")))
|
||||
decodeFrame(params.optString("data"))?.let(show)
|
||||
}
|
||||
}
|
||||
}.onFailure { android.util.Log.w("SteamQam", "devtools connect: $it") }.getOrNull()
|
||||
}
|
||||
holder[0] = page
|
||||
ensureActive()
|
||||
page?.send("Page.enable")
|
||||
val started = page?.call("Page.startScreencast", JSONObject().put("format", "jpeg").put("quality", 85)
|
||||
.put("maxWidth", 1920).put("maxHeight", 1440))
|
||||
if (page != null && (started == null || started.has("error") || !started.has("result"))) {
|
||||
page.close()
|
||||
page = null
|
||||
holder[0] = null
|
||||
}
|
||||
}
|
||||
// The screencast sends frames only when the menu repaints, so a still menu needs one screenshot.
|
||||
if (!live.get()) {
|
||||
page?.call("Page.captureScreenshot", JSONObject().put("format", "jpeg").put("quality", 85))
|
||||
?.optJSONObject("result")?.optString("data")?.let(::decodeFrame)?.let(show)
|
||||
}
|
||||
reached = page != null
|
||||
val wide = !held.top && QamFit.current(context) == QamFit.FULL
|
||||
(page?.evaluate(QamLayout.contentScript(wide)) as? String)?.let { text ->
|
||||
runCatching {
|
||||
val a = JSONArray(text)
|
||||
val layout = floatArrayOf(a.getDouble(0).toFloat(), a.getDouble(1).toFloat(), a.getDouble(2).toFloat(), a.getDouble(3).toFloat())
|
||||
if (!layout.contentEquals(shape)) { shape = layout; QamCache.shape = layout }
|
||||
}
|
||||
}
|
||||
}
|
||||
failed = !reached
|
||||
// With no menu page to reach, retries slow down instead of starting guest processes several times a second.
|
||||
misses = if (reached) 0 else misses + 1
|
||||
val wait = when {
|
||||
!reached -> minOf(TICK_MS shl minOf(misses - 1, 2), MAX_RETRY_MS)
|
||||
live.get() -> TICK_MS
|
||||
else -> FAST_TICK_MS
|
||||
}
|
||||
val used = QamFit.current(context)
|
||||
withTimeoutOrNull(wait) {
|
||||
snapshotFlow { QamFit.current(context) }.first { it != used }
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
withContext(NonCancellable) {
|
||||
renew.cancelAndJoin()
|
||||
val page = holder[0]
|
||||
holder[0] = null
|
||||
runCatching { page?.send("Page.stopScreencast") }
|
||||
// The page outlives this connection, so the widened layout would otherwise stay on the top screen.
|
||||
runCatching { page?.evaluate(QamLayout.contentScript(wide = false)) }
|
||||
page?.close()
|
||||
SteamQam.release(context, relay[0], owner)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
val img = image
|
||||
val l = shape
|
||||
val f = remember(img, l) {
|
||||
if (img != null && l != null && l[0] > 0f) QamFrame(img, l[0], l[1], l[3].coerceIn(l[0] * 0.25f, l[0])) else null
|
||||
}
|
||||
if (f == null) {
|
||||
Box(measure) {
|
||||
if (slow) PanelNote(stringResource(if (failed) R.string.bottom_qam_unavailable else R.string.achievements_reading))
|
||||
}
|
||||
return
|
||||
}
|
||||
BoxWithConstraints(measure.background(f.fill)) {
|
||||
val density = LocalDensity.current
|
||||
val boxW = with(density) { maxWidth.toPx() }
|
||||
val boxH = with(density) { maxHeight.toPx() }
|
||||
val (scale, left) = QamLayout.fit(boxW, boxH, f.contentRight, f.cssHeight, fit.align)
|
||||
Canvas(
|
||||
Modifier.fillMaxSize().pointerInput(f.cssWidth, f.contentRight, boxW, boxH, fit) {
|
||||
var touching = false
|
||||
var target: CdpPage? = null
|
||||
try {
|
||||
awaitPointerEventScope {
|
||||
while (true) {
|
||||
val event = awaitPointerEvent()
|
||||
val change = event.changes.firstOrNull() ?: continue
|
||||
val (x, y) = QamLayout.toCss(change.position.x, change.position.y, scale, left)
|
||||
val type = when (event.type) {
|
||||
PointerEventType.Press -> if (x in 0f..f.contentRight && y in 0f..f.cssHeight) "touchStart" else null
|
||||
PointerEventType.Move -> "touchMove"
|
||||
PointerEventType.Release -> "touchEnd"
|
||||
else -> null
|
||||
}?.takeIf { it == "touchStart" || touching } ?: continue
|
||||
if (type == "touchStart") target = holder[0]
|
||||
touching = type != "touchEnd"
|
||||
val points = if (type == "touchEnd") JSONArray()
|
||||
else JSONArray().put(JSONObject().put("x", x.toDouble()).put("y", y.toDouble()))
|
||||
target?.send("Input.dispatchTouchEvent", JSONObject().put("type", type).put("touchPoints", points))
|
||||
if (!touching) target = null
|
||||
change.consume()
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
if (touching) target?.send("Input.dispatchTouchEvent",
|
||||
JSONObject().put("type", "touchCancel").put("touchPoints", JSONArray()))
|
||||
}
|
||||
},
|
||||
) {
|
||||
val px = f.pxPerCss
|
||||
drawImage(
|
||||
f.image,
|
||||
srcOffset = IntOffset.Zero,
|
||||
srcSize = IntSize((f.contentRight * px).roundToInt().coerceAtMost(f.image.width), f.image.height),
|
||||
dstOffset = IntOffset(left.roundToInt(), 0),
|
||||
dstSize = IntSize((f.contentRight * scale).roundToInt(), (f.cssHeight * scale).roundToInt()),
|
||||
filterQuality = FilterQuality.Medium,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun decodeFrame(data: String): ImageBitmap? = runCatching {
|
||||
val bytes = Base64.decode(data, Base64.DEFAULT)
|
||||
BitmapFactory.decodeByteArray(bytes, 0, bytes.size)?.asImageBitmap()
|
||||
}.getOrNull()
|
||||
@@ -15,6 +15,10 @@ import android.view.WindowManager
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.LinearLayout
|
||||
import androidx.activity.setViewTreeOnBackPressedDispatcherOwner
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.ExpandLess
|
||||
import androidx.compose.material.icons.outlined.LightMode
|
||||
import androidx.compose.material.icons.outlined.Tune
|
||||
import androidx.lifecycle.setViewTreeLifecycleOwner
|
||||
import androidx.lifecycle.setViewTreeViewModelStoreOwner
|
||||
import androidx.savedstate.setViewTreeSavedStateRegistryOwner
|
||||
@@ -43,6 +47,7 @@ class SecondScreenPresentation(
|
||||
private val onMenuTouched: () -> Unit = {},
|
||||
private val onDeckPanel: (DeckPanel) -> Unit = { SessionPrefs.setDeckPanel(sessionActivity, it) },
|
||||
private val picker: ((SecondScreenMode) -> ScreenPicker?)? = null,
|
||||
private val panel: (SecondScreenMode) -> (@androidx.compose.runtime.Composable () -> Unit)? = { null },
|
||||
) : Presentation(sessionActivity, display) {
|
||||
private val frame = FrameLayout(context)
|
||||
private var menuView: androidx.compose.ui.platform.ComposeView? = null
|
||||
@@ -67,6 +72,19 @@ class SecondScreenPresentation(
|
||||
var controlsView: InputSurfaceView? = null
|
||||
private set
|
||||
private var created = false
|
||||
private val brightnessOpen = androidx.compose.runtime.mutableStateOf(false)
|
||||
private val brightness = androidx.compose.runtime.mutableIntStateOf(BottomBrightness.MIN)
|
||||
private val brightnessView by lazy {
|
||||
androidx.compose.ui.platform.ComposeView(context).apply {
|
||||
setContent {
|
||||
DroidDeckTheme {
|
||||
if (!BottomChrome.barShown && currentMode.hasBar) PullTab()
|
||||
if (brightnessOpen.value) BrightnessDrop(brightness.intValue, ::setBrightness,
|
||||
onScreenOff = { brightnessOpen.value = false; screenOff() }, onDismiss = { brightnessOpen.value = false })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
setCancelable(false)
|
||||
@@ -80,6 +98,9 @@ class SecondScreenPresentation(
|
||||
window?.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
|
||||
frame.addView(root, FrameLayout.LayoutParams(-1, -1))
|
||||
frame.addView(brightnessView, FrameLayout.LayoutParams(-1, -1))
|
||||
frame.addView(sleepView, FrameLayout.LayoutParams(-1, -1))
|
||||
light(BottomScreenLight.ON)
|
||||
setContentView(frame)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
root.setOnApplyWindowInsetsListener { view, insets ->
|
||||
@@ -94,6 +115,7 @@ class SecondScreenPresentation(
|
||||
|
||||
fun requestKeyboard(forField: Boolean = false) {
|
||||
if (!showsKeyboard || keyboardHost == null) return
|
||||
wake()
|
||||
if (forField) fieldKeyboard = true
|
||||
keyboardPending = true
|
||||
if (window?.decorView?.hasWindowFocus() == true) showPendingKeyboard()
|
||||
@@ -127,6 +149,8 @@ class SecondScreenPresentation(
|
||||
fun showMode(mode: SecondScreenMode) {
|
||||
if (currentMode == mode && isShowing) return
|
||||
currentMode = mode
|
||||
brightnessOpen.value = false
|
||||
BottomChrome.reset()
|
||||
if (created) renderMode()
|
||||
}
|
||||
|
||||
@@ -136,6 +160,7 @@ class SecondScreenPresentation(
|
||||
|
||||
fun showChat(onLost: () -> Unit, content: @androidx.compose.runtime.Composable () -> Unit) {
|
||||
if (!showsKeyboard || chatView != null) return
|
||||
wake()
|
||||
keyboardHost?.takeIf { it.shown }?.hide()
|
||||
keyboardShown.value = false
|
||||
keyboardPending = false
|
||||
@@ -174,6 +199,7 @@ class SecondScreenPresentation(
|
||||
val content = menu ?: return
|
||||
menuShown = on
|
||||
if (on) {
|
||||
wake()
|
||||
keyboardHost?.takeIf { it.shown }?.hide()
|
||||
keyboardShown.value = false
|
||||
ownComposeViews()
|
||||
@@ -192,6 +218,7 @@ class SecondScreenPresentation(
|
||||
menuView?.let { frame.removeView(it); it.disposeComposition() }
|
||||
menuView = null
|
||||
root.visibility = View.VISIBLE
|
||||
scheduleDim()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,21 +250,93 @@ class SecondScreenPresentation(
|
||||
}
|
||||
|
||||
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
|
||||
val ownKeys = currentMode == SecondScreenMode.TERMINAL || currentMode == SecondScreenMode.DASHBOARD ||
|
||||
val ownKeys = currentMode == SecondScreenMode.TERMINAL || currentMode == SecondScreenMode.DASHBOARD || currentMode.sessionPanel ||
|
||||
currentMode == SecondScreenMode.DESKTOP
|
||||
val back = event.keyCode == KeyEvent.KEYCODE_BACK && currentMode == SecondScreenMode.DASHBOARD
|
||||
val forward = menuShown || !ownKeys || back || PadBridge.isControllerKeyEvent(event)
|
||||
val pad = PadBridge.isControllerKeyEvent(event)
|
||||
if (!pad) uiActivity()
|
||||
val forward = menuShown || !ownKeys || back || pad
|
||||
if (forward && sessionActivity.dispatchKeyEvent(event)) return true
|
||||
return super.dispatchKeyEvent(event)
|
||||
}
|
||||
|
||||
override fun dispatchTouchEvent(event: MotionEvent): Boolean {
|
||||
if (event.actionMasked == MotionEvent.ACTION_DOWN && screen == BottomScreenLight.ON) waking = false
|
||||
if (screen != BottomScreenLight.ON || waking) {
|
||||
// The touch that wakes the screen is swallowed whole, so its release does not click what is under it.
|
||||
when (event.actionMasked) {
|
||||
MotionEvent.ACTION_DOWN -> if (screen != BottomScreenLight.ON) { waking = true; wake() }
|
||||
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> waking = false
|
||||
}
|
||||
return true
|
||||
}
|
||||
scheduleDim()
|
||||
if (menuShown && event.actionMasked == MotionEvent.ACTION_DOWN) onMenuTouched()
|
||||
return super.dispatchTouchEvent(event)
|
||||
}
|
||||
|
||||
private val sleepView = View(context).apply {
|
||||
setBackgroundColor(Color.BLACK)
|
||||
visibility = View.GONE
|
||||
}
|
||||
private var screen = BottomScreenLight.ON
|
||||
private var waking = false
|
||||
private val dim = Runnable { if (screen == BottomScreenLight.ON) light(BottomScreenLight.DIM) }
|
||||
|
||||
fun screenOff() {
|
||||
// A control held by another finger would keep its press, since the screen-off overlay takes the release.
|
||||
controlsView?.releaseInputs()
|
||||
light(BottomScreenLight.OFF)
|
||||
}
|
||||
|
||||
/** Keyboard or mouse use of the bottom screen's own UI counts as activity; an explicit screen off stays off. */
|
||||
private fun uiActivity() {
|
||||
when (screen) {
|
||||
BottomScreenLight.DIM -> wake()
|
||||
BottomScreenLight.ON -> scheduleDim()
|
||||
BottomScreenLight.OFF -> Unit
|
||||
}
|
||||
}
|
||||
|
||||
fun wake() {
|
||||
light(BottomScreenLight.ON)
|
||||
scheduleDim()
|
||||
}
|
||||
|
||||
private fun light(state: BottomScreenLight) {
|
||||
screen = state
|
||||
sleepView.visibility = if (state == BottomScreenLight.OFF) View.VISIBLE else View.GONE
|
||||
sleepView.alpha = 1f
|
||||
val w = window ?: return
|
||||
w.attributes = w.attributes.apply {
|
||||
screenBrightness = when (state) {
|
||||
BottomScreenLight.ON -> BottomBrightness.level(context) ?: state.brightness
|
||||
BottomScreenLight.DIM -> BottomBrightness.dimmed(context, state.brightness)
|
||||
BottomScreenLight.OFF -> state.brightness
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun toggleBrightness() {
|
||||
if (!brightnessOpen.value) brightness.intValue = BottomBrightness.initial(context)
|
||||
brightnessOpen.value = !brightnessOpen.value
|
||||
}
|
||||
|
||||
private fun setBrightness(percent: Int) {
|
||||
val value = BottomBrightness.clamp(percent)
|
||||
brightness.intValue = value
|
||||
SessionPrefs.setBottomBrightness(context, value)
|
||||
if (screen == BottomScreenLight.ON) light(BottomScreenLight.ON)
|
||||
}
|
||||
|
||||
private fun scheduleDim() {
|
||||
frame.removeCallbacks(dim)
|
||||
if (!menuShown && BottomScreenLight.autoDims(currentMode) && SessionPrefs.bottomAutoDim(context)) frame.postDelayed(dim, BottomScreenLight.DIM_AFTER_MS)
|
||||
}
|
||||
|
||||
override fun dispatchGenericMotionEvent(event: MotionEvent): Boolean {
|
||||
if (PadBridge.isControllerMotionEvent(event) && sessionActivity.dispatchGenericMotionEvent(event)) return true
|
||||
if (event.isFromSource(android.view.InputDevice.SOURCE_MOUSE)) uiActivity()
|
||||
return super.dispatchGenericMotionEvent(event)
|
||||
}
|
||||
|
||||
@@ -266,6 +365,7 @@ class SecondScreenPresentation(
|
||||
}
|
||||
|
||||
private fun renderMode() {
|
||||
if (created) wake()
|
||||
dropChat()
|
||||
fieldKeyboard = false
|
||||
keyboardHost?.hide()
|
||||
@@ -282,6 +382,7 @@ class SecondScreenPresentation(
|
||||
val mode = when {
|
||||
requested == SecondScreenMode.DECK_CONTROLS && !SessionState.deckPad -> SecondScreenMode.NONE
|
||||
requested == SecondScreenMode.DASHBOARD && dashboard == null -> SecondScreenMode.NONE
|
||||
requested.sessionPanel && panel(requested) == null -> SecondScreenMode.NONE
|
||||
requested == SecondScreenMode.DESKTOP && !BottomDesktop.available() -> SecondScreenMode.NONE
|
||||
else -> requested
|
||||
}
|
||||
@@ -300,6 +401,7 @@ class SecondScreenPresentation(
|
||||
attachKeyboard()
|
||||
}
|
||||
SecondScreenMode.DASHBOARD -> renderDashboard()
|
||||
SecondScreenMode.GUIDES, SecondScreenMode.MIRROR, SecondScreenMode.STEAM_QAM, SecondScreenMode.ART -> renderPanel(mode)
|
||||
SecondScreenMode.DESKTOP -> {
|
||||
root.addView(BottomDesktopPanel(context, onClose, onMenu,
|
||||
(onSteamMenu to onQam).takeIf { SessionState.mode == SessionService.MODE_STEAM }, onSwap,
|
||||
@@ -314,21 +416,47 @@ class SecondScreenPresentation(
|
||||
|
||||
private fun bar(mode: SecondScreenMode) {
|
||||
val first = barModel(mode) ?: return
|
||||
root.addView(bottomScreenBarView(context) { barModel(mode) ?: first }, LinearLayout.LayoutParams(-1, -2))
|
||||
root.addView(androidx.compose.ui.platform.ComposeView(context).apply {
|
||||
setContent {
|
||||
DroidDeckTheme {
|
||||
androidx.compose.animation.AnimatedVisibility(BottomChrome.barShown,
|
||||
enter = androidx.compose.animation.expandVertically(), exit = androidx.compose.animation.shrinkVertically()) {
|
||||
BottomScreenBar(barModel(mode) ?: first)
|
||||
}
|
||||
}
|
||||
}
|
||||
}, LinearLayout.LayoutParams(-1, -2))
|
||||
}
|
||||
|
||||
internal fun barModel(mode: SecondScreenMode): BottomBarModel? {
|
||||
val swap = listOfNotNull(onSwap?.let { BarExtra(context.getString(R.string.swap_screens), icon = R.drawable.ic_bottom_swap, tag = "bottom-swap", onClick = it) })
|
||||
val extras = listOfNotNull(onSwap?.let { BarExtra(context.getString(R.string.swap_screens), icon = R.drawable.ic_bottom_swap, tag = "bottom-swap", onClick = it) }) +
|
||||
BarExtra(context.getString(R.string.bottom_brightness), vector = Icons.Outlined.LightMode, active = brightnessOpen.value,
|
||||
tag = "bottom-brightness-toggle", onClick = ::toggleBrightness) +
|
||||
BarExtra(context.getString(R.string.bottom_bar_hide), vector = Icons.Outlined.ExpandLess, tag = "bottom-bar-hide") {
|
||||
brightnessOpen.value = false
|
||||
BottomChrome.show(false)
|
||||
}
|
||||
fun model(extras: List<BarExtra>, tabs: BarTabs? = null) =
|
||||
sessionBarModel(context.getString(mode.label), onClose, onMenu, onSteamMenu, onQam, extras, tabs, picker?.invoke(mode))
|
||||
return when (mode) {
|
||||
SecondScreenMode.KEYBOARD_TRACKPAD -> model(listOf(BarExtra(
|
||||
context.getString(if (keyboardShown.value) R.string.second_hide_keyboard else R.string.second_show_keyboard),
|
||||
icon = R.drawable.ic_bottom_keyboard, active = keyboardShown.value, tag = "bottom-keyboard") { showKeyboard() }) + swap)
|
||||
SecondScreenMode.DECK_CONTROLS -> model(swap, deckPanelTabs(context, deckPanel.value, ::selectDeckPanel))
|
||||
SecondScreenMode.DASHBOARD, SecondScreenMode.CUSTOM_CONTROLS -> model(swap)
|
||||
icon = R.drawable.ic_bottom_keyboard, active = keyboardShown.value, tag = "bottom-keyboard") { showKeyboard() }) + extras)
|
||||
SecondScreenMode.DECK_CONTROLS -> model(extras, deckPanelTabs(context, deckPanel.value, ::selectDeckPanel))
|
||||
SecondScreenMode.STEAM_QAM -> {
|
||||
val fit = QamFit.current(context)
|
||||
model(listOf(BarExtra(context.getString(R.string.bottom_qam_layout, context.getString(fit.label)), vector = fit.icon,
|
||||
tag = "bottom-qam-layout") { QamFit.choose(context, fit.next) }) + extras)
|
||||
}
|
||||
SecondScreenMode.MIRROR -> model(listOf(BarExtra(context.getString(R.string.bottom_mirror_options), vector = Icons.Outlined.Tune,
|
||||
active = MirrorOptions.open.value, tag = "bottom-mirror-options-toggle") {
|
||||
brightnessOpen.value = false
|
||||
MirrorOptions.open.value = !MirrorOptions.open.value
|
||||
}) + extras)
|
||||
SecondScreenMode.DASHBOARD, SecondScreenMode.CUSTOM_CONTROLS, SecondScreenMode.GUIDES,
|
||||
SecondScreenMode.ART -> model(extras)
|
||||
SecondScreenMode.TERMINAL -> model(listOf(BarExtra(context.getString(R.string.drawer_keyboard), icon = R.drawable.ic_bottom_keyboard,
|
||||
tag = "bottom-keyboard") { terminalPanel?.showKeyboard() }) + swap)
|
||||
tag = "bottom-keyboard") { terminalPanel?.showKeyboard() }) + extras)
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
@@ -348,6 +476,14 @@ class SecondScreenPresentation(
|
||||
root.addView(view, weightParams())
|
||||
}
|
||||
|
||||
private fun renderPanel(mode: SecondScreenMode) {
|
||||
val content = panel(mode) ?: return
|
||||
bar(mode)
|
||||
val view = androidx.compose.ui.platform.ComposeView(context).apply { setContent { PresentationWindows(content) } }
|
||||
dashboardView = view
|
||||
root.addView(view, weightParams())
|
||||
}
|
||||
|
||||
private fun closeDashboard() {
|
||||
dashboardView?.disposeComposition()
|
||||
dashboardView = null
|
||||
@@ -396,3 +532,17 @@ class SecondScreenPresentation(
|
||||
private fun PresentationWindows(content: @androidx.compose.runtime.Composable () -> Unit) {
|
||||
androidx.compose.runtime.CompositionLocalProvider(LocalPresentationWindow provides true) { content() }
|
||||
}
|
||||
|
||||
internal enum class BottomScreenLight(val brightness: Float) {
|
||||
ON(WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_NONE),
|
||||
DIM(0.05f),
|
||||
OFF(WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_OFF);
|
||||
|
||||
companion object {
|
||||
const val DIM_AFTER_MS = 60_000L
|
||||
fun autoDims(mode: SecondScreenMode) = mode == SecondScreenMode.DASHBOARD
|
||||
}
|
||||
}
|
||||
|
||||
/** Modes drawn with the bottom bar, which the pull tab can bring back. */
|
||||
internal val SecondScreenMode.hasBar: Boolean get() = this != SecondScreenMode.NONE && this != SecondScreenMode.MENU && this != SecondScreenMode.DESKTOP
|
||||
@@ -1433,10 +1433,13 @@ private fun SteamVrRow(a: DrawerActions) {
|
||||
}
|
||||
}
|
||||
|
||||
internal fun secondScreenModes(none: Boolean, deckPad: Boolean, dashboard: Boolean, desktop: Boolean): List<SecondScreenMode> =
|
||||
internal fun secondScreenModes(none: Boolean, deckPad: Boolean, dashboard: Boolean, desktop: Boolean,
|
||||
steam: Boolean = com.droiddeck.launcher.session.SessionState.mode == com.droiddeck.launcher.session.SessionService.MODE_STEAM): List<SecondScreenMode> =
|
||||
(if (none) listOf(SecondScreenMode.NONE) else emptyList()) + listOf(SecondScreenMode.KEYBOARD_TRACKPAD, SecondScreenMode.TERMINAL) +
|
||||
(if (deckPad) listOf(SecondScreenMode.DECK_CONTROLS) else emptyList()) + listOf(SecondScreenMode.CUSTOM_CONTROLS) +
|
||||
(if (dashboard) listOf(SecondScreenMode.DASHBOARD) else emptyList()) +
|
||||
(if (dashboard && steam) listOf(SecondScreenMode.STEAM_QAM, SecondScreenMode.ART) else emptyList()) +
|
||||
(if (dashboard) listOf(SecondScreenMode.GUIDES, SecondScreenMode.MIRROR) else emptyList()) +
|
||||
(if (desktop) listOf(SecondScreenMode.DESKTOP) else emptyList())
|
||||
|
||||
private val DRAWER_MIN_WIDTH = 300.dp
|
||||
|
||||
@@ -170,7 +170,7 @@ internal val LocalRevealChecked = androidx.compose.runtime.compositionLocalOf {
|
||||
internal fun TabStrip(
|
||||
tabs: List<String>, selected: Int, onSelect: (Int) -> Unit,
|
||||
modifier: Modifier = Modifier, focusRequesters: List<FocusRequester>? = null,
|
||||
bumpers: Boolean = true, compact: Boolean = false,
|
||||
bumpers: Boolean = true, compact: Boolean = false, centered: Boolean = false,
|
||||
) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
@@ -181,8 +181,9 @@ internal fun TabStrip(
|
||||
val tabPadding = if (compact) 10.dp else if (tight) 10.dp else 16.dp
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp), modifier = modifier) {
|
||||
if (bumpers) BumperKey("LB", stringResource(R.string.widgets_prev_tab)) { onSelect((selected + tabs.size - 1) % tabs.size) }
|
||||
Row(
|
||||
modifier = Modifier.weight(1f, fill = false).clip(shape).background(colors.surfaceVariant).border(1.dp, pal.line2, shape)
|
||||
// Centred, the bumpers sit at the edges and the tabs in the middle, as in the bottom bar.
|
||||
Box(if (centered) Modifier.weight(1f) else Modifier.weight(1f, fill = false), contentAlignment = Alignment.Center) { Row(
|
||||
modifier = Modifier.clip(shape).background(colors.surfaceVariant).border(1.dp, pal.line2, shape)
|
||||
.horizontalScroll(scroll).selectableGroup().padding(3.dp),
|
||||
) {
|
||||
tabs.forEachIndexed { i, label ->
|
||||
@@ -208,7 +209,7 @@ internal fun TabStrip(
|
||||
.padding(horizontal = tabPadding, vertical = if (compact) 6.dp else 12.dp),
|
||||
)
|
||||
}
|
||||
}
|
||||
} }
|
||||
if (bumpers) BumperKey("RB", stringResource(R.string.widgets_next_tab)) { onSelect((selected + 1) % tabs.size) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2149,6 +2149,13 @@
|
||||
<string name="stats_hud_red_mark">العلامة الحمراء هي النقطة التي تُظهر فيها المؤشرات درجة الحرارة باللون الأحمر.</string>
|
||||
<string name="stats_hud_whole_device">الجهاز بالكامل</string>
|
||||
<string name="stats_hud_battery_temp">البطارية</string>
|
||||
<string name="bottom_art_title">صور اللعبة</string>
|
||||
<string name="bottom_art_playing">قيد اللعب</string>
|
||||
<string name="bottom_idle_selected">محدد في Steam</string>
|
||||
<string name="bottom_idle_recent">آخر ما لُعب</string>
|
||||
<string name="bottom_idle_never">لم يُلعب بعد</string>
|
||||
<string name="bottom_idle_minutes">%1$d دقيقة لعب</string>
|
||||
<string name="bottom_idle_hours">%1$d ساعة لعب</string>
|
||||
<string name="bottom_telemetry_send_title">إرسال بيانات لوحة العدادات</string>
|
||||
<string name="bottom_telemetry_send_auto">تلقائي</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">يفعّلها لكل لعبة مدرجة هنا، بما في ذلك الألعاب التي يُعثر عليها لاحقًا. تبقى الألعاب التي توقفها متوقفة.</string>
|
||||
@@ -2171,6 +2178,59 @@
|
||||
<string name="bottom_chat_mic_off">الميكروفون متوقف</string>
|
||||
<string name="bottom_chat_mic_unavailable">الميكروفون متوقف لهذه اللعبة. للتحدث، فعِّل «الميكروفون» في إعدادات Steam في DroidDeck (الصوت) وابدأ اللعبة من جديد.</string>
|
||||
<string name="bottom_chat_volume">مستوى الصوت %1$d%%</string>
|
||||
<string name="bottom_bar_hide">إخفاء الشريط</string>
|
||||
<string name="bottom_bar_show">إظهار الشريط</string>
|
||||
<string name="bottom_brightness">سطوع الشاشة السفلية</string>
|
||||
<string name="bottom_screen_off">أطفئ الشاشة السفلية</string>
|
||||
<string name="bottom_page_guides">الأدلة</string>
|
||||
<string name="bottom_guides_no_game">ابدأ لعبة لترى أدلة Steam الخاصة بها هنا.</string>
|
||||
<string name="bottom_guides_continue">متابعة القراءة</string>
|
||||
<string name="bottom_guides_empty">لا توجد أدلة Steam لهذه اللعبة بعد.</string>
|
||||
<string name="bottom_guides_failed">تعذّر تحميل أدلة Steam. عد عندما تكون متصلًا.</string>
|
||||
<string name="bottom_page_mirror">المرآة</string>
|
||||
<string name="bottom_mirror_pick">اسحب فوق جزء اللعبة الذي تريد عرضه هنا، مثل الخريطة المصغّرة.</string>
|
||||
<string name="bottom_mirror_save">احفظ المنطقة</string>
|
||||
<string name="bottom_mirror_sharp">حاد</string>
|
||||
<string name="bottom_mirror_smooth">ناعم</string>
|
||||
<string name="bottom_mirror_no_frame">لا يمكن نسخ صورة اللعبة الآن.</string>
|
||||
<string name="bottom_guides_wiki">الويكي والإصلاحات</string>
|
||||
<string name="bottom_guides_maps">الخرائط</string>
|
||||
<string name="bottom_guides_saved">المحفوظة</string>
|
||||
<string name="bottom_guides_tag_all">الكل</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">الشروحات</string>
|
||||
<string name="bottom_guides_tag_secrets">الأسرار</string>
|
||||
<string name="bottom_guides_pinned">ثُبّتت الخريطة في خرائط هذه اللعبة.</string>
|
||||
<string name="bottom_guides_pin_failed">تعذّر حفظ هذه الصورة.</string>
|
||||
<string name="bottom_guides_saved_note">حُفظت الصفحة للقراءة دون اتصال.</string>
|
||||
<string name="bottom_guides_search">ابحث في الويب</string>
|
||||
<string name="bottom_guides_markers">العلامات: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">اعثر على خرائط</string>
|
||||
<string name="bottom_guides_saved_hint">استخدم «حفظ» في القارئ للاحتفاظ بصفحة للقراءة دون اتصال.</string>
|
||||
<string name="bottom_guides_pin">ثبّت كخريطة</string>
|
||||
<string name="bottom_guides_pin_hint">اضغط مطولًا على صورة لتثبيتها كخريطة.</string>
|
||||
<string name="bottom_guides_marker_hint">اقرص للتكبير. اضغط مطولًا لإضافة علامة، واضغط على علامة لإزالتها.</string>
|
||||
<string name="bottom_guides_link_wiki">ويكي اللعبة</string>
|
||||
<string name="bottom_guides_link_pcgw">إصلاحات PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">شروحات YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">ظاهرة</string>
|
||||
<string name="bottom_mirror_hide_black">مخفية</string>
|
||||
<string name="bottom_mirror_hide_dim">معتمة</string>
|
||||
<string name="bottom_guides_steam">أدلة Steam</string>
|
||||
<string name="bottom_guides_category">الفئة</string>
|
||||
<string name="bottom_guides_maps_empty">لا توجد خرائط مثبتة بعد</string>
|
||||
<string name="bottom_guides_map_name">خريطة %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">لا توجد صفحات محفوظة بعد</string>
|
||||
<string name="bottom_mirror_options">خيارات المرآة</string>
|
||||
<string name="bottom_mirror_region">المنطقة</string>
|
||||
<string name="bottom_mirror_top">الشاشة العلوية</string>
|
||||
<string name="bottom_mirror_scaling">التحجيم</string>
|
||||
<string name="bottom_qam_title">الوصول السريع</string>
|
||||
<string name="bottom_qam_layout">التخطيط: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">العرض الكامل</string>
|
||||
<string name="bottom_qam_layout_left">يسار</string>
|
||||
<string name="bottom_qam_layout_center">وسط</string>
|
||||
<string name="bottom_qam_layout_right">يمين</string>
|
||||
<string name="bottom_qam_unavailable">قائمة الوصول السريع في Steam غير متاحة بعد.</string>
|
||||
<string name="bottom_page_telemetry">إحصاءات داخل اللعبة</string>
|
||||
<string name="bottom_hud_group">مؤشرات الشاشة السفلية</string>
|
||||
<string name="bottom_strip_tabs">شريط على كل تبويب</string>
|
||||
|
||||
@@ -2144,6 +2144,13 @@
|
||||
<string name="stats_hud_red_mark">La marca roja indica el punto donde el HUD muestra la temperatura en rojo.</string>
|
||||
<string name="stats_hud_whole_device">todo el dispositivo</string>
|
||||
<string name="stats_hud_battery_temp">batería</string>
|
||||
<string name="bottom_art_title">Arte del juego</string>
|
||||
<string name="bottom_art_playing">Jugando</string>
|
||||
<string name="bottom_idle_selected">Seleccionado en Steam</string>
|
||||
<string name="bottom_idle_recent">Jugado por última vez</string>
|
||||
<string name="bottom_idle_never">Aún sin jugar</string>
|
||||
<string name="bottom_idle_minutes">%1$d min jugados</string>
|
||||
<string name="bottom_idle_hours">%1$d h jugadas</string>
|
||||
<string name="bottom_telemetry_send_title">Enviar datos al panel</string>
|
||||
<string name="bottom_telemetry_send_auto">Automático</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Lo activa en todos los juegos de esta lista, incluidos los que se encuentren más adelante. Los juegos que desactives seguirán desactivados.</string>
|
||||
@@ -2166,6 +2173,59 @@
|
||||
<string name="bottom_chat_mic_off">Micro desactivado</string>
|
||||
<string name="bottom_chat_mic_unavailable">El micro está desactivado en este juego. Para hablar, activa Micrófono en los ajustes de Steam de DroidDeck (Audio) y vuelve a iniciar el juego.</string>
|
||||
<string name="bottom_chat_volume">Volumen %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Ocultar barra</string>
|
||||
<string name="bottom_bar_show">Mostrar barra</string>
|
||||
<string name="bottom_brightness">Brillo de la pantalla inferior</string>
|
||||
<string name="bottom_screen_off">Apagar la pantalla inferior</string>
|
||||
<string name="bottom_page_guides">Guías</string>
|
||||
<string name="bottom_guides_no_game">Inicia un juego para ver aquí sus guías de Steam.</string>
|
||||
<string name="bottom_guides_continue">Seguir leyendo</string>
|
||||
<string name="bottom_guides_empty">Este juego aún no tiene guías de Steam.</string>
|
||||
<string name="bottom_guides_failed">No se pudieron cargar las guías de Steam. Vuelve a intentarlo cuando tengas conexión.</string>
|
||||
<string name="bottom_page_mirror">Espejo</string>
|
||||
<string name="bottom_mirror_pick">Arrastra sobre la parte del juego que quieras ver aquí, como el minimapa.</string>
|
||||
<string name="bottom_mirror_save">Guardar región</string>
|
||||
<string name="bottom_mirror_sharp">Nítido</string>
|
||||
<string name="bottom_mirror_smooth">Suave</string>
|
||||
<string name="bottom_mirror_no_frame">Ahora no se puede copiar la imagen del juego.</string>
|
||||
<string name="bottom_guides_wiki">Wiki y soluciones</string>
|
||||
<string name="bottom_guides_maps">Mapas</string>
|
||||
<string name="bottom_guides_saved">Guardado</string>
|
||||
<string name="bottom_guides_tag_all">Todo</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Guías completas</string>
|
||||
<string name="bottom_guides_tag_secrets">Secretos</string>
|
||||
<string name="bottom_guides_pinned">Mapa fijado en los mapas de este juego.</string>
|
||||
<string name="bottom_guides_pin_failed">No se pudo guardar esa imagen.</string>
|
||||
<string name="bottom_guides_saved_note">Página guardada para leer sin conexión.</string>
|
||||
<string name="bottom_guides_search">Buscar en la web</string>
|
||||
<string name="bottom_guides_markers">Marcadores: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Buscar mapas</string>
|
||||
<string name="bottom_guides_saved_hint">Usa Guardar en el lector para conservar una página sin conexión.</string>
|
||||
<string name="bottom_guides_pin">Fijar como mapa</string>
|
||||
<string name="bottom_guides_pin_hint">Mantén presionada una imagen para fijarla como mapa.</string>
|
||||
<string name="bottom_guides_marker_hint">Pellizca para hacer zoom. Mantén presionado para añadir un marcador y tócalo para quitarlo.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki del juego</string>
|
||||
<string name="bottom_guides_link_pcgw">Soluciones de PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Guías en YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Visible</string>
|
||||
<string name="bottom_mirror_hide_black">Oculto</string>
|
||||
<string name="bottom_mirror_hide_dim">Atenuado</string>
|
||||
<string name="bottom_guides_steam">Guías de Steam</string>
|
||||
<string name="bottom_guides_category">Categoría</string>
|
||||
<string name="bottom_guides_maps_empty">Aún no hay mapas fijados</string>
|
||||
<string name="bottom_guides_map_name">Mapa %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Aún no hay páginas guardadas</string>
|
||||
<string name="bottom_mirror_options">Opciones de espejo</string>
|
||||
<string name="bottom_mirror_region">Región</string>
|
||||
<string name="bottom_mirror_top">Pantalla superior</string>
|
||||
<string name="bottom_mirror_scaling">Escalado</string>
|
||||
<string name="bottom_qam_title">Acceso rápido</string>
|
||||
<string name="bottom_qam_layout">Diseño: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Ancho completo</string>
|
||||
<string name="bottom_qam_layout_left">Izquierda</string>
|
||||
<string name="bottom_qam_layout_center">Centro</string>
|
||||
<string name="bottom_qam_layout_right">Derecha</string>
|
||||
<string name="bottom_qam_unavailable">El menú de acceso rápido de Steam aún no está disponible.</string>
|
||||
<string name="bottom_page_telemetry">Estadísticas del juego</string>
|
||||
<string name="bottom_hud_group">HUD de la pantalla inferior</string>
|
||||
<string name="bottom_strip_tabs">Franja en todas las pestañas</string>
|
||||
|
||||
@@ -2049,6 +2049,13 @@
|
||||
<string name="stats_hud_red_mark">Червената маркировка е мястото, където HUD показва температурата в червено.</string>
|
||||
<string name="stats_hud_whole_device">цялото устройство</string>
|
||||
<string name="stats_hud_battery_temp">батерия</string>
|
||||
<string name="bottom_art_title">Изображения на играта</string>
|
||||
<string name="bottom_art_playing">Играе се</string>
|
||||
<string name="bottom_idle_selected">Избрано в Steam</string>
|
||||
<string name="bottom_idle_recent">Последно играна</string>
|
||||
<string name="bottom_idle_never">Още не е играна</string>
|
||||
<string name="bottom_idle_minutes">%1$d мин игра</string>
|
||||
<string name="bottom_idle_hours">%1$d ч игра</string>
|
||||
<string name="bottom_telemetry_send_title">Изпращане на данни за таблото</string>
|
||||
<string name="bottom_telemetry_send_auto">Автоматично</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Включва го за всяка игра от списъка тук, включително игри, открити по-късно. Игрите, които изключите, остават изключени.</string>
|
||||
@@ -2071,6 +2078,59 @@
|
||||
<string name="bottom_chat_mic_off">Микрофонът е изключен</string>
|
||||
<string name="bottom_chat_mic_unavailable">Микрофонът е изключен за тази игра. За да говорите, включете „Микрофон“ в настройките на Steam в DroidDeck (Звук) и стартирайте играта отново.</string>
|
||||
<string name="bottom_chat_volume">Сила на звука %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Скриване на лентата</string>
|
||||
<string name="bottom_bar_show">Показване на лентата</string>
|
||||
<string name="bottom_brightness">Яркост на долния екран</string>
|
||||
<string name="bottom_screen_off">Изключи долния екран</string>
|
||||
<string name="bottom_page_guides">Ръководства</string>
|
||||
<string name="bottom_guides_no_game">Пуснете игра, за да видите тук нейните ръководства в Steam.</string>
|
||||
<string name="bottom_guides_continue">Продължи четенето</string>
|
||||
<string name="bottom_guides_empty">Все още няма ръководства в Steam за тази игра.</string>
|
||||
<string name="bottom_guides_failed">Ръководствата в Steam не се заредиха. Опитайте отново, когато сте онлайн.</string>
|
||||
<string name="bottom_page_mirror">Огледало</string>
|
||||
<string name="bottom_mirror_pick">Плъзнете върху частта от играта, която да се показва тук, например мини картата.</string>
|
||||
<string name="bottom_mirror_save">Запази областта</string>
|
||||
<string name="bottom_mirror_sharp">Остро</string>
|
||||
<string name="bottom_mirror_smooth">Гладко</string>
|
||||
<string name="bottom_mirror_no_frame">Картината на играта не може да се копира в момента.</string>
|
||||
<string name="bottom_guides_wiki">Уики и поправки</string>
|
||||
<string name="bottom_guides_maps">Карти</string>
|
||||
<string name="bottom_guides_saved">Запазени</string>
|
||||
<string name="bottom_guides_tag_all">Всички</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Пълни ръководства</string>
|
||||
<string name="bottom_guides_tag_secrets">Тайни</string>
|
||||
<string name="bottom_guides_pinned">Картата е закачена към картите на играта.</string>
|
||||
<string name="bottom_guides_pin_failed">Изображението не можа да се запази.</string>
|
||||
<string name="bottom_guides_saved_note">Страницата е запазена за офлайн четене.</string>
|
||||
<string name="bottom_guides_search">Търсене в мрежата</string>
|
||||
<string name="bottom_guides_markers">Маркери: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Намиране на карти</string>
|
||||
<string name="bottom_guides_saved_hint">Използвайте „Запази“ в четеца, за да имате страницата офлайн.</string>
|
||||
<string name="bottom_guides_pin">Закачи като карта</string>
|
||||
<string name="bottom_guides_pin_hint">Задръжте върху изображение, за да го закачите като карта.</string>
|
||||
<string name="bottom_guides_marker_hint">Щипнете за мащаб. Задръжте, за да добавите маркер; докоснете маркер, за да го премахнете.</string>
|
||||
<string name="bottom_guides_link_wiki">Уики на играта</string>
|
||||
<string name="bottom_guides_link_pcgw">Поправки от PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Ръководства в YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Видимо</string>
|
||||
<string name="bottom_mirror_hide_black">Скрито</string>
|
||||
<string name="bottom_mirror_hide_dim">Затъмнено</string>
|
||||
<string name="bottom_guides_steam">Ръководства в Steam</string>
|
||||
<string name="bottom_guides_category">Категория</string>
|
||||
<string name="bottom_guides_maps_empty">Още няма закачени карти</string>
|
||||
<string name="bottom_guides_map_name">Карта %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Още няма запазени страници</string>
|
||||
<string name="bottom_mirror_options">Настройки на огледалото</string>
|
||||
<string name="bottom_mirror_region">Област</string>
|
||||
<string name="bottom_mirror_top">Горен екран</string>
|
||||
<string name="bottom_mirror_scaling">Мащабиране</string>
|
||||
<string name="bottom_qam_title">Бърз достъп</string>
|
||||
<string name="bottom_qam_layout">Оформление: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Цяла ширина</string>
|
||||
<string name="bottom_qam_layout_left">Вляво</string>
|
||||
<string name="bottom_qam_layout_center">В центъра</string>
|
||||
<string name="bottom_qam_layout_right">Вдясно</string>
|
||||
<string name="bottom_qam_unavailable">Менюто за бърз достъп на Steam още не е налично.</string>
|
||||
<string name="bottom_page_telemetry">Статистика в играта</string>
|
||||
<string name="bottom_hud_group">HUD на долния екран</string>
|
||||
<string name="bottom_strip_tabs">Лента на всеки раздел</string>
|
||||
|
||||
@@ -2099,6 +2099,13 @@
|
||||
<string name="stats_hud_red_mark">Červená značka označuje místo, kde HUD zobrazuje teplotu červeně.</string>
|
||||
<string name="stats_hud_whole_device">celé zařízení</string>
|
||||
<string name="stats_hud_battery_temp">baterie</string>
|
||||
<string name="bottom_art_title">Obrázky hry</string>
|
||||
<string name="bottom_art_playing">Hraje se</string>
|
||||
<string name="bottom_idle_selected">Vybráno ve Steamu</string>
|
||||
<string name="bottom_idle_recent">Naposledy hráno</string>
|
||||
<string name="bottom_idle_never">Zatím nehráno</string>
|
||||
<string name="bottom_idle_minutes">Odehráno %1$d min</string>
|
||||
<string name="bottom_idle_hours">Odehráno %1$d h</string>
|
||||
<string name="bottom_telemetry_send_title">Odesílat data pro palubní desku</string>
|
||||
<string name="bottom_telemetry_send_auto">Automaticky</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Zapne to pro každou zde uvedenou hru, včetně her nalezených později. Hry, které vypnete, zůstanou vypnuté.</string>
|
||||
@@ -2121,6 +2128,59 @@
|
||||
<string name="bottom_chat_mic_off">Mikrofon vypnut</string>
|
||||
<string name="bottom_chat_mic_unavailable">Mikrofon je pro tuto hru vypnutý. Chcete-li mluvit, zapněte Mikrofon v nastavení Steamu v DroidDecku (Zvuk) a spusťte hru znovu.</string>
|
||||
<string name="bottom_chat_volume">Hlasitost %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Skrýt lištu</string>
|
||||
<string name="bottom_bar_show">Zobrazit lištu</string>
|
||||
<string name="bottom_brightness">Jas spodní obrazovky</string>
|
||||
<string name="bottom_screen_off">Vypnout spodní obrazovku</string>
|
||||
<string name="bottom_page_guides">Návody</string>
|
||||
<string name="bottom_guides_no_game">Spusťte hru a uvidíte zde její návody ze Steamu.</string>
|
||||
<string name="bottom_guides_continue">Pokračovat ve čtení</string>
|
||||
<string name="bottom_guides_empty">Pro tuto hru zatím nejsou žádné návody na Steamu.</string>
|
||||
<string name="bottom_guides_failed">Návody ze Steamu se nepodařilo načíst. Zkuste to znovu, až budete online.</string>
|
||||
<string name="bottom_page_mirror">Zrcadlo</string>
|
||||
<string name="bottom_mirror_pick">Táhnutím označte část hry, která se tu má zobrazit, například minimapu.</string>
|
||||
<string name="bottom_mirror_save">Uložit oblast</string>
|
||||
<string name="bottom_mirror_sharp">Ostré</string>
|
||||
<string name="bottom_mirror_smooth">Hladké</string>
|
||||
<string name="bottom_mirror_no_frame">Obraz hry teď nelze zkopírovat.</string>
|
||||
<string name="bottom_guides_wiki">Wiki a opravy</string>
|
||||
<string name="bottom_guides_maps">Mapy</string>
|
||||
<string name="bottom_guides_saved">Uložené</string>
|
||||
<string name="bottom_guides_tag_all">Vše</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Návody</string>
|
||||
<string name="bottom_guides_tag_secrets">Tajemství</string>
|
||||
<string name="bottom_guides_pinned">Mapa připnuta k mapám této hry.</string>
|
||||
<string name="bottom_guides_pin_failed">Obrázek se nepodařilo uložit.</string>
|
||||
<string name="bottom_guides_saved_note">Stránka uložena pro čtení offline.</string>
|
||||
<string name="bottom_guides_search">Hledat na webu</string>
|
||||
<string name="bottom_guides_markers">Značky: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Najít mapy</string>
|
||||
<string name="bottom_guides_saved_hint">Tlačítkem Uložit ve čtečce si stránku ponecháte offline.</string>
|
||||
<string name="bottom_guides_pin">Připnout jako mapu</string>
|
||||
<string name="bottom_guides_pin_hint">Podržením obrázku jej připnete jako mapu.</string>
|
||||
<string name="bottom_guides_marker_hint">Přiblížíte roztažením prstů. Podržením přidáte značku, klepnutím ji odeberete.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki hry</string>
|
||||
<string name="bottom_guides_link_pcgw">Opravy z PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Návody na YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Zobrazeno</string>
|
||||
<string name="bottom_mirror_hide_black">Skryto</string>
|
||||
<string name="bottom_mirror_hide_dim">Ztlumeno</string>
|
||||
<string name="bottom_guides_steam">Návody Steam</string>
|
||||
<string name="bottom_guides_category">Kategorie</string>
|
||||
<string name="bottom_guides_maps_empty">Zatím žádné připnuté mapy</string>
|
||||
<string name="bottom_guides_map_name">Mapa %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Zatím žádné uložené stránky</string>
|
||||
<string name="bottom_mirror_options">Možnosti zrcadlení</string>
|
||||
<string name="bottom_mirror_region">Oblast</string>
|
||||
<string name="bottom_mirror_top">Horní obrazovka</string>
|
||||
<string name="bottom_mirror_scaling">Škálování</string>
|
||||
<string name="bottom_qam_title">Rychlý přístup</string>
|
||||
<string name="bottom_qam_layout">Rozložení: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Plná šířka</string>
|
||||
<string name="bottom_qam_layout_left">Vlevo</string>
|
||||
<string name="bottom_qam_layout_center">Na střed</string>
|
||||
<string name="bottom_qam_layout_right">Vpravo</string>
|
||||
<string name="bottom_qam_unavailable">Nabídka rychlého přístupu Steamu zatím není k dispozici.</string>
|
||||
<string name="bottom_page_telemetry">Statistiky ve hře</string>
|
||||
<string name="bottom_hud_group">HUD na spodní obrazovce</string>
|
||||
<string name="bottom_strip_tabs">Lišta na každé kartě</string>
|
||||
|
||||
@@ -2049,6 +2049,13 @@
|
||||
<string name="stats_hud_red_mark">Det røde mærke angiver, hvor HUD viser temperaturen i rødt.</string>
|
||||
<string name="stats_hud_whole_device">hele enheden</string>
|
||||
<string name="stats_hud_battery_temp">batteri</string>
|
||||
<string name="bottom_art_title">Spilgrafik</string>
|
||||
<string name="bottom_art_playing">Spiller</string>
|
||||
<string name="bottom_idle_selected">Valgt i Steam</string>
|
||||
<string name="bottom_idle_recent">Senest spillet</string>
|
||||
<string name="bottom_idle_never">Ikke spillet endnu</string>
|
||||
<string name="bottom_idle_minutes">%1$d min spillet</string>
|
||||
<string name="bottom_idle_hours">%1$d t spillet</string>
|
||||
<string name="bottom_telemetry_send_title">Send instrumentbrætdata</string>
|
||||
<string name="bottom_telemetry_send_auto">Auto</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Slår det til for alle spil på listen her, også spil, der findes senere. Spil, du slår fra, forbliver slået fra.</string>
|
||||
@@ -2071,6 +2078,59 @@
|
||||
<string name="bottom_chat_mic_off">Mikrofon fra</string>
|
||||
<string name="bottom_chat_mic_unavailable">Mikrofonen er slået fra for dette spil. For at tale skal du slå Mikrofon til i DroidDecks Steam-indstillinger (Lyd) og starte spillet igen.</string>
|
||||
<string name="bottom_chat_volume">Lydstyrke %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Skjul bjælke</string>
|
||||
<string name="bottom_bar_show">Vis bjælke</string>
|
||||
<string name="bottom_brightness">Lysstyrke på nederste skærm</string>
|
||||
<string name="bottom_screen_off">Sluk den nederste skærm</string>
|
||||
<string name="bottom_page_guides">Guides</string>
|
||||
<string name="bottom_guides_no_game">Start et spil for at se dets Steam-guides her.</string>
|
||||
<string name="bottom_guides_continue">Læs videre</string>
|
||||
<string name="bottom_guides_empty">Der er endnu ingen Steam-guides til dette spil.</string>
|
||||
<string name="bottom_guides_failed">Kunne ikke hente Steam-guides. Prøv igen, når du er online.</string>
|
||||
<string name="bottom_page_mirror">Spejl</string>
|
||||
<string name="bottom_mirror_pick">Træk hen over den del af spillet, der skal vises her, f.eks. minikortet.</string>
|
||||
<string name="bottom_mirror_save">Gem område</string>
|
||||
<string name="bottom_mirror_sharp">Skarp</string>
|
||||
<string name="bottom_mirror_smooth">Blød</string>
|
||||
<string name="bottom_mirror_no_frame">Spillets billede kan ikke kopieres lige nu.</string>
|
||||
<string name="bottom_guides_wiki">Wiki og rettelser</string>
|
||||
<string name="bottom_guides_maps">Kort</string>
|
||||
<string name="bottom_guides_saved">Gemt</string>
|
||||
<string name="bottom_guides_tag_all">Alle</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Gennemgange</string>
|
||||
<string name="bottom_guides_tag_secrets">Hemmeligheder</string>
|
||||
<string name="bottom_guides_pinned">Kortet er fastgjort til spillets kort.</string>
|
||||
<string name="bottom_guides_pin_failed">Billedet kunne ikke gemmes.</string>
|
||||
<string name="bottom_guides_saved_note">Siden er gemt til offline læsning.</string>
|
||||
<string name="bottom_guides_search">Søg på nettet</string>
|
||||
<string name="bottom_guides_markers">Markører: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Find kort</string>
|
||||
<string name="bottom_guides_saved_hint">Brug Gem i læseren for at beholde en side offline.</string>
|
||||
<string name="bottom_guides_pin">Fastgør som kort</string>
|
||||
<string name="bottom_guides_pin_hint">Hold på et billede for at fastgøre det som kort.</string>
|
||||
<string name="bottom_guides_marker_hint">Knib for at zoome. Hold for at tilføje en markør, tryk på en for at fjerne den.</string>
|
||||
<string name="bottom_guides_link_wiki">Spillets wiki</string>
|
||||
<string name="bottom_guides_link_pcgw">Rettelser fra PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Gennemgange på YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Vist</string>
|
||||
<string name="bottom_mirror_hide_black">Skjult</string>
|
||||
<string name="bottom_mirror_hide_dim">Dæmpet</string>
|
||||
<string name="bottom_guides_steam">Steam-guides</string>
|
||||
<string name="bottom_guides_category">Kategori</string>
|
||||
<string name="bottom_guides_maps_empty">Ingen fastgjorte kort endnu</string>
|
||||
<string name="bottom_guides_map_name">Kort %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Ingen gemte sider endnu</string>
|
||||
<string name="bottom_mirror_options">Spejlindstillinger</string>
|
||||
<string name="bottom_mirror_region">Område</string>
|
||||
<string name="bottom_mirror_top">Øverste skærm</string>
|
||||
<string name="bottom_mirror_scaling">Skalering</string>
|
||||
<string name="bottom_qam_title">Hurtig adgang</string>
|
||||
<string name="bottom_qam_layout">Layout: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Fuld bredde</string>
|
||||
<string name="bottom_qam_layout_left">Venstre</string>
|
||||
<string name="bottom_qam_layout_center">Midte</string>
|
||||
<string name="bottom_qam_layout_right">Højre</string>
|
||||
<string name="bottom_qam_unavailable">Steams menu til hurtig adgang er ikke tilgængelig endnu.</string>
|
||||
<string name="bottom_page_telemetry">Statistik i spillet</string>
|
||||
<string name="bottom_hud_group">HUD på nederste skærm</string>
|
||||
<string name="bottom_strip_tabs">Stribe på alle faner</string>
|
||||
|
||||
@@ -2041,6 +2041,13 @@
|
||||
<string name="stats_hud_red_mark">Die rote Markierung kennzeichnet die Stelle, an der das HUD die Temperatur rot anzeigt.</string>
|
||||
<string name="stats_hud_whole_device">ganzes Gerät</string>
|
||||
<string name="stats_hud_battery_temp">Akku</string>
|
||||
<string name="bottom_art_title">Spielgrafik</string>
|
||||
<string name="bottom_art_playing">Wird gespielt</string>
|
||||
<string name="bottom_idle_selected">In Steam ausgewählt</string>
|
||||
<string name="bottom_idle_recent">Zuletzt gespielt</string>
|
||||
<string name="bottom_idle_never">Noch nicht gespielt</string>
|
||||
<string name="bottom_idle_minutes">%1$d Min. gespielt</string>
|
||||
<string name="bottom_idle_hours">%1$d Std. gespielt</string>
|
||||
<string name="bottom_telemetry_send_title">Dashboard-Daten senden</string>
|
||||
<string name="bottom_telemetry_send_auto">Automatisch</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Schaltet es für jedes hier aufgeführte Spiel ein, auch für später gefundene Spiele. Spiele, die du ausschaltest, bleiben aus.</string>
|
||||
@@ -2063,6 +2070,59 @@
|
||||
<string name="bottom_chat_mic_off">Mikro aus</string>
|
||||
<string name="bottom_chat_mic_unavailable">Das Mikro ist für dieses Spiel aus. Um zu sprechen, aktiviere „Mikrofon“ in den Steam-Einstellungen von DroidDeck (Audio) und starte das Spiel neu.</string>
|
||||
<string name="bottom_chat_volume">Lautstärke %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Leiste ausblenden</string>
|
||||
<string name="bottom_bar_show">Leiste einblenden</string>
|
||||
<string name="bottom_brightness">Helligkeit des unteren Bildschirms</string>
|
||||
<string name="bottom_screen_off">Unteren Bildschirm ausschalten</string>
|
||||
<string name="bottom_page_guides">Anleitungen</string>
|
||||
<string name="bottom_guides_no_game">Starte ein Spiel, um hier seine Steam-Anleitungen zu sehen.</string>
|
||||
<string name="bottom_guides_continue">Weiterlesen</string>
|
||||
<string name="bottom_guides_empty">Für dieses Spiel gibt es noch keine Steam-Anleitungen.</string>
|
||||
<string name="bottom_guides_failed">Steam-Anleitungen konnten nicht geladen werden. Versuche es erneut, sobald du online bist.</string>
|
||||
<string name="bottom_page_mirror">Spiegel</string>
|
||||
<string name="bottom_mirror_pick">Ziehe über den Teil des Spiels, der hier erscheinen soll, etwa die Minikarte.</string>
|
||||
<string name="bottom_mirror_save">Bereich speichern</string>
|
||||
<string name="bottom_mirror_sharp">Scharf</string>
|
||||
<string name="bottom_mirror_smooth">Weich</string>
|
||||
<string name="bottom_mirror_no_frame">Das Spielbild kann gerade nicht kopiert werden.</string>
|
||||
<string name="bottom_guides_wiki">Wiki & Fixes</string>
|
||||
<string name="bottom_guides_maps">Karten</string>
|
||||
<string name="bottom_guides_saved">Gespeichert</string>
|
||||
<string name="bottom_guides_tag_all">Alle</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Komplettlösungen</string>
|
||||
<string name="bottom_guides_tag_secrets">Geheimnisse</string>
|
||||
<string name="bottom_guides_pinned">Karte zu den Karten dieses Spiels hinzugefügt.</string>
|
||||
<string name="bottom_guides_pin_failed">Das Bild konnte nicht gespeichert werden.</string>
|
||||
<string name="bottom_guides_saved_note">Seite für das Offline-Lesen gespeichert.</string>
|
||||
<string name="bottom_guides_search">Im Web suchen</string>
|
||||
<string name="bottom_guides_markers">Markierungen: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Karten finden</string>
|
||||
<string name="bottom_guides_saved_hint">Mit „Speichern“ im Reader bleibt eine Seite offline lesbar.</string>
|
||||
<string name="bottom_guides_pin">Als Karte anheften</string>
|
||||
<string name="bottom_guides_pin_hint">Halte ein Bild gedrückt, um es als Karte anzuheften.</string>
|
||||
<string name="bottom_guides_marker_hint">Zum Zoomen auseinanderziehen. Gedrückt halten fügt eine Markierung hinzu, Antippen entfernt sie.</string>
|
||||
<string name="bottom_guides_link_wiki">Spiel-Wiki</string>
|
||||
<string name="bottom_guides_link_pcgw">Fixes von PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Komplettlösungen auf YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Sichtbar</string>
|
||||
<string name="bottom_mirror_hide_black">Verdeckt</string>
|
||||
<string name="bottom_mirror_hide_dim">Abgedunkelt</string>
|
||||
<string name="bottom_guides_steam">Steam-Anleitungen</string>
|
||||
<string name="bottom_guides_category">Kategorie</string>
|
||||
<string name="bottom_guides_maps_empty">Noch keine angehefteten Karten</string>
|
||||
<string name="bottom_guides_map_name">Karte %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Noch keine gespeicherten Seiten</string>
|
||||
<string name="bottom_mirror_options">Spiegeloptionen</string>
|
||||
<string name="bottom_mirror_region">Bereich</string>
|
||||
<string name="bottom_mirror_top">Oberer Bildschirm</string>
|
||||
<string name="bottom_mirror_scaling">Skalierung</string>
|
||||
<string name="bottom_qam_title">Schnellzugriff</string>
|
||||
<string name="bottom_qam_layout">Layout: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Volle Breite</string>
|
||||
<string name="bottom_qam_layout_left">Links</string>
|
||||
<string name="bottom_qam_layout_center">Mitte</string>
|
||||
<string name="bottom_qam_layout_right">Rechts</string>
|
||||
<string name="bottom_qam_unavailable">Das Schnellzugriffsmenü von Steam ist noch nicht verfügbar.</string>
|
||||
<string name="bottom_page_telemetry">Spielstatistiken</string>
|
||||
<string name="bottom_hud_group">HUD für den unteren Bildschirm</string>
|
||||
<string name="bottom_strip_tabs">Leiste auf jedem Tab</string>
|
||||
|
||||
@@ -2049,6 +2049,13 @@
|
||||
<string name="stats_hud_red_mark">Η κόκκινη ένδειξη είναι το σημείο όπου το HUD εμφανίζει τη θερμοκρασία με κόκκινο.</string>
|
||||
<string name="stats_hud_whole_device">ολόκληρη η συσκευή</string>
|
||||
<string name="stats_hud_battery_temp">μπαταρία</string>
|
||||
<string name="bottom_art_title">Εικόνες παιχνιδιού</string>
|
||||
<string name="bottom_art_playing">Παίζεται</string>
|
||||
<string name="bottom_idle_selected">Επιλεγμένο στο Steam</string>
|
||||
<string name="bottom_idle_recent">Παίχτηκε τελευταία</string>
|
||||
<string name="bottom_idle_never">Δεν έχει παιχτεί</string>
|
||||
<string name="bottom_idle_minutes">%1$d λεπ. παιχνιδιού</string>
|
||||
<string name="bottom_idle_hours">%1$d ώρ. παιχνιδιού</string>
|
||||
<string name="bottom_telemetry_send_title">Αποστολή δεδομένων πίνακα</string>
|
||||
<string name="bottom_telemetry_send_auto">Αυτόματα</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Το ενεργοποιεί για κάθε παιχνίδι της λίστας, μαζί και όσα βρεθούν αργότερα. Τα παιχνίδια που απενεργοποιείτε παραμένουν ανενεργά.</string>
|
||||
@@ -2071,6 +2078,59 @@
|
||||
<string name="bottom_chat_mic_off">Μικρόφωνο κλειστό</string>
|
||||
<string name="bottom_chat_mic_unavailable">Το μικρόφωνο είναι απενεργοποιημένο για αυτό το παιχνίδι. Για να μιλήσετε, ενεργοποιήστε το Μικρόφωνο στις ρυθμίσεις Steam του DroidDeck (Ήχος) και ξεκινήστε ξανά το παιχνίδι.</string>
|
||||
<string name="bottom_chat_volume">Ένταση %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Απόκρυψη γραμμής</string>
|
||||
<string name="bottom_bar_show">Εμφάνιση γραμμής</string>
|
||||
<string name="bottom_brightness">Φωτεινότητα κάτω οθόνης</string>
|
||||
<string name="bottom_screen_off">Απενεργοποίηση κάτω οθόνης</string>
|
||||
<string name="bottom_page_guides">Οδηγοί</string>
|
||||
<string name="bottom_guides_no_game">Ξεκινήστε ένα παιχνίδι για να δείτε εδώ τους οδηγούς του στο Steam.</string>
|
||||
<string name="bottom_guides_continue">Συνέχεια ανάγνωσης</string>
|
||||
<string name="bottom_guides_empty">Δεν υπάρχουν ακόμη οδηγοί Steam για αυτό το παιχνίδι.</string>
|
||||
<string name="bottom_guides_failed">Δεν ήταν δυνατή η φόρτωση των οδηγών Steam. Δοκιμάστε ξανά όταν είστε online.</string>
|
||||
<string name="bottom_page_mirror">Καθρέφτης</string>
|
||||
<string name="bottom_mirror_pick">Σύρετε πάνω από το μέρος του παιχνιδιού που θέλετε να εμφανίζεται εδώ, όπως ο μικρός χάρτης.</string>
|
||||
<string name="bottom_mirror_save">Αποθήκευση περιοχής</string>
|
||||
<string name="bottom_mirror_sharp">Οξύ</string>
|
||||
<string name="bottom_mirror_smooth">Ομαλό</string>
|
||||
<string name="bottom_mirror_no_frame">Η εικόνα του παιχνιδιού δεν μπορεί να αντιγραφεί τώρα.</string>
|
||||
<string name="bottom_guides_wiki">Wiki και διορθώσεις</string>
|
||||
<string name="bottom_guides_maps">Χάρτες</string>
|
||||
<string name="bottom_guides_saved">Αποθηκευμένα</string>
|
||||
<string name="bottom_guides_tag_all">Όλα</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Οδηγοί ολοκλήρωσης</string>
|
||||
<string name="bottom_guides_tag_secrets">Μυστικά</string>
|
||||
<string name="bottom_guides_pinned">Ο χάρτης καρφιτσώθηκε στους χάρτες του παιχνιδιού.</string>
|
||||
<string name="bottom_guides_pin_failed">Δεν ήταν δυνατή η αποθήκευση της εικόνας.</string>
|
||||
<string name="bottom_guides_saved_note">Η σελίδα αποθηκεύτηκε για ανάγνωση εκτός σύνδεσης.</string>
|
||||
<string name="bottom_guides_search">Αναζήτηση στο web</string>
|
||||
<string name="bottom_guides_markers">Σημάδια: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Εύρεση χαρτών</string>
|
||||
<string name="bottom_guides_saved_hint">Χρησιμοποιήστε την Αποθήκευση στον αναγνώστη για να κρατήσετε μια σελίδα εκτός σύνδεσης.</string>
|
||||
<string name="bottom_guides_pin">Καρφίτσωμα ως χάρτη</string>
|
||||
<string name="bottom_guides_pin_hint">Πατήστε παρατεταμένα μια εικόνα για να την καρφιτσώσετε ως χάρτη.</string>
|
||||
<string name="bottom_guides_marker_hint">Τσιμπήστε για ζουμ. Πατήστε παρατεταμένα για σημάδι, πατήστε ένα για να το αφαιρέσετε.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki του παιχνιδιού</string>
|
||||
<string name="bottom_guides_link_pcgw">Διορθώσεις από PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Οδηγοί στο YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Εμφανές</string>
|
||||
<string name="bottom_mirror_hide_black">Κρυφό</string>
|
||||
<string name="bottom_mirror_hide_dim">Σκοτεινό</string>
|
||||
<string name="bottom_guides_steam">Οδηγοί Steam</string>
|
||||
<string name="bottom_guides_category">Κατηγορία</string>
|
||||
<string name="bottom_guides_maps_empty">Δεν υπάρχουν καρφιτσωμένοι χάρτες</string>
|
||||
<string name="bottom_guides_map_name">Χάρτης %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Δεν υπάρχουν αποθηκευμένες σελίδες</string>
|
||||
<string name="bottom_mirror_options">Επιλογές καθρέφτη</string>
|
||||
<string name="bottom_mirror_region">Περιοχή</string>
|
||||
<string name="bottom_mirror_top">Πάνω οθόνη</string>
|
||||
<string name="bottom_mirror_scaling">Κλιμάκωση</string>
|
||||
<string name="bottom_qam_title">Γρήγορη πρόσβαση</string>
|
||||
<string name="bottom_qam_layout">Διάταξη: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Πλήρες πλάτος</string>
|
||||
<string name="bottom_qam_layout_left">Αριστερά</string>
|
||||
<string name="bottom_qam_layout_center">Κέντρο</string>
|
||||
<string name="bottom_qam_layout_right">Δεξιά</string>
|
||||
<string name="bottom_qam_unavailable">Το μενού γρήγορης πρόσβασης του Steam δεν είναι ακόμη διαθέσιμο.</string>
|
||||
<string name="bottom_page_telemetry">Στατιστικά παιχνιδιού</string>
|
||||
<string name="bottom_hud_group">HUD κάτω οθόνης</string>
|
||||
<string name="bottom_strip_tabs">Λωρίδα σε κάθε καρτέλα</string>
|
||||
|
||||
@@ -2074,6 +2074,13 @@
|
||||
<string name="stats_hud_red_mark">La marca roja señala el punto en el que el HUD muestra la temperatura en rojo.</string>
|
||||
<string name="stats_hud_whole_device">todo el dispositivo</string>
|
||||
<string name="stats_hud_battery_temp">batería</string>
|
||||
<string name="bottom_art_title">Arte del juego</string>
|
||||
<string name="bottom_art_playing">Jugando</string>
|
||||
<string name="bottom_idle_selected">Seleccionado en Steam</string>
|
||||
<string name="bottom_idle_recent">Jugado por última vez</string>
|
||||
<string name="bottom_idle_never">Aún sin jugar</string>
|
||||
<string name="bottom_idle_minutes">%1$d min jugados</string>
|
||||
<string name="bottom_idle_hours">%1$d h jugadas</string>
|
||||
<string name="bottom_telemetry_send_title">Enviar datos al panel</string>
|
||||
<string name="bottom_telemetry_send_auto">Automático</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Lo activa en todos los juegos de esta lista, incluidos los que se encuentren más adelante. Los juegos que desactives seguirán desactivados.</string>
|
||||
@@ -2096,6 +2103,59 @@
|
||||
<string name="bottom_chat_mic_off">Micro desactivado</string>
|
||||
<string name="bottom_chat_mic_unavailable">El micro está desactivado en este juego. Para hablar, activa Micrófono en los ajustes de Steam de DroidDeck (Audio) y vuelve a iniciar el juego.</string>
|
||||
<string name="bottom_chat_volume">Volumen %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Ocultar barra</string>
|
||||
<string name="bottom_bar_show">Mostrar barra</string>
|
||||
<string name="bottom_brightness">Brillo de la pantalla inferior</string>
|
||||
<string name="bottom_screen_off">Apagar la pantalla inferior</string>
|
||||
<string name="bottom_page_guides">Guías</string>
|
||||
<string name="bottom_guides_no_game">Inicia un juego para ver aquí sus guías de Steam.</string>
|
||||
<string name="bottom_guides_continue">Seguir leyendo</string>
|
||||
<string name="bottom_guides_empty">Este juego aún no tiene guías de Steam.</string>
|
||||
<string name="bottom_guides_failed">No se han podido cargar las guías de Steam. Vuelve a intentarlo cuando tengas conexión.</string>
|
||||
<string name="bottom_page_mirror">Espejo</string>
|
||||
<string name="bottom_mirror_pick">Arrastra sobre la parte del juego que quieras ver aquí, como el minimapa.</string>
|
||||
<string name="bottom_mirror_save">Guardar región</string>
|
||||
<string name="bottom_mirror_sharp">Nítido</string>
|
||||
<string name="bottom_mirror_smooth">Suave</string>
|
||||
<string name="bottom_mirror_no_frame">Ahora no se puede copiar la imagen del juego.</string>
|
||||
<string name="bottom_guides_wiki">Wiki y soluciones</string>
|
||||
<string name="bottom_guides_maps">Mapas</string>
|
||||
<string name="bottom_guides_saved">Guardado</string>
|
||||
<string name="bottom_guides_tag_all">Todo</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Guías completas</string>
|
||||
<string name="bottom_guides_tag_secrets">Secretos</string>
|
||||
<string name="bottom_guides_pinned">Mapa fijado en los mapas de este juego.</string>
|
||||
<string name="bottom_guides_pin_failed">No se ha podido guardar esa imagen.</string>
|
||||
<string name="bottom_guides_saved_note">Página guardada para leer sin conexión.</string>
|
||||
<string name="bottom_guides_search">Buscar en la web</string>
|
||||
<string name="bottom_guides_markers">Marcadores: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Buscar mapas</string>
|
||||
<string name="bottom_guides_saved_hint">Usa Guardar en el lector para conservar una página sin conexión.</string>
|
||||
<string name="bottom_guides_pin">Fijar como mapa</string>
|
||||
<string name="bottom_guides_pin_hint">Mantén pulsada una imagen para fijarla como mapa.</string>
|
||||
<string name="bottom_guides_marker_hint">Pellizca para ampliar. Mantén pulsado para añadir un marcador y tócalo para quitarlo.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki del juego</string>
|
||||
<string name="bottom_guides_link_pcgw">Soluciones de PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Guías en YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Visible</string>
|
||||
<string name="bottom_mirror_hide_black">Oculto</string>
|
||||
<string name="bottom_mirror_hide_dim">Atenuado</string>
|
||||
<string name="bottom_guides_steam">Guías de Steam</string>
|
||||
<string name="bottom_guides_category">Categoría</string>
|
||||
<string name="bottom_guides_maps_empty">Aún no hay mapas fijados</string>
|
||||
<string name="bottom_guides_map_name">Mapa %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Aún no hay páginas guardadas</string>
|
||||
<string name="bottom_mirror_options">Opciones de espejo</string>
|
||||
<string name="bottom_mirror_region">Región</string>
|
||||
<string name="bottom_mirror_top">Pantalla superior</string>
|
||||
<string name="bottom_mirror_scaling">Escalado</string>
|
||||
<string name="bottom_qam_title">Acceso rápido</string>
|
||||
<string name="bottom_qam_layout">Diseño: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Ancho completo</string>
|
||||
<string name="bottom_qam_layout_left">Izquierda</string>
|
||||
<string name="bottom_qam_layout_center">Centro</string>
|
||||
<string name="bottom_qam_layout_right">Derecha</string>
|
||||
<string name="bottom_qam_unavailable">El menú de acceso rápido de Steam aún no está disponible.</string>
|
||||
<string name="bottom_page_telemetry">Estadísticas del juego</string>
|
||||
<string name="bottom_hud_group">HUD de la pantalla inferior</string>
|
||||
<string name="bottom_strip_tabs">Barra en todas las pestañas</string>
|
||||
|
||||
@@ -2049,6 +2049,13 @@
|
||||
<string name="stats_hud_red_mark">Punainen merkki on kohta, jossa HUD alkaa näyttää lämpötilan punaisena.</string>
|
||||
<string name="stats_hud_whole_device">koko laite</string>
|
||||
<string name="stats_hud_battery_temp">akku</string>
|
||||
<string name="bottom_art_title">Pelin kuvitus</string>
|
||||
<string name="bottom_art_playing">Pelataan</string>
|
||||
<string name="bottom_idle_selected">Valittu Steamissä</string>
|
||||
<string name="bottom_idle_recent">Viimeksi pelattu</string>
|
||||
<string name="bottom_idle_never">Ei vielä pelattu</string>
|
||||
<string name="bottom_idle_minutes">Pelattu %1$d min</string>
|
||||
<string name="bottom_idle_hours">Pelattu %1$d h</string>
|
||||
<string name="bottom_telemetry_send_title">Lähetä kojelaudan tiedot</string>
|
||||
<string name="bottom_telemetry_send_auto">Automaattinen</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Kytkee sen päälle jokaiselle tässä luetellulle pelille, myös myöhemmin löytyville. Pois kytkemäsi pelit pysyvät pois päältä.</string>
|
||||
@@ -2071,6 +2078,59 @@
|
||||
<string name="bottom_chat_mic_off">Mikrofoni pois</string>
|
||||
<string name="bottom_chat_mic_unavailable">Mikrofoni on pois päältä tässä pelissä. Jos haluat puhua, kytke Mikrofoni päälle DroidDeckin Steam-asetuksissa (Ääni) ja käynnistä peli uudelleen.</string>
|
||||
<string name="bottom_chat_volume">Äänenvoimakkuus %1$d %%</string>
|
||||
<string name="bottom_bar_hide">Piilota palkki</string>
|
||||
<string name="bottom_bar_show">Näytä palkki</string>
|
||||
<string name="bottom_brightness">Alanäytön kirkkaus</string>
|
||||
<string name="bottom_screen_off">Sammuta alanäyttö</string>
|
||||
<string name="bottom_page_guides">Oppaat</string>
|
||||
<string name="bottom_guides_no_game">Käynnistä peli nähdäksesi sen Steam-oppaat täällä.</string>
|
||||
<string name="bottom_guides_continue">Jatka lukemista</string>
|
||||
<string name="bottom_guides_empty">Tälle pelille ei ole vielä Steam-oppaita.</string>
|
||||
<string name="bottom_guides_failed">Steam-oppaiden lataus epäonnistui. Yritä uudelleen, kun olet verkossa.</string>
|
||||
<string name="bottom_page_mirror">Peili</string>
|
||||
<string name="bottom_mirror_pick">Vedä sen pelin osan yli, joka näytetään täällä, kuten minikartan.</string>
|
||||
<string name="bottom_mirror_save">Tallenna alue</string>
|
||||
<string name="bottom_mirror_sharp">Terävä</string>
|
||||
<string name="bottom_mirror_smooth">Pehmeä</string>
|
||||
<string name="bottom_mirror_no_frame">Pelikuvaa ei voi kopioida juuri nyt.</string>
|
||||
<string name="bottom_guides_wiki">Wiki ja korjaukset</string>
|
||||
<string name="bottom_guides_maps">Kartat</string>
|
||||
<string name="bottom_guides_saved">Tallennetut</string>
|
||||
<string name="bottom_guides_tag_all">Kaikki</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Läpipeluut</string>
|
||||
<string name="bottom_guides_tag_secrets">Salaisuudet</string>
|
||||
<string name="bottom_guides_pinned">Kartta kiinnitetty pelin karttoihin.</string>
|
||||
<string name="bottom_guides_pin_failed">Kuvaa ei voitu tallentaa.</string>
|
||||
<string name="bottom_guides_saved_note">Sivu tallennettu offline-lukua varten.</string>
|
||||
<string name="bottom_guides_search">Hae verkosta</string>
|
||||
<string name="bottom_guides_markers">Merkit: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Etsi karttoja</string>
|
||||
<string name="bottom_guides_saved_hint">Tallenna lukijassa, niin sivu toimii myös offline.</string>
|
||||
<string name="bottom_guides_pin">Kiinnitä kartaksi</string>
|
||||
<string name="bottom_guides_pin_hint">Kiinnitä kuva kartaksi painamalla sitä pitkään.</string>
|
||||
<string name="bottom_guides_marker_hint">Zoomaa nipistämällä. Lisää merkki painamalla pitkään, poista napauttamalla.</string>
|
||||
<string name="bottom_guides_link_wiki">Pelin wiki</string>
|
||||
<string name="bottom_guides_link_pcgw">PCGamingWikin korjaukset</string>
|
||||
<string name="bottom_guides_search_youtube">Läpipeluut YouTubessa</string>
|
||||
<string name="bottom_mirror_hide_off">Näkyvissä</string>
|
||||
<string name="bottom_mirror_hide_black">Piilotettu</string>
|
||||
<string name="bottom_mirror_hide_dim">Himmennetty</string>
|
||||
<string name="bottom_guides_steam">Steam-oppaat</string>
|
||||
<string name="bottom_guides_category">Luokka</string>
|
||||
<string name="bottom_guides_maps_empty">Ei vielä kiinnitettyjä karttoja</string>
|
||||
<string name="bottom_guides_map_name">Kartta %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Ei vielä tallennettuja sivuja</string>
|
||||
<string name="bottom_mirror_options">Peilauksen asetukset</string>
|
||||
<string name="bottom_mirror_region">Alue</string>
|
||||
<string name="bottom_mirror_top">Ylänäyttö</string>
|
||||
<string name="bottom_mirror_scaling">Skaalaus</string>
|
||||
<string name="bottom_qam_title">Pikavalikko</string>
|
||||
<string name="bottom_qam_layout">Asettelu: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Koko leveys</string>
|
||||
<string name="bottom_qam_layout_left">Vasen</string>
|
||||
<string name="bottom_qam_layout_center">Keskellä</string>
|
||||
<string name="bottom_qam_layout_right">Oikea</string>
|
||||
<string name="bottom_qam_unavailable">Steamin pikavalikko ei ole vielä käytettävissä.</string>
|
||||
<string name="bottom_page_telemetry">Pelinsisäiset tilastot</string>
|
||||
<string name="bottom_hud_group">Alanäytön HUD</string>
|
||||
<string name="bottom_strip_tabs">Palkki kaikilla välilehdillä</string>
|
||||
|
||||
@@ -2073,6 +2073,13 @@
|
||||
<string name="stats_hud_red_mark">Le repère rouge indique où le HUD affiche la température en rouge.</string>
|
||||
<string name="stats_hud_whole_device">appareil entier</string>
|
||||
<string name="stats_hud_battery_temp">batterie</string>
|
||||
<string name="bottom_art_title">Illustration du jeu</string>
|
||||
<string name="bottom_art_playing">En cours</string>
|
||||
<string name="bottom_idle_selected">Sélectionné dans Steam</string>
|
||||
<string name="bottom_idle_recent">Joué récemment</string>
|
||||
<string name="bottom_idle_never">Pas encore joué</string>
|
||||
<string name="bottom_idle_minutes">%1$d min de jeu</string>
|
||||
<string name="bottom_idle_hours">%1$d h de jeu</string>
|
||||
<string name="bottom_telemetry_send_title">Envoyer les données du tableau de bord</string>
|
||||
<string name="bottom_telemetry_send_auto">Automatique</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">L\'active pour chaque jeu listé ici, y compris les jeux trouvés plus tard. Les jeux que vous désactivez restent désactivés.</string>
|
||||
@@ -2095,6 +2102,59 @@
|
||||
<string name="bottom_chat_mic_off">Micro désactivé</string>
|
||||
<string name="bottom_chat_mic_unavailable">Le micro est désactivé pour ce jeu. Pour parler, activez Microphone dans les paramètres Steam de DroidDeck (Audio), puis relancez le jeu.</string>
|
||||
<string name="bottom_chat_volume">Volume %1$d %%</string>
|
||||
<string name="bottom_bar_hide">Masquer la barre</string>
|
||||
<string name="bottom_bar_show">Afficher la barre</string>
|
||||
<string name="bottom_brightness">Luminosité de l’écran inférieur</string>
|
||||
<string name="bottom_screen_off">Éteindre l’écran du bas</string>
|
||||
<string name="bottom_page_guides">Guides</string>
|
||||
<string name="bottom_guides_no_game">Lancez un jeu pour voir ses guides Steam ici.</string>
|
||||
<string name="bottom_guides_continue">Reprendre la lecture</string>
|
||||
<string name="bottom_guides_empty">Ce jeu n’a pas encore de guides Steam.</string>
|
||||
<string name="bottom_guides_failed">Impossible de charger les guides Steam. Réessayez une fois en ligne.</string>
|
||||
<string name="bottom_page_mirror">Miroir</string>
|
||||
<string name="bottom_mirror_pick">Faites glisser sur la partie du jeu à afficher ici, comme la mini-carte.</string>
|
||||
<string name="bottom_mirror_save">Enregistrer la zone</string>
|
||||
<string name="bottom_mirror_sharp">Net</string>
|
||||
<string name="bottom_mirror_smooth">Lissé</string>
|
||||
<string name="bottom_mirror_no_frame">L’image du jeu ne peut pas être copiée pour le moment.</string>
|
||||
<string name="bottom_guides_wiki">Wiki et correctifs</string>
|
||||
<string name="bottom_guides_maps">Cartes</string>
|
||||
<string name="bottom_guides_saved">Enregistré</string>
|
||||
<string name="bottom_guides_tag_all">Tout</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Soluces</string>
|
||||
<string name="bottom_guides_tag_secrets">Secrets</string>
|
||||
<string name="bottom_guides_pinned">Carte épinglée aux cartes de ce jeu.</string>
|
||||
<string name="bottom_guides_pin_failed">Impossible d’enregistrer cette image.</string>
|
||||
<string name="bottom_guides_saved_note">Page enregistrée pour une lecture hors ligne.</string>
|
||||
<string name="bottom_guides_search">Rechercher sur le web</string>
|
||||
<string name="bottom_guides_markers">Repères : %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Trouver des cartes</string>
|
||||
<string name="bottom_guides_saved_hint">Utilisez Enregistrer dans le lecteur pour garder une page hors ligne.</string>
|
||||
<string name="bottom_guides_pin">Épingler comme carte</string>
|
||||
<string name="bottom_guides_pin_hint">Appuyez longuement sur une image pour l’épingler comme carte.</string>
|
||||
<string name="bottom_guides_marker_hint">Pincez pour zoomer. Appui long pour ajouter un repère, touchez-en un pour le retirer.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki du jeu</string>
|
||||
<string name="bottom_guides_link_pcgw">Correctifs PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Soluces sur YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Visible</string>
|
||||
<string name="bottom_mirror_hide_black">Masqué</string>
|
||||
<string name="bottom_mirror_hide_dim">Assombri</string>
|
||||
<string name="bottom_guides_steam">Guides Steam</string>
|
||||
<string name="bottom_guides_category">Catégorie</string>
|
||||
<string name="bottom_guides_maps_empty">Aucune carte épinglée</string>
|
||||
<string name="bottom_guides_map_name">Carte %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Aucune page enregistrée</string>
|
||||
<string name="bottom_mirror_options">Options du miroir</string>
|
||||
<string name="bottom_mirror_region">Zone</string>
|
||||
<string name="bottom_mirror_top">Écran du haut</string>
|
||||
<string name="bottom_mirror_scaling">Mise à l’échelle</string>
|
||||
<string name="bottom_qam_title">Accès rapide</string>
|
||||
<string name="bottom_qam_layout">Disposition : %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Pleine largeur</string>
|
||||
<string name="bottom_qam_layout_left">Gauche</string>
|
||||
<string name="bottom_qam_layout_center">Centre</string>
|
||||
<string name="bottom_qam_layout_right">Droite</string>
|
||||
<string name="bottom_qam_unavailable">Le menu d’accès rapide de Steam n’est pas encore disponible.</string>
|
||||
<string name="bottom_page_telemetry">Statistiques en jeu</string>
|
||||
<string name="bottom_hud_group">HUD de l\'écran du bas</string>
|
||||
<string name="bottom_strip_tabs">Bande sur tous les onglets</string>
|
||||
|
||||
@@ -2049,6 +2049,13 @@
|
||||
<string name="stats_hud_red_mark">लाल निशान वह बिंदु है जहाँ HUD तापमान को लाल रंग में दिखाता है।</string>
|
||||
<string name="stats_hud_whole_device">पूरा डिवाइस</string>
|
||||
<string name="stats_hud_battery_temp">बैटरी</string>
|
||||
<string name="bottom_art_title">गेम आर्ट</string>
|
||||
<string name="bottom_art_playing">खेल रहे हैं</string>
|
||||
<string name="bottom_idle_selected">Steam में चुना गया</string>
|
||||
<string name="bottom_idle_recent">पिछली बार खेला</string>
|
||||
<string name="bottom_idle_never">अभी तक नहीं खेला</string>
|
||||
<string name="bottom_idle_minutes">%1$d मिनट खेला</string>
|
||||
<string name="bottom_idle_hours">%1$d घंटे खेला</string>
|
||||
<string name="bottom_telemetry_send_title">डैशबोर्ड डेटा भेजें</string>
|
||||
<string name="bottom_telemetry_send_auto">ऑटोमैटिक</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">यहां दिए हर गेम के लिए इसे चालू करता है, बाद में मिलने वाले गेम भी शामिल हैं। जिन गेम को आप बंद करते हैं, वे बंद ही रहते हैं।</string>
|
||||
@@ -2071,6 +2078,59 @@
|
||||
<string name="bottom_chat_mic_off">माइक बंद</string>
|
||||
<string name="bottom_chat_mic_unavailable">इस गेम के लिए माइक बंद है। बात करने के लिए DroidDeck की Steam सेटिंग (ऑडियो) में माइक्रोफ़ोन चालू करें और गेम फिर से शुरू करें।</string>
|
||||
<string name="bottom_chat_volume">वॉल्यूम %1$d%%</string>
|
||||
<string name="bottom_bar_hide">बार छिपाएँ</string>
|
||||
<string name="bottom_bar_show">बार दिखाएँ</string>
|
||||
<string name="bottom_brightness">नीचे की स्क्रीन की चमक</string>
|
||||
<string name="bottom_screen_off">नीचे की स्क्रीन बंद करें</string>
|
||||
<string name="bottom_page_guides">गाइड</string>
|
||||
<string name="bottom_guides_no_game">यहाँ Steam गाइड देखने के लिए कोई गेम शुरू करें।</string>
|
||||
<string name="bottom_guides_continue">पढ़ना जारी रखें</string>
|
||||
<string name="bottom_guides_empty">इस गेम के लिए अभी कोई Steam गाइड नहीं है।</string>
|
||||
<string name="bottom_guides_failed">Steam गाइड लोड नहीं हो सके। ऑनलाइन होने पर फिर देखें।</string>
|
||||
<string name="bottom_page_mirror">मिरर</string>
|
||||
<string name="bottom_mirror_pick">गेम का वह हिस्सा चुनने के लिए खींचें जो यहाँ दिखे, जैसे मिनीमैप।</string>
|
||||
<string name="bottom_mirror_save">क्षेत्र सहेजें</string>
|
||||
<string name="bottom_mirror_sharp">तेज़</string>
|
||||
<string name="bottom_mirror_smooth">मुलायम</string>
|
||||
<string name="bottom_mirror_no_frame">गेम की तस्वीर अभी कॉपी नहीं हो सकती।</string>
|
||||
<string name="bottom_guides_wiki">विकी और सुधार</string>
|
||||
<string name="bottom_guides_maps">नक्शे</string>
|
||||
<string name="bottom_guides_saved">सहेजे गए</string>
|
||||
<string name="bottom_guides_tag_all">सभी</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">वॉकथ्रू</string>
|
||||
<string name="bottom_guides_tag_secrets">रहस्य</string>
|
||||
<string name="bottom_guides_pinned">नक्शा इस गेम के नक्शों में पिन किया गया।</string>
|
||||
<string name="bottom_guides_pin_failed">वह छवि सहेजी नहीं जा सकी।</string>
|
||||
<string name="bottom_guides_saved_note">पेज ऑफ़लाइन पढ़ने के लिए सहेजा गया।</string>
|
||||
<string name="bottom_guides_search">वेब पर खोजें</string>
|
||||
<string name="bottom_guides_markers">मार्कर: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">नक्शे खोजें</string>
|
||||
<string name="bottom_guides_saved_hint">पेज ऑफ़लाइन रखने के लिए रीडर में सहेजें दबाएँ।</string>
|
||||
<string name="bottom_guides_pin">नक्शे के रूप में पिन करें</string>
|
||||
<string name="bottom_guides_pin_hint">किसी छवि को नक्शे के रूप में पिन करने के लिए देर तक दबाएँ।</string>
|
||||
<string name="bottom_guides_marker_hint">ज़ूम के लिए पिंच करें। मार्कर जोड़ने के लिए देर तक दबाएँ, हटाने के लिए उस पर टैप करें।</string>
|
||||
<string name="bottom_guides_link_wiki">गेम विकी</string>
|
||||
<string name="bottom_guides_link_pcgw">PCGamingWiki सुधार</string>
|
||||
<string name="bottom_guides_search_youtube">YouTube वॉकथ्रू</string>
|
||||
<string name="bottom_mirror_hide_off">दिखाया गया</string>
|
||||
<string name="bottom_mirror_hide_black">छिपाया गया</string>
|
||||
<string name="bottom_mirror_hide_dim">मंद</string>
|
||||
<string name="bottom_guides_steam">Steam गाइड</string>
|
||||
<string name="bottom_guides_category">श्रेणी</string>
|
||||
<string name="bottom_guides_maps_empty">अभी कोई पिन किया नक्शा नहीं</string>
|
||||
<string name="bottom_guides_map_name">नक्शा %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">अभी कोई सहेजा पेज नहीं</string>
|
||||
<string name="bottom_mirror_options">मिरर विकल्प</string>
|
||||
<string name="bottom_mirror_region">क्षेत्र</string>
|
||||
<string name="bottom_mirror_top">ऊपर की स्क्रीन</string>
|
||||
<string name="bottom_mirror_scaling">स्केलिंग</string>
|
||||
<string name="bottom_qam_title">क्विक एक्सेस</string>
|
||||
<string name="bottom_qam_layout">लेआउट: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">पूरी चौड़ाई</string>
|
||||
<string name="bottom_qam_layout_left">बाएँ</string>
|
||||
<string name="bottom_qam_layout_center">बीच में</string>
|
||||
<string name="bottom_qam_layout_right">दाएँ</string>
|
||||
<string name="bottom_qam_unavailable">Steam का क्विक एक्सेस मेनू अभी उपलब्ध नहीं है।</string>
|
||||
<string name="bottom_page_telemetry">इन-गेम आंकड़े</string>
|
||||
<string name="bottom_hud_group">निचली स्क्रीन HUD</string>
|
||||
<string name="bottom_strip_tabs">हर टैब पर स्ट्रिप</string>
|
||||
|
||||
@@ -2049,6 +2049,13 @@
|
||||
<string name="stats_hud_red_mark">A piros jelölés jelzi, hol jeleníti meg pirosan a HUD a hőmérsékletet.</string>
|
||||
<string name="stats_hud_whole_device">teljes eszköz</string>
|
||||
<string name="stats_hud_battery_temp">akkumulátor</string>
|
||||
<string name="bottom_art_title">Játékgrafika</string>
|
||||
<string name="bottom_art_playing">Játékban</string>
|
||||
<string name="bottom_idle_selected">Kiválasztva a Steamben</string>
|
||||
<string name="bottom_idle_recent">Legutóbb játszott</string>
|
||||
<string name="bottom_idle_never">Még nem játszott</string>
|
||||
<string name="bottom_idle_minutes">%1$d perc játék</string>
|
||||
<string name="bottom_idle_hours">%1$d óra játék</string>
|
||||
<string name="bottom_telemetry_send_title">Műszerfal-adatok küldése</string>
|
||||
<string name="bottom_telemetry_send_auto">Automatikus</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Bekapcsolja az itt felsorolt összes játéknál, a később talált játékokat is beleértve. A kikapcsolt játékok kikapcsolva maradnak.</string>
|
||||
@@ -2071,6 +2078,59 @@
|
||||
<string name="bottom_chat_mic_off">Mikrofon ki</string>
|
||||
<string name="bottom_chat_mic_unavailable">A mikrofon ki van kapcsolva ennél a játéknál. A beszédhez kapcsolja be a Mikrofon opciót a DroidDeck Steam-beállításaiban (Hang), majd indítsa újra a játékot.</string>
|
||||
<string name="bottom_chat_volume">Hangerő %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Sáv elrejtése</string>
|
||||
<string name="bottom_bar_show">Sáv megjelenítése</string>
|
||||
<string name="bottom_brightness">Alsó kijelző fényereje</string>
|
||||
<string name="bottom_screen_off">Alsó képernyő kikapcsolása</string>
|
||||
<string name="bottom_page_guides">Útmutatók</string>
|
||||
<string name="bottom_guides_no_game">Indíts el egy játékot, hogy itt lásd a Steam-útmutatóit.</string>
|
||||
<string name="bottom_guides_continue">Olvasás folytatása</string>
|
||||
<string name="bottom_guides_empty">Ehhez a játékhoz még nincs Steam-útmutató.</string>
|
||||
<string name="bottom_guides_failed">Nem sikerült betölteni a Steam-útmutatókat. Próbáld újra, ha online vagy.</string>
|
||||
<string name="bottom_page_mirror">Tükör</string>
|
||||
<string name="bottom_mirror_pick">Húzd át a játék azon részét, amelyet itt szeretnél látni, például a minitérképet.</string>
|
||||
<string name="bottom_mirror_save">Terület mentése</string>
|
||||
<string name="bottom_mirror_sharp">Éles</string>
|
||||
<string name="bottom_mirror_smooth">Lágy</string>
|
||||
<string name="bottom_mirror_no_frame">A játék képe most nem másolható.</string>
|
||||
<string name="bottom_guides_wiki">Wiki és javítások</string>
|
||||
<string name="bottom_guides_maps">Térképek</string>
|
||||
<string name="bottom_guides_saved">Mentett</string>
|
||||
<string name="bottom_guides_tag_all">Mind</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Végigjátszások</string>
|
||||
<string name="bottom_guides_tag_secrets">Titkok</string>
|
||||
<string name="bottom_guides_pinned">A térkép a játék térképei közé került.</string>
|
||||
<string name="bottom_guides_pin_failed">A képet nem sikerült menteni.</string>
|
||||
<string name="bottom_guides_saved_note">Az oldal offline olvasásra mentve.</string>
|
||||
<string name="bottom_guides_search">Keresés a weben</string>
|
||||
<string name="bottom_guides_markers">Jelölők: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Térképek keresése</string>
|
||||
<string name="bottom_guides_saved_hint">A Mentés gombbal az oldal offline is olvasható marad.</string>
|
||||
<string name="bottom_guides_pin">Kitűzés térképként</string>
|
||||
<string name="bottom_guides_pin_hint">Tarts lenyomva egy képet, hogy térképként kitűzd.</string>
|
||||
<string name="bottom_guides_marker_hint">Csípd a nagyításhoz. Hosszú nyomással jelölőt adsz hozzá, koppintással törlöd.</string>
|
||||
<string name="bottom_guides_link_wiki">A játék wikije</string>
|
||||
<string name="bottom_guides_link_pcgw">PCGamingWiki-javítások</string>
|
||||
<string name="bottom_guides_search_youtube">Végigjátszások a YouTube-on</string>
|
||||
<string name="bottom_mirror_hide_off">Látható</string>
|
||||
<string name="bottom_mirror_hide_black">Rejtett</string>
|
||||
<string name="bottom_mirror_hide_dim">Sötétített</string>
|
||||
<string name="bottom_guides_steam">Steam-útmutatók</string>
|
||||
<string name="bottom_guides_category">Kategória</string>
|
||||
<string name="bottom_guides_maps_empty">Még nincs kitűzött térkép</string>
|
||||
<string name="bottom_guides_map_name">%1$d. térkép</string>
|
||||
<string name="bottom_guides_saved_empty">Még nincs mentett oldal</string>
|
||||
<string name="bottom_mirror_options">Tükrözés beállításai</string>
|
||||
<string name="bottom_mirror_region">Terület</string>
|
||||
<string name="bottom_mirror_top">Felső képernyő</string>
|
||||
<string name="bottom_mirror_scaling">Méretezés</string>
|
||||
<string name="bottom_qam_title">Gyorselérés</string>
|
||||
<string name="bottom_qam_layout">Elrendezés: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Teljes szélesség</string>
|
||||
<string name="bottom_qam_layout_left">Balra</string>
|
||||
<string name="bottom_qam_layout_center">Középen</string>
|
||||
<string name="bottom_qam_layout_right">Jobbra</string>
|
||||
<string name="bottom_qam_unavailable">A Steam gyorselérési menüje még nem érhető el.</string>
|
||||
<string name="bottom_page_telemetry">Játékon belüli statisztikák</string>
|
||||
<string name="bottom_hud_group">HUD az alsó képernyőn</string>
|
||||
<string name="bottom_strip_tabs">Sáv minden lapon</string>
|
||||
|
||||
@@ -2025,6 +2025,13 @@
|
||||
<string name="stats_hud_red_mark">Tanda merah adalah batas saat HUD menampilkan suhu berwarna merah.</string>
|
||||
<string name="stats_hud_whole_device">seluruh perangkat</string>
|
||||
<string name="stats_hud_battery_temp">baterai</string>
|
||||
<string name="bottom_art_title">Gambar game</string>
|
||||
<string name="bottom_art_playing">Sedang dimainkan</string>
|
||||
<string name="bottom_idle_selected">Dipilih di Steam</string>
|
||||
<string name="bottom_idle_recent">Terakhir dimainkan</string>
|
||||
<string name="bottom_idle_never">Belum dimainkan</string>
|
||||
<string name="bottom_idle_minutes">%1$d mnt dimainkan</string>
|
||||
<string name="bottom_idle_hours">%1$d jam dimainkan</string>
|
||||
<string name="bottom_telemetry_send_title">Kirim data dasbor</string>
|
||||
<string name="bottom_telemetry_send_auto">Otomatis</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Mengaktifkannya untuk setiap gim yang tercantum di sini, termasuk gim yang ditemukan nanti. Gim yang Anda matikan tetap mati.</string>
|
||||
@@ -2047,6 +2054,59 @@
|
||||
<string name="bottom_chat_mic_off">Mik mati</string>
|
||||
<string name="bottom_chat_mic_unavailable">Mik mati untuk gim ini. Untuk berbicara, aktifkan Mikrofon di setelan Steam DroidDeck (Audio) lalu mulai gim lagi.</string>
|
||||
<string name="bottom_chat_volume">Volume %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Sembunyikan bilah</string>
|
||||
<string name="bottom_bar_show">Tampilkan bilah</string>
|
||||
<string name="bottom_brightness">Kecerahan layar bawah</string>
|
||||
<string name="bottom_screen_off">Matikan layar bawah</string>
|
||||
<string name="bottom_page_guides">Panduan</string>
|
||||
<string name="bottom_guides_no_game">Mulai game untuk melihat panduan Steam-nya di sini.</string>
|
||||
<string name="bottom_guides_continue">Lanjutkan membaca</string>
|
||||
<string name="bottom_guides_empty">Belum ada panduan Steam untuk game ini.</string>
|
||||
<string name="bottom_guides_failed">Tidak dapat memuat panduan Steam. Coba lagi saat Anda online.</string>
|
||||
<string name="bottom_page_mirror">Cermin</string>
|
||||
<string name="bottom_mirror_pick">Seret di atas bagian game yang ingin ditampilkan di sini, seperti peta mini.</string>
|
||||
<string name="bottom_mirror_save">Simpan area</string>
|
||||
<string name="bottom_mirror_sharp">Tajam</string>
|
||||
<string name="bottom_mirror_smooth">Halus</string>
|
||||
<string name="bottom_mirror_no_frame">Gambar game tidak dapat disalin saat ini.</string>
|
||||
<string name="bottom_guides_wiki">Wiki & perbaikan</string>
|
||||
<string name="bottom_guides_maps">Peta</string>
|
||||
<string name="bottom_guides_saved">Tersimpan</string>
|
||||
<string name="bottom_guides_tag_all">Semua</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Panduan lengkap</string>
|
||||
<string name="bottom_guides_tag_secrets">Rahasia</string>
|
||||
<string name="bottom_guides_pinned">Peta disematkan ke peta game ini.</string>
|
||||
<string name="bottom_guides_pin_failed">Gambar itu tidak dapat disimpan.</string>
|
||||
<string name="bottom_guides_saved_note">Halaman disimpan untuk dibaca offline.</string>
|
||||
<string name="bottom_guides_search">Cari di web</string>
|
||||
<string name="bottom_guides_markers">Penanda: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Cari peta</string>
|
||||
<string name="bottom_guides_saved_hint">Gunakan Simpan di pembaca agar halaman bisa dibaca offline.</string>
|
||||
<string name="bottom_guides_pin">Sematkan sebagai peta</string>
|
||||
<string name="bottom_guides_pin_hint">Tekan lama gambar untuk menyematkannya sebagai peta.</string>
|
||||
<string name="bottom_guides_marker_hint">Cubit untuk memperbesar. Tekan lama untuk menambah penanda, ketuk penanda untuk menghapusnya.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki game</string>
|
||||
<string name="bottom_guides_link_pcgw">Perbaikan PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Panduan di YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Tampil</string>
|
||||
<string name="bottom_mirror_hide_black">Tersembunyi</string>
|
||||
<string name="bottom_mirror_hide_dim">Redup</string>
|
||||
<string name="bottom_guides_steam">Panduan Steam</string>
|
||||
<string name="bottom_guides_category">Kategori</string>
|
||||
<string name="bottom_guides_maps_empty">Belum ada peta yang disematkan</string>
|
||||
<string name="bottom_guides_map_name">Peta %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Belum ada halaman tersimpan</string>
|
||||
<string name="bottom_mirror_options">Opsi cermin</string>
|
||||
<string name="bottom_mirror_region">Area</string>
|
||||
<string name="bottom_mirror_top">Layar atas</string>
|
||||
<string name="bottom_mirror_scaling">Penskalaan</string>
|
||||
<string name="bottom_qam_title">Akses Cepat</string>
|
||||
<string name="bottom_qam_layout">Tata letak: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Lebar penuh</string>
|
||||
<string name="bottom_qam_layout_left">Kiri</string>
|
||||
<string name="bottom_qam_layout_center">Tengah</string>
|
||||
<string name="bottom_qam_layout_right">Kanan</string>
|
||||
<string name="bottom_qam_unavailable">Menu Akses Cepat Steam belum tersedia.</string>
|
||||
<string name="bottom_page_telemetry">Statistik dalam gim</string>
|
||||
<string name="bottom_hud_group">HUD layar bawah</string>
|
||||
<string name="bottom_strip_tabs">Strip di setiap tab</string>
|
||||
|
||||
@@ -2065,6 +2065,13 @@
|
||||
<string name="stats_hud_red_mark">Il segno rosso indica dove l\'HUD mostra la temperatura in rosso.</string>
|
||||
<string name="stats_hud_whole_device">intero dispositivo</string>
|
||||
<string name="stats_hud_battery_temp">batteria</string>
|
||||
<string name="bottom_art_title">Immagini del gioco</string>
|
||||
<string name="bottom_art_playing">In gioco</string>
|
||||
<string name="bottom_idle_selected">Selezionato in Steam</string>
|
||||
<string name="bottom_idle_recent">Giocato di recente</string>
|
||||
<string name="bottom_idle_never">Non ancora giocato</string>
|
||||
<string name="bottom_idle_minutes">%1$d min di gioco</string>
|
||||
<string name="bottom_idle_hours">%1$d h di gioco</string>
|
||||
<string name="bottom_telemetry_send_title">Invia dati al cruscotto</string>
|
||||
<string name="bottom_telemetry_send_auto">Automatico</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Lo attiva per ogni gioco elencato qui, compresi i giochi trovati in seguito. I giochi che disattivi restano disattivati.</string>
|
||||
@@ -2087,6 +2094,59 @@
|
||||
<string name="bottom_chat_mic_off">Microfono disattivato</string>
|
||||
<string name="bottom_chat_mic_unavailable">Il microfono è disattivato per questo gioco. Per parlare, attiva Microfono nelle impostazioni Steam di DroidDeck (Audio) e riavvia il gioco.</string>
|
||||
<string name="bottom_chat_volume">Volume %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Nascondi barra</string>
|
||||
<string name="bottom_bar_show">Mostra barra</string>
|
||||
<string name="bottom_brightness">Luminosità dello schermo inferiore</string>
|
||||
<string name="bottom_screen_off">Spegni lo schermo inferiore</string>
|
||||
<string name="bottom_page_guides">Guide</string>
|
||||
<string name="bottom_guides_no_game">Avvia un gioco per vederne qui le guide di Steam.</string>
|
||||
<string name="bottom_guides_continue">Continua a leggere</string>
|
||||
<string name="bottom_guides_empty">Non ci sono ancora guide di Steam per questo gioco.</string>
|
||||
<string name="bottom_guides_failed">Impossibile caricare le guide di Steam. Riprova quando sei online.</string>
|
||||
<string name="bottom_page_mirror">Specchio</string>
|
||||
<string name="bottom_mirror_pick">Trascina sulla parte del gioco da mostrare qui, come la minimappa.</string>
|
||||
<string name="bottom_mirror_save">Salva area</string>
|
||||
<string name="bottom_mirror_sharp">Nitido</string>
|
||||
<string name="bottom_mirror_smooth">Morbido</string>
|
||||
<string name="bottom_mirror_no_frame">Al momento l’immagine del gioco non può essere copiata.</string>
|
||||
<string name="bottom_guides_wiki">Wiki e correzioni</string>
|
||||
<string name="bottom_guides_maps">Mappe</string>
|
||||
<string name="bottom_guides_saved">Salvati</string>
|
||||
<string name="bottom_guides_tag_all">Tutte</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Procedure complete</string>
|
||||
<string name="bottom_guides_tag_secrets">Segreti</string>
|
||||
<string name="bottom_guides_pinned">Mappa fissata tra le mappe di questo gioco.</string>
|
||||
<string name="bottom_guides_pin_failed">Impossibile salvare l’immagine.</string>
|
||||
<string name="bottom_guides_saved_note">Pagina salvata per la lettura offline.</string>
|
||||
<string name="bottom_guides_search">Cerca sul web</string>
|
||||
<string name="bottom_guides_markers">Segnalini: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Trova mappe</string>
|
||||
<string name="bottom_guides_saved_hint">Usa Salva nel lettore per tenere una pagina offline.</string>
|
||||
<string name="bottom_guides_pin">Fissa come mappa</string>
|
||||
<string name="bottom_guides_pin_hint">Tieni premuta un’immagine per fissarla come mappa.</string>
|
||||
<string name="bottom_guides_marker_hint">Pizzica per lo zoom. Tieni premuto per aggiungere un segnalino, toccalo per rimuoverlo.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki del gioco</string>
|
||||
<string name="bottom_guides_link_pcgw">Correzioni di PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Procedure su YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Visibile</string>
|
||||
<string name="bottom_mirror_hide_black">Nascosto</string>
|
||||
<string name="bottom_mirror_hide_dim">Scurito</string>
|
||||
<string name="bottom_guides_steam">Guide di Steam</string>
|
||||
<string name="bottom_guides_category">Categoria</string>
|
||||
<string name="bottom_guides_maps_empty">Nessuna mappa fissata</string>
|
||||
<string name="bottom_guides_map_name">Mappa %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Nessuna pagina salvata</string>
|
||||
<string name="bottom_mirror_options">Opzioni specchio</string>
|
||||
<string name="bottom_mirror_region">Area</string>
|
||||
<string name="bottom_mirror_top">Schermo superiore</string>
|
||||
<string name="bottom_mirror_scaling">Scalatura</string>
|
||||
<string name="bottom_qam_title">Accesso rapido</string>
|
||||
<string name="bottom_qam_layout">Layout: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Larghezza piena</string>
|
||||
<string name="bottom_qam_layout_left">Sinistra</string>
|
||||
<string name="bottom_qam_layout_center">Centro</string>
|
||||
<string name="bottom_qam_layout_right">Destra</string>
|
||||
<string name="bottom_qam_unavailable">Il menu di accesso rapido di Steam non è ancora disponibile.</string>
|
||||
<string name="bottom_page_telemetry">Statistiche di gioco</string>
|
||||
<string name="bottom_hud_group">HUD dello schermo inferiore</string>
|
||||
<string name="bottom_strip_tabs">Barra su ogni scheda</string>
|
||||
|
||||
@@ -2025,6 +2025,13 @@
|
||||
<string name="stats_hud_red_mark">赤いマークは、HUD が温度を赤で表示する位置です。</string>
|
||||
<string name="stats_hud_whole_device">デバイス全体</string>
|
||||
<string name="stats_hud_battery_temp">バッテリー</string>
|
||||
<string name="bottom_art_title">ゲームアート</string>
|
||||
<string name="bottom_art_playing">プレイ中</string>
|
||||
<string name="bottom_idle_selected">Steam で選択中</string>
|
||||
<string name="bottom_idle_recent">最近プレイ</string>
|
||||
<string name="bottom_idle_never">未プレイ</string>
|
||||
<string name="bottom_idle_minutes">%1$d 分プレイ</string>
|
||||
<string name="bottom_idle_hours">%1$d 時間プレイ</string>
|
||||
<string name="bottom_telemetry_send_title">ダッシュボード用データを送信</string>
|
||||
<string name="bottom_telemetry_send_auto">自動</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">ここに表示されているすべてのゲーム(後から見つかったゲームを含む)でオンにします。オフにしたゲームはオフのままです。</string>
|
||||
@@ -2047,6 +2054,59 @@
|
||||
<string name="bottom_chat_mic_off">マイク オフ</string>
|
||||
<string name="bottom_chat_mic_unavailable">このゲームではマイクがオフです。話すには、DroidDeckのSteam設定(オーディオ)でマイクをオンにして、ゲームを再起動してください。</string>
|
||||
<string name="bottom_chat_volume">音量 %1$d%%</string>
|
||||
<string name="bottom_bar_hide">バーを隠す</string>
|
||||
<string name="bottom_bar_show">バーを表示</string>
|
||||
<string name="bottom_brightness">下画面の明るさ</string>
|
||||
<string name="bottom_screen_off">下の画面をオフにする</string>
|
||||
<string name="bottom_page_guides">ガイド</string>
|
||||
<string name="bottom_guides_no_game">ゲームを起動すると、ここに Steam ガイドが表示されます。</string>
|
||||
<string name="bottom_guides_continue">続きを読む</string>
|
||||
<string name="bottom_guides_empty">このゲームの Steam ガイドはまだありません。</string>
|
||||
<string name="bottom_guides_failed">Steam ガイドを読み込めませんでした。オンラインになってから再度お試しください。</string>
|
||||
<string name="bottom_page_mirror">ミラー</string>
|
||||
<string name="bottom_mirror_pick">ミニマップなど、ここに表示したいゲーム画面の部分をドラッグで選びます。</string>
|
||||
<string name="bottom_mirror_save">範囲を保存</string>
|
||||
<string name="bottom_mirror_sharp">シャープ</string>
|
||||
<string name="bottom_mirror_smooth">なめらか</string>
|
||||
<string name="bottom_mirror_no_frame">現在ゲーム画面をコピーできません。</string>
|
||||
<string name="bottom_guides_wiki">Wiki と修正</string>
|
||||
<string name="bottom_guides_maps">マップ</string>
|
||||
<string name="bottom_guides_saved">保存済み</string>
|
||||
<string name="bottom_guides_tag_all">すべて</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">攻略</string>
|
||||
<string name="bottom_guides_tag_secrets">秘密</string>
|
||||
<string name="bottom_guides_pinned">マップをこのゲームのマップにピン留めしました。</string>
|
||||
<string name="bottom_guides_pin_failed">その画像を保存できませんでした。</string>
|
||||
<string name="bottom_guides_saved_note">オフラインで読めるようにページを保存しました。</string>
|
||||
<string name="bottom_guides_search">ウェブを検索</string>
|
||||
<string name="bottom_guides_markers">マーカー: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">マップを探す</string>
|
||||
<string name="bottom_guides_saved_hint">リーダーで保存すると、ページをオフラインで読めます。</string>
|
||||
<string name="bottom_guides_pin">マップとしてピン留め</string>
|
||||
<string name="bottom_guides_pin_hint">画像を長押しするとマップとしてピン留めできます。</string>
|
||||
<string name="bottom_guides_marker_hint">ピンチでズーム。長押しでマーカーを追加、タップで削除します。</string>
|
||||
<string name="bottom_guides_link_wiki">ゲームの Wiki</string>
|
||||
<string name="bottom_guides_link_pcgw">PCGamingWiki の修正</string>
|
||||
<string name="bottom_guides_search_youtube">YouTube の攻略</string>
|
||||
<string name="bottom_mirror_hide_off">表示</string>
|
||||
<string name="bottom_mirror_hide_black">非表示</string>
|
||||
<string name="bottom_mirror_hide_dim">暗く</string>
|
||||
<string name="bottom_guides_steam">Steam ガイド</string>
|
||||
<string name="bottom_guides_category">カテゴリ</string>
|
||||
<string name="bottom_guides_maps_empty">ピン留めしたマップはまだありません</string>
|
||||
<string name="bottom_guides_map_name">マップ %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">保存したページはまだありません</string>
|
||||
<string name="bottom_mirror_options">ミラーの設定</string>
|
||||
<string name="bottom_mirror_region">範囲</string>
|
||||
<string name="bottom_mirror_top">上画面</string>
|
||||
<string name="bottom_mirror_scaling">スケーリング</string>
|
||||
<string name="bottom_qam_title">クイックアクセス</string>
|
||||
<string name="bottom_qam_layout">レイアウト: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">全幅</string>
|
||||
<string name="bottom_qam_layout_left">左</string>
|
||||
<string name="bottom_qam_layout_center">中央</string>
|
||||
<string name="bottom_qam_layout_right">右</string>
|
||||
<string name="bottom_qam_unavailable">Steam のクイックアクセスメニューはまだ使えません。</string>
|
||||
<string name="bottom_page_telemetry">ゲーム内統計</string>
|
||||
<string name="bottom_hud_group">下部画面の HUD</string>
|
||||
<string name="bottom_strip_tabs">すべてのタブにストリップを表示</string>
|
||||
|
||||
@@ -2025,6 +2025,13 @@
|
||||
<string name="stats_hud_red_mark">빨간색 표시는 HUD가 온도를 빨간색으로 표시하는 지점입니다.</string>
|
||||
<string name="stats_hud_whole_device">기기 전체</string>
|
||||
<string name="stats_hud_battery_temp">배터리</string>
|
||||
<string name="bottom_art_title">게임 아트</string>
|
||||
<string name="bottom_art_playing">플레이 중</string>
|
||||
<string name="bottom_idle_selected">Steam에서 선택됨</string>
|
||||
<string name="bottom_idle_recent">최근 플레이</string>
|
||||
<string name="bottom_idle_never">아직 플레이 안 함</string>
|
||||
<string name="bottom_idle_minutes">%1$d분 플레이</string>
|
||||
<string name="bottom_idle_hours">%1$d시간 플레이</string>
|
||||
<string name="bottom_telemetry_send_title">계기판 데이터 보내기</string>
|
||||
<string name="bottom_telemetry_send_auto">자동</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">나중에 발견된 게임을 포함해 여기에 나열된 모든 게임에서 켭니다. 직접 끈 게임은 꺼진 상태로 유지됩니다.</string>
|
||||
@@ -2047,6 +2054,59 @@
|
||||
<string name="bottom_chat_mic_off">마이크 꺼짐</string>
|
||||
<string name="bottom_chat_mic_unavailable">이 게임에서는 마이크가 꺼져 있습니다. 대화하려면 DroidDeck의 Steam 설정(오디오)에서 마이크를 켜고 게임을 다시 시작하세요.</string>
|
||||
<string name="bottom_chat_volume">볼륨 %1$d%%</string>
|
||||
<string name="bottom_bar_hide">막대 숨기기</string>
|
||||
<string name="bottom_bar_show">막대 표시</string>
|
||||
<string name="bottom_brightness">아래쪽 화면 밝기</string>
|
||||
<string name="bottom_screen_off">아래 화면 끄기</string>
|
||||
<string name="bottom_page_guides">가이드</string>
|
||||
<string name="bottom_guides_no_game">게임을 시작하면 여기에 Steam 가이드가 표시됩니다.</string>
|
||||
<string name="bottom_guides_continue">이어서 읽기</string>
|
||||
<string name="bottom_guides_empty">이 게임에는 아직 Steam 가이드가 없습니다.</string>
|
||||
<string name="bottom_guides_failed">Steam 가이드를 불러오지 못했습니다. 온라인 상태에서 다시 확인하세요.</string>
|
||||
<string name="bottom_page_mirror">미러</string>
|
||||
<string name="bottom_mirror_pick">미니맵처럼 여기에 표시할 게임 화면 부분을 드래그하세요.</string>
|
||||
<string name="bottom_mirror_save">영역 저장</string>
|
||||
<string name="bottom_mirror_sharp">선명하게</string>
|
||||
<string name="bottom_mirror_smooth">부드럽게</string>
|
||||
<string name="bottom_mirror_no_frame">지금은 게임 화면을 복사할 수 없습니다.</string>
|
||||
<string name="bottom_guides_wiki">위키 및 해결법</string>
|
||||
<string name="bottom_guides_maps">지도</string>
|
||||
<string name="bottom_guides_saved">저장됨</string>
|
||||
<string name="bottom_guides_tag_all">전체</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">공략</string>
|
||||
<string name="bottom_guides_tag_secrets">비밀</string>
|
||||
<string name="bottom_guides_pinned">이 게임의 지도에 고정했습니다.</string>
|
||||
<string name="bottom_guides_pin_failed">이미지를 저장할 수 없습니다.</string>
|
||||
<string name="bottom_guides_saved_note">오프라인으로 읽도록 페이지를 저장했습니다.</string>
|
||||
<string name="bottom_guides_search">웹 검색</string>
|
||||
<string name="bottom_guides_markers">마커: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">지도 찾기</string>
|
||||
<string name="bottom_guides_saved_hint">리더에서 저장을 누르면 페이지를 오프라인으로 볼 수 있습니다.</string>
|
||||
<string name="bottom_guides_pin">지도로 고정</string>
|
||||
<string name="bottom_guides_pin_hint">이미지를 길게 눌러 지도로 고정하세요.</string>
|
||||
<string name="bottom_guides_marker_hint">두 손가락으로 확대하세요. 길게 눌러 마커를 추가하고, 눌러서 삭제합니다.</string>
|
||||
<string name="bottom_guides_link_wiki">게임 위키</string>
|
||||
<string name="bottom_guides_link_pcgw">PCGamingWiki 해결법</string>
|
||||
<string name="bottom_guides_search_youtube">YouTube 공략</string>
|
||||
<string name="bottom_mirror_hide_off">표시</string>
|
||||
<string name="bottom_mirror_hide_black">숨김</string>
|
||||
<string name="bottom_mirror_hide_dim">어둡게</string>
|
||||
<string name="bottom_guides_steam">Steam 가이드</string>
|
||||
<string name="bottom_guides_category">카테고리</string>
|
||||
<string name="bottom_guides_maps_empty">고정한 지도가 아직 없습니다</string>
|
||||
<string name="bottom_guides_map_name">지도 %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">저장한 페이지가 아직 없습니다</string>
|
||||
<string name="bottom_mirror_options">미러 옵션</string>
|
||||
<string name="bottom_mirror_region">영역</string>
|
||||
<string name="bottom_mirror_top">위 화면</string>
|
||||
<string name="bottom_mirror_scaling">스케일링</string>
|
||||
<string name="bottom_qam_title">빠른 메뉴</string>
|
||||
<string name="bottom_qam_layout">레이아웃: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">전체 너비</string>
|
||||
<string name="bottom_qam_layout_left">왼쪽</string>
|
||||
<string name="bottom_qam_layout_center">가운데</string>
|
||||
<string name="bottom_qam_layout_right">오른쪽</string>
|
||||
<string name="bottom_qam_unavailable">Steam 빠른 메뉴를 아직 사용할 수 없습니다.</string>
|
||||
<string name="bottom_page_telemetry">게임 내 통계</string>
|
||||
<string name="bottom_hud_group">하단 화면 HUD</string>
|
||||
<string name="bottom_strip_tabs">모든 탭에 스트립 표시</string>
|
||||
|
||||
@@ -2025,6 +2025,13 @@
|
||||
<string name="stats_hud_red_mark">Tanda merah ialah tempat HUD memaparkan suhu dalam warna merah.</string>
|
||||
<string name="stats_hud_whole_device">seluruh peranti</string>
|
||||
<string name="stats_hud_battery_temp">bateri</string>
|
||||
<string name="bottom_art_title">Seni permainan</string>
|
||||
<string name="bottom_art_playing">Sedang dimainkan</string>
|
||||
<string name="bottom_idle_selected">Dipilih dalam Steam</string>
|
||||
<string name="bottom_idle_recent">Terakhir dimainkan</string>
|
||||
<string name="bottom_idle_never">Belum dimainkan</string>
|
||||
<string name="bottom_idle_minutes">%1$d min dimainkan</string>
|
||||
<string name="bottom_idle_hours">%1$d jam dimainkan</string>
|
||||
<string name="bottom_telemetry_send_title">Hantar data papan pemuka</string>
|
||||
<string name="bottom_telemetry_send_auto">Automatik</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Menghidupkannya untuk setiap permainan yang disenaraikan di sini, termasuk permainan yang ditemui kemudian. Permainan yang anda matikan kekal mati.</string>
|
||||
@@ -2047,6 +2054,59 @@
|
||||
<string name="bottom_chat_mic_off">Mikrofon mati</string>
|
||||
<string name="bottom_chat_mic_unavailable">Mikrofon dimatikan untuk permainan ini. Untuk bercakap, hidupkan Mikrofon dalam tetapan Steam DroidDeck (Audio) dan mulakan permainan semula.</string>
|
||||
<string name="bottom_chat_volume">Kelantangan %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Sembunyikan bar</string>
|
||||
<string name="bottom_bar_show">Tunjukkan bar</string>
|
||||
<string name="bottom_brightness">Kecerahan skrin bawah</string>
|
||||
<string name="bottom_screen_off">Matikan skrin bawah</string>
|
||||
<string name="bottom_page_guides">Panduan</string>
|
||||
<string name="bottom_guides_no_game">Mulakan permainan untuk melihat panduan Steamnya di sini.</string>
|
||||
<string name="bottom_guides_continue">Sambung membaca</string>
|
||||
<string name="bottom_guides_empty">Belum ada panduan Steam untuk permainan ini.</string>
|
||||
<string name="bottom_guides_failed">Tidak dapat memuatkan panduan Steam. Cuba lagi apabila anda dalam talian.</string>
|
||||
<string name="bottom_page_mirror">Cermin</string>
|
||||
<string name="bottom_mirror_pick">Seret ke atas bahagian permainan yang mahu dipaparkan di sini, seperti peta mini.</string>
|
||||
<string name="bottom_mirror_save">Simpan kawasan</string>
|
||||
<string name="bottom_mirror_sharp">Tajam</string>
|
||||
<string name="bottom_mirror_smooth">Licin</string>
|
||||
<string name="bottom_mirror_no_frame">Gambar permainan tidak dapat disalin sekarang.</string>
|
||||
<string name="bottom_guides_wiki">Wiki & pembaikan</string>
|
||||
<string name="bottom_guides_maps">Peta</string>
|
||||
<string name="bottom_guides_saved">Disimpan</string>
|
||||
<string name="bottom_guides_tag_all">Semua</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Panduan penuh</string>
|
||||
<string name="bottom_guides_tag_secrets">Rahsia</string>
|
||||
<string name="bottom_guides_pinned">Peta disematkan pada peta permainan ini.</string>
|
||||
<string name="bottom_guides_pin_failed">Imej itu tidak dapat disimpan.</string>
|
||||
<string name="bottom_guides_saved_note">Halaman disimpan untuk dibaca di luar talian.</string>
|
||||
<string name="bottom_guides_search">Cari di web</string>
|
||||
<string name="bottom_guides_markers">Penanda: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Cari peta</string>
|
||||
<string name="bottom_guides_saved_hint">Gunakan Simpan dalam pembaca untuk menyimpan halaman di luar talian.</string>
|
||||
<string name="bottom_guides_pin">Sematkan sebagai peta</string>
|
||||
<string name="bottom_guides_pin_hint">Tekan lama imej untuk menyematkannya sebagai peta.</string>
|
||||
<string name="bottom_guides_marker_hint">Cubit untuk zum. Tekan lama untuk menambah penanda, ketik penanda untuk membuangnya.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki permainan</string>
|
||||
<string name="bottom_guides_link_pcgw">Pembaikan PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Panduan YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Ditunjukkan</string>
|
||||
<string name="bottom_mirror_hide_black">Disembunyikan</string>
|
||||
<string name="bottom_mirror_hide_dim">Dimalapkan</string>
|
||||
<string name="bottom_guides_steam">Panduan Steam</string>
|
||||
<string name="bottom_guides_category">Kategori</string>
|
||||
<string name="bottom_guides_maps_empty">Belum ada peta disematkan</string>
|
||||
<string name="bottom_guides_map_name">Peta %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Belum ada halaman disimpan</string>
|
||||
<string name="bottom_mirror_options">Pilihan cermin</string>
|
||||
<string name="bottom_mirror_region">Kawasan</string>
|
||||
<string name="bottom_mirror_top">Skrin atas</string>
|
||||
<string name="bottom_mirror_scaling">Penskalaan</string>
|
||||
<string name="bottom_qam_title">Akses Pantas</string>
|
||||
<string name="bottom_qam_layout">Susun atur: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Lebar penuh</string>
|
||||
<string name="bottom_qam_layout_left">Kiri</string>
|
||||
<string name="bottom_qam_layout_center">Tengah</string>
|
||||
<string name="bottom_qam_layout_right">Kanan</string>
|
||||
<string name="bottom_qam_unavailable">Menu Akses Pantas Steam belum tersedia.</string>
|
||||
<string name="bottom_page_telemetry">Statistik dalam permainan</string>
|
||||
<string name="bottom_hud_group">HUD skrin bawah</string>
|
||||
<string name="bottom_strip_tabs">Jalur pada setiap tab</string>
|
||||
|
||||
@@ -2049,6 +2049,13 @@
|
||||
<string name="stats_hud_red_mark">Den røde markeringen er der HUD-en viser temperaturen i rødt.</string>
|
||||
<string name="stats_hud_whole_device">hele enheten</string>
|
||||
<string name="stats_hud_battery_temp">batteri</string>
|
||||
<string name="bottom_art_title">Spillgrafikk</string>
|
||||
<string name="bottom_art_playing">Spiller</string>
|
||||
<string name="bottom_idle_selected">Valgt i Steam</string>
|
||||
<string name="bottom_idle_recent">Sist spilt</string>
|
||||
<string name="bottom_idle_never">Ikke spilt ennå</string>
|
||||
<string name="bottom_idle_minutes">%1$d min spilt</string>
|
||||
<string name="bottom_idle_hours">%1$d t spilt</string>
|
||||
<string name="bottom_telemetry_send_title">Send dashborddata</string>
|
||||
<string name="bottom_telemetry_send_auto">Automatisk</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Slår det på for alle spill som er oppført her, også spill som blir funnet senere. Spill du slår av, forblir av.</string>
|
||||
@@ -2071,6 +2078,59 @@
|
||||
<string name="bottom_chat_mic_off">Mikrofon av</string>
|
||||
<string name="bottom_chat_mic_unavailable">Mikrofonen er av for dette spillet. For å snakke, slå på Mikrofon i DroidDecks Steam-innstillinger (Lyd) og start spillet på nytt.</string>
|
||||
<string name="bottom_chat_volume">Volum %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Skjul linjen</string>
|
||||
<string name="bottom_bar_show">Vis linjen</string>
|
||||
<string name="bottom_brightness">Lysstyrke på nedre skjerm</string>
|
||||
<string name="bottom_screen_off">Slå av den nederste skjermen</string>
|
||||
<string name="bottom_page_guides">Guider</string>
|
||||
<string name="bottom_guides_no_game">Start et spill for å se Steam-guidene her.</string>
|
||||
<string name="bottom_guides_continue">Fortsett å lese</string>
|
||||
<string name="bottom_guides_empty">Det finnes ingen Steam-guider for dette spillet ennå.</string>
|
||||
<string name="bottom_guides_failed">Kunne ikke laste Steam-guider. Prøv igjen når du er på nett.</string>
|
||||
<string name="bottom_page_mirror">Speil</string>
|
||||
<string name="bottom_mirror_pick">Dra over den delen av spillet som skal vises her, for eksempel minikartet.</string>
|
||||
<string name="bottom_mirror_save">Lagre område</string>
|
||||
<string name="bottom_mirror_sharp">Skarp</string>
|
||||
<string name="bottom_mirror_smooth">Myk</string>
|
||||
<string name="bottom_mirror_no_frame">Spillbildet kan ikke kopieres akkurat nå.</string>
|
||||
<string name="bottom_guides_wiki">Wiki og fikser</string>
|
||||
<string name="bottom_guides_maps">Kart</string>
|
||||
<string name="bottom_guides_saved">Lagret</string>
|
||||
<string name="bottom_guides_tag_all">Alle</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Gjennomganger</string>
|
||||
<string name="bottom_guides_tag_secrets">Hemmeligheter</string>
|
||||
<string name="bottom_guides_pinned">Kartet er festet til kartene for spillet.</string>
|
||||
<string name="bottom_guides_pin_failed">Bildet kunne ikke lagres.</string>
|
||||
<string name="bottom_guides_saved_note">Siden er lagret for lesing uten nett.</string>
|
||||
<string name="bottom_guides_search">Søk på nettet</string>
|
||||
<string name="bottom_guides_markers">Markører: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Finn kart</string>
|
||||
<string name="bottom_guides_saved_hint">Bruk Lagre i leseren for å beholde en side uten nett.</string>
|
||||
<string name="bottom_guides_pin">Fest som kart</string>
|
||||
<string name="bottom_guides_pin_hint">Hold på et bilde for å feste det som kart.</string>
|
||||
<string name="bottom_guides_marker_hint">Klyp for å zoome. Hold for å legge til en markør, trykk på en for å fjerne den.</string>
|
||||
<string name="bottom_guides_link_wiki">Spillets wiki</string>
|
||||
<string name="bottom_guides_link_pcgw">Fikser fra PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Gjennomganger på YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Vist</string>
|
||||
<string name="bottom_mirror_hide_black">Skjult</string>
|
||||
<string name="bottom_mirror_hide_dim">Dempet</string>
|
||||
<string name="bottom_guides_steam">Steam-guider</string>
|
||||
<string name="bottom_guides_category">Kategori</string>
|
||||
<string name="bottom_guides_maps_empty">Ingen festede kart ennå</string>
|
||||
<string name="bottom_guides_map_name">Kart %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Ingen lagrede sider ennå</string>
|
||||
<string name="bottom_mirror_options">Speilvalg</string>
|
||||
<string name="bottom_mirror_region">Område</string>
|
||||
<string name="bottom_mirror_top">Øvre skjerm</string>
|
||||
<string name="bottom_mirror_scaling">Skalering</string>
|
||||
<string name="bottom_qam_title">Hurtigtilgang</string>
|
||||
<string name="bottom_qam_layout">Oppsett: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Full bredde</string>
|
||||
<string name="bottom_qam_layout_left">Venstre</string>
|
||||
<string name="bottom_qam_layout_center">Midten</string>
|
||||
<string name="bottom_qam_layout_right">Høyre</string>
|
||||
<string name="bottom_qam_unavailable">Steams hurtigtilgangsmeny er ikke tilgjengelig ennå.</string>
|
||||
<string name="bottom_page_telemetry">Statistikk i spillet</string>
|
||||
<string name="bottom_hud_group">HUD på bunnskjermen</string>
|
||||
<string name="bottom_strip_tabs">Stripe på hver fane</string>
|
||||
|
||||
@@ -2049,6 +2049,13 @@
|
||||
<string name="stats_hud_red_mark">De rode markering is het punt waarop de HUD de temperatuur in het rood weergeeft.</string>
|
||||
<string name="stats_hud_whole_device">hele apparaat</string>
|
||||
<string name="stats_hud_battery_temp">accu</string>
|
||||
<string name="bottom_art_title">Game-afbeelding</string>
|
||||
<string name="bottom_art_playing">Speelt</string>
|
||||
<string name="bottom_idle_selected">Geselecteerd in Steam</string>
|
||||
<string name="bottom_idle_recent">Laatst gespeeld</string>
|
||||
<string name="bottom_idle_never">Nog niet gespeeld</string>
|
||||
<string name="bottom_idle_minutes">%1$d min gespeeld</string>
|
||||
<string name="bottom_idle_hours">%1$d u gespeeld</string>
|
||||
<string name="bottom_telemetry_send_title">Dashboardgegevens verzenden</string>
|
||||
<string name="bottom_telemetry_send_auto">Automatisch</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Zet het aan voor elke game in deze lijst, ook voor games die later worden gevonden. Games die je uitzet, blijven uit.</string>
|
||||
@@ -2071,6 +2078,59 @@
|
||||
<string name="bottom_chat_mic_off">Microfoon uit</string>
|
||||
<string name="bottom_chat_mic_unavailable">De microfoon staat uit voor deze game. Zet Microfoon aan in de Steam-instellingen van DroidDeck (Audio) en start de game opnieuw om te praten.</string>
|
||||
<string name="bottom_chat_volume">Volume %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Balk verbergen</string>
|
||||
<string name="bottom_bar_show">Balk tonen</string>
|
||||
<string name="bottom_brightness">Helderheid van het onderste scherm</string>
|
||||
<string name="bottom_screen_off">Onderste scherm uitzetten</string>
|
||||
<string name="bottom_page_guides">Handleidingen</string>
|
||||
<string name="bottom_guides_no_game">Start een game om hier de Steam-handleidingen te zien.</string>
|
||||
<string name="bottom_guides_continue">Verder lezen</string>
|
||||
<string name="bottom_guides_empty">Er zijn nog geen Steam-handleidingen voor deze game.</string>
|
||||
<string name="bottom_guides_failed">Kan Steam-handleidingen niet laden. Probeer het opnieuw wanneer je online bent.</string>
|
||||
<string name="bottom_page_mirror">Spiegel</string>
|
||||
<string name="bottom_mirror_pick">Sleep over het deel van de game dat hier moet verschijnen, zoals de minikaart.</string>
|
||||
<string name="bottom_mirror_save">Gebied opslaan</string>
|
||||
<string name="bottom_mirror_sharp">Scherp</string>
|
||||
<string name="bottom_mirror_smooth">Vloeiend</string>
|
||||
<string name="bottom_mirror_no_frame">Het gamebeeld kan nu niet worden gekopieerd.</string>
|
||||
<string name="bottom_guides_wiki">Wiki en fixes</string>
|
||||
<string name="bottom_guides_maps">Kaarten</string>
|
||||
<string name="bottom_guides_saved">Opgeslagen</string>
|
||||
<string name="bottom_guides_tag_all">Alles</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Walkthroughs</string>
|
||||
<string name="bottom_guides_tag_secrets">Geheimen</string>
|
||||
<string name="bottom_guides_pinned">Kaart vastgezet bij de kaarten van deze game.</string>
|
||||
<string name="bottom_guides_pin_failed">Die afbeelding kon niet worden opgeslagen.</string>
|
||||
<string name="bottom_guides_saved_note">Pagina opgeslagen om offline te lezen.</string>
|
||||
<string name="bottom_guides_search">Zoeken op het web</string>
|
||||
<string name="bottom_guides_markers">Markeringen: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Kaarten zoeken</string>
|
||||
<string name="bottom_guides_saved_hint">Gebruik Opslaan in de lezer om een pagina offline te bewaren.</string>
|
||||
<string name="bottom_guides_pin">Vastzetten als kaart</string>
|
||||
<string name="bottom_guides_pin_hint">Houd een afbeelding ingedrukt om die als kaart vast te zetten.</string>
|
||||
<string name="bottom_guides_marker_hint">Knijp om te zoomen. Houd ingedrukt om een markering toe te voegen, tik erop om die te verwijderen.</string>
|
||||
<string name="bottom_guides_link_wiki">Game-wiki</string>
|
||||
<string name="bottom_guides_link_pcgw">Fixes van PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Walkthroughs op YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Zichtbaar</string>
|
||||
<string name="bottom_mirror_hide_black">Verborgen</string>
|
||||
<string name="bottom_mirror_hide_dim">Gedimd</string>
|
||||
<string name="bottom_guides_steam">Steam-handleidingen</string>
|
||||
<string name="bottom_guides_category">Categorie</string>
|
||||
<string name="bottom_guides_maps_empty">Nog geen vastgezette kaarten</string>
|
||||
<string name="bottom_guides_map_name">Kaart %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Nog geen opgeslagen pagina\'s</string>
|
||||
<string name="bottom_mirror_options">Spiegelopties</string>
|
||||
<string name="bottom_mirror_region">Gebied</string>
|
||||
<string name="bottom_mirror_top">Bovenste scherm</string>
|
||||
<string name="bottom_mirror_scaling">Schalen</string>
|
||||
<string name="bottom_qam_title">Snelle toegang</string>
|
||||
<string name="bottom_qam_layout">Indeling: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Volledige breedte</string>
|
||||
<string name="bottom_qam_layout_left">Links</string>
|
||||
<string name="bottom_qam_layout_center">Midden</string>
|
||||
<string name="bottom_qam_layout_right">Rechts</string>
|
||||
<string name="bottom_qam_unavailable">Het menu Snelle toegang van Steam is nog niet beschikbaar.</string>
|
||||
<string name="bottom_page_telemetry">In-game statistieken</string>
|
||||
<string name="bottom_hud_group">HUD op het onderste scherm</string>
|
||||
<string name="bottom_strip_tabs">Strip op elk tabblad</string>
|
||||
|
||||
@@ -2099,6 +2099,13 @@
|
||||
<string name="stats_hud_red_mark">Czerwony znacznik wskazuje temperaturę, od której HUD wyświetla ją na czerwono.</string>
|
||||
<string name="stats_hud_whole_device">całe urządzenie</string>
|
||||
<string name="stats_hud_battery_temp">bateria</string>
|
||||
<string name="bottom_art_title">Grafika gry</string>
|
||||
<string name="bottom_art_playing">W grze</string>
|
||||
<string name="bottom_idle_selected">Wybrano w Steam</string>
|
||||
<string name="bottom_idle_recent">Ostatnio grane</string>
|
||||
<string name="bottom_idle_never">Jeszcze nie grano</string>
|
||||
<string name="bottom_idle_minutes">%1$d min gry</string>
|
||||
<string name="bottom_idle_hours">%1$d godz. gry</string>
|
||||
<string name="bottom_telemetry_send_title">Wysyłaj dane do panelu</string>
|
||||
<string name="bottom_telemetry_send_auto">Automatycznie</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Włącza wysyłanie dla każdej gry z tej listy, także dla gier znalezionych później. Gry, które wyłączysz, pozostaną wyłączone.</string>
|
||||
@@ -2121,6 +2128,59 @@
|
||||
<string name="bottom_chat_mic_off">Mikrofon wył.</string>
|
||||
<string name="bottom_chat_mic_unavailable">Mikrofon jest wyłączony dla tej gry. Aby rozmawiać, włącz Mikrofon w ustawieniach Steam w DroidDeck (Dźwięk) i uruchom grę ponownie.</string>
|
||||
<string name="bottom_chat_volume">Głośność %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Ukryj pasek</string>
|
||||
<string name="bottom_bar_show">Pokaż pasek</string>
|
||||
<string name="bottom_brightness">Jasność dolnego ekranu</string>
|
||||
<string name="bottom_screen_off">Wyłącz dolny ekran</string>
|
||||
<string name="bottom_page_guides">Poradniki</string>
|
||||
<string name="bottom_guides_no_game">Uruchom grę, aby zobaczyć tu jej poradniki ze Steam.</string>
|
||||
<string name="bottom_guides_continue">Czytaj dalej</string>
|
||||
<string name="bottom_guides_empty">Ta gra nie ma jeszcze poradników na Steam.</string>
|
||||
<string name="bottom_guides_failed">Nie udało się wczytać poradników ze Steam. Spróbuj ponownie, gdy będziesz online.</string>
|
||||
<string name="bottom_page_mirror">Lustro</string>
|
||||
<string name="bottom_mirror_pick">Przeciągnij po fragmencie gry, który ma się tu wyświetlać, np. minimapie.</string>
|
||||
<string name="bottom_mirror_save">Zapisz obszar</string>
|
||||
<string name="bottom_mirror_sharp">Ostro</string>
|
||||
<string name="bottom_mirror_smooth">Gładko</string>
|
||||
<string name="bottom_mirror_no_frame">Obrazu gry nie można teraz skopiować.</string>
|
||||
<string name="bottom_guides_wiki">Wiki i poprawki</string>
|
||||
<string name="bottom_guides_maps">Mapy</string>
|
||||
<string name="bottom_guides_saved">Zapisane</string>
|
||||
<string name="bottom_guides_tag_all">Wszystkie</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Solucje</string>
|
||||
<string name="bottom_guides_tag_secrets">Sekrety</string>
|
||||
<string name="bottom_guides_pinned">Mapa przypięta do map tej gry.</string>
|
||||
<string name="bottom_guides_pin_failed">Nie udało się zapisać obrazu.</string>
|
||||
<string name="bottom_guides_saved_note">Strona zapisana do czytania offline.</string>
|
||||
<string name="bottom_guides_search">Szukaj w sieci</string>
|
||||
<string name="bottom_guides_markers">Znaczniki: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Znajdź mapy</string>
|
||||
<string name="bottom_guides_saved_hint">Użyj Zapisz w czytniku, aby zachować stronę offline.</string>
|
||||
<string name="bottom_guides_pin">Przypnij jako mapę</string>
|
||||
<string name="bottom_guides_pin_hint">Przytrzymaj obraz, aby przypiąć go jako mapę.</string>
|
||||
<string name="bottom_guides_marker_hint">Uszczypnij, aby powiększyć. Przytrzymaj, aby dodać znacznik, dotknij go, aby usunąć.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki gry</string>
|
||||
<string name="bottom_guides_link_pcgw">Poprawki z PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Solucje na YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Widoczne</string>
|
||||
<string name="bottom_mirror_hide_black">Ukryte</string>
|
||||
<string name="bottom_mirror_hide_dim">Przyciemnione</string>
|
||||
<string name="bottom_guides_steam">Poradniki Steam</string>
|
||||
<string name="bottom_guides_category">Kategoria</string>
|
||||
<string name="bottom_guides_maps_empty">Brak przypiętych map</string>
|
||||
<string name="bottom_guides_map_name">Mapa %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Brak zapisanych stron</string>
|
||||
<string name="bottom_mirror_options">Opcje lustra</string>
|
||||
<string name="bottom_mirror_region">Obszar</string>
|
||||
<string name="bottom_mirror_top">Górny ekran</string>
|
||||
<string name="bottom_mirror_scaling">Skalowanie</string>
|
||||
<string name="bottom_qam_title">Szybki dostęp</string>
|
||||
<string name="bottom_qam_layout">Układ: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Pełna szerokość</string>
|
||||
<string name="bottom_qam_layout_left">Do lewej</string>
|
||||
<string name="bottom_qam_layout_center">Na środku</string>
|
||||
<string name="bottom_qam_layout_right">Do prawej</string>
|
||||
<string name="bottom_qam_unavailable">Menu szybkiego dostępu Steam nie jest jeszcze dostępne.</string>
|
||||
<string name="bottom_page_telemetry">Statystyki w grze</string>
|
||||
<string name="bottom_hud_group">HUD dolnego ekranu</string>
|
||||
<string name="bottom_strip_tabs">Pasek na każdej karcie</string>
|
||||
|
||||
@@ -2079,6 +2079,13 @@
|
||||
<string name="stats_hud_red_mark">A marca vermelha é o ponto em que o HUD mostra a temperatura a vermelho.</string>
|
||||
<string name="stats_hud_whole_device">todo o dispositivo</string>
|
||||
<string name="stats_hud_battery_temp">bateria</string>
|
||||
<string name="bottom_art_title">Arte do jogo</string>
|
||||
<string name="bottom_art_playing">A jogar</string>
|
||||
<string name="bottom_idle_selected">Selecionado no Steam</string>
|
||||
<string name="bottom_idle_recent">Jogado por último</string>
|
||||
<string name="bottom_idle_never">Ainda não jogado</string>
|
||||
<string name="bottom_idle_minutes">%1$d min jogados</string>
|
||||
<string name="bottom_idle_hours">%1$d h jogadas</string>
|
||||
<string name="bottom_telemetry_send_title">Enviar dados para o painel</string>
|
||||
<string name="bottom_telemetry_send_auto">Automático</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Ativa para todos os jogos aqui listados, incluindo os encontrados mais tarde. Os jogos que desativar permanecem desativados.</string>
|
||||
@@ -2101,6 +2108,59 @@
|
||||
<string name="bottom_chat_mic_off">Microfone desligado</string>
|
||||
<string name="bottom_chat_mic_unavailable">O microfone está desligado neste jogo. Para falar, ative Microfone nas definições do Steam do DroidDeck (Áudio) e volte a iniciar o jogo.</string>
|
||||
<string name="bottom_chat_volume">Volume %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Ocultar barra</string>
|
||||
<string name="bottom_bar_show">Mostrar barra</string>
|
||||
<string name="bottom_brightness">Brilho do ecrã inferior</string>
|
||||
<string name="bottom_screen_off">Desligar o ecrã inferior</string>
|
||||
<string name="bottom_page_guides">Guias</string>
|
||||
<string name="bottom_guides_no_game">Inicie um jogo para ver aqui os guias Steam dele.</string>
|
||||
<string name="bottom_guides_continue">Continuar a ler</string>
|
||||
<string name="bottom_guides_empty">Ainda não há guias Steam para este jogo.</string>
|
||||
<string name="bottom_guides_failed">Não foi possível carregar os guias Steam. Tente novamente quando estiver online.</string>
|
||||
<string name="bottom_page_mirror">Espelho</string>
|
||||
<string name="bottom_mirror_pick">Arraste sobre a parte do jogo que deve aparecer aqui, como o minimapa.</string>
|
||||
<string name="bottom_mirror_save">Guardar região</string>
|
||||
<string name="bottom_mirror_sharp">Nítido</string>
|
||||
<string name="bottom_mirror_smooth">Suave</string>
|
||||
<string name="bottom_mirror_no_frame">Não é possível copiar a imagem do jogo agora.</string>
|
||||
<string name="bottom_guides_wiki">Wiki e correções</string>
|
||||
<string name="bottom_guides_maps">Mapas</string>
|
||||
<string name="bottom_guides_saved">Guardados</string>
|
||||
<string name="bottom_guides_tag_all">Todos</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Guias completos</string>
|
||||
<string name="bottom_guides_tag_secrets">Segredos</string>
|
||||
<string name="bottom_guides_pinned">Mapa afixado nos mapas deste jogo.</string>
|
||||
<string name="bottom_guides_pin_failed">Não foi possível guardar a imagem.</string>
|
||||
<string name="bottom_guides_saved_note">Página guardada para leitura offline.</string>
|
||||
<string name="bottom_guides_search">Pesquisar na web</string>
|
||||
<string name="bottom_guides_markers">Marcadores: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Encontrar mapas</string>
|
||||
<string name="bottom_guides_saved_hint">Use Guardar no leitor para manter uma página offline.</string>
|
||||
<string name="bottom_guides_pin">Afixar como mapa</string>
|
||||
<string name="bottom_guides_pin_hint">Mantenha premida uma imagem para a afixar como mapa.</string>
|
||||
<string name="bottom_guides_marker_hint">Aperte para aplicar zoom. Mantenha premido para adicionar um marcador, toque nele para o remover.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki do jogo</string>
|
||||
<string name="bottom_guides_link_pcgw">Correções do PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Guias no YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Visível</string>
|
||||
<string name="bottom_mirror_hide_black">Oculto</string>
|
||||
<string name="bottom_mirror_hide_dim">Escurecido</string>
|
||||
<string name="bottom_guides_steam">Guias Steam</string>
|
||||
<string name="bottom_guides_category">Categoria</string>
|
||||
<string name="bottom_guides_maps_empty">Ainda não há mapas afixados</string>
|
||||
<string name="bottom_guides_map_name">Mapa %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Ainda não há páginas guardadas</string>
|
||||
<string name="bottom_mirror_options">Opções de espelho</string>
|
||||
<string name="bottom_mirror_region">Região</string>
|
||||
<string name="bottom_mirror_top">Ecrã superior</string>
|
||||
<string name="bottom_mirror_scaling">Escala</string>
|
||||
<string name="bottom_qam_title">Acesso rápido</string>
|
||||
<string name="bottom_qam_layout">Esquema: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Largura total</string>
|
||||
<string name="bottom_qam_layout_left">Esquerda</string>
|
||||
<string name="bottom_qam_layout_center">Centro</string>
|
||||
<string name="bottom_qam_layout_right">Direita</string>
|
||||
<string name="bottom_qam_unavailable">O menu de acesso rápido do Steam ainda não está disponível.</string>
|
||||
<string name="bottom_page_telemetry">Estatísticas no jogo</string>
|
||||
<string name="bottom_hud_group">HUD do ecrã inferior</string>
|
||||
<string name="bottom_strip_tabs">Faixa em todos os separadores</string>
|
||||
|
||||
@@ -2087,6 +2087,13 @@
|
||||
<string name="stats_hud_red_mark">A marca vermelha indica onde o HUD mostra a temperatura em vermelho.</string>
|
||||
<string name="stats_hud_whole_device">dispositivo inteiro</string>
|
||||
<string name="stats_hud_battery_temp">bateria</string>
|
||||
<string name="bottom_art_title">Arte do jogo</string>
|
||||
<string name="bottom_art_playing">Jogando</string>
|
||||
<string name="bottom_idle_selected">Selecionado no Steam</string>
|
||||
<string name="bottom_idle_recent">Jogado por último</string>
|
||||
<string name="bottom_idle_never">Ainda não jogado</string>
|
||||
<string name="bottom_idle_minutes">%1$d min jogados</string>
|
||||
<string name="bottom_idle_hours">%1$d h jogadas</string>
|
||||
<string name="bottom_telemetry_send_title">Enviar dados para o painel</string>
|
||||
<string name="bottom_telemetry_send_auto">Automático</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Ativa para todos os jogos listados aqui, incluindo os encontrados depois. Os jogos que você desativar continuam desativados.</string>
|
||||
@@ -2109,6 +2116,59 @@
|
||||
<string name="bottom_chat_mic_off">Microfone desligado</string>
|
||||
<string name="bottom_chat_mic_unavailable">O microfone está desligado neste jogo. Para falar, ative Microfone nas configurações da Steam do DroidDeck (Áudio) e inicie o jogo de novo.</string>
|
||||
<string name="bottom_chat_volume">Volume %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Ocultar barra</string>
|
||||
<string name="bottom_bar_show">Mostrar barra</string>
|
||||
<string name="bottom_brightness">Brilho da tela inferior</string>
|
||||
<string name="bottom_screen_off">Desligar a tela inferior</string>
|
||||
<string name="bottom_page_guides">Guias</string>
|
||||
<string name="bottom_guides_no_game">Inicie um jogo para ver os guias Steam dele aqui.</string>
|
||||
<string name="bottom_guides_continue">Continuar lendo</string>
|
||||
<string name="bottom_guides_empty">Ainda não há guias Steam para este jogo.</string>
|
||||
<string name="bottom_guides_failed">Não foi possível carregar os guias Steam. Tente de novo quando estiver online.</string>
|
||||
<string name="bottom_page_mirror">Espelho</string>
|
||||
<string name="bottom_mirror_pick">Arraste sobre a parte do jogo que deve aparecer aqui, como o minimapa.</string>
|
||||
<string name="bottom_mirror_save">Salvar região</string>
|
||||
<string name="bottom_mirror_sharp">Nítido</string>
|
||||
<string name="bottom_mirror_smooth">Suave</string>
|
||||
<string name="bottom_mirror_no_frame">Não é possível copiar a imagem do jogo agora.</string>
|
||||
<string name="bottom_guides_wiki">Wiki e correções</string>
|
||||
<string name="bottom_guides_maps">Mapas</string>
|
||||
<string name="bottom_guides_saved">Salvos</string>
|
||||
<string name="bottom_guides_tag_all">Todos</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Detonados</string>
|
||||
<string name="bottom_guides_tag_secrets">Segredos</string>
|
||||
<string name="bottom_guides_pinned">Mapa fixado nos mapas deste jogo.</string>
|
||||
<string name="bottom_guides_pin_failed">Não foi possível salvar a imagem.</string>
|
||||
<string name="bottom_guides_saved_note">Página salva para leitura offline.</string>
|
||||
<string name="bottom_guides_search">Pesquisar na web</string>
|
||||
<string name="bottom_guides_markers">Marcadores: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Encontrar mapas</string>
|
||||
<string name="bottom_guides_saved_hint">Use Salvar no leitor para manter uma página offline.</string>
|
||||
<string name="bottom_guides_pin">Fixar como mapa</string>
|
||||
<string name="bottom_guides_pin_hint">Toque e segure uma imagem para fixá-la como mapa.</string>
|
||||
<string name="bottom_guides_marker_hint">Faça pinça para zoom. Toque e segure para adicionar um marcador, toque nele para remover.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki do jogo</string>
|
||||
<string name="bottom_guides_link_pcgw">Correções do PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Detonados no YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Visível</string>
|
||||
<string name="bottom_mirror_hide_black">Oculto</string>
|
||||
<string name="bottom_mirror_hide_dim">Escurecido</string>
|
||||
<string name="bottom_guides_steam">Guias Steam</string>
|
||||
<string name="bottom_guides_category">Categoria</string>
|
||||
<string name="bottom_guides_maps_empty">Ainda não há mapas fixados</string>
|
||||
<string name="bottom_guides_map_name">Mapa %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Ainda não há páginas salvas</string>
|
||||
<string name="bottom_mirror_options">Opções de espelho</string>
|
||||
<string name="bottom_mirror_region">Região</string>
|
||||
<string name="bottom_mirror_top">Tela superior</string>
|
||||
<string name="bottom_mirror_scaling">Escala</string>
|
||||
<string name="bottom_qam_title">Acesso rápido</string>
|
||||
<string name="bottom_qam_layout">Layout: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Largura total</string>
|
||||
<string name="bottom_qam_layout_left">Esquerda</string>
|
||||
<string name="bottom_qam_layout_center">Centro</string>
|
||||
<string name="bottom_qam_layout_right">Direita</string>
|
||||
<string name="bottom_qam_unavailable">O menu de acesso rápido do Steam ainda não está disponível.</string>
|
||||
<string name="bottom_page_telemetry">Estatísticas no jogo</string>
|
||||
<string name="bottom_hud_group">HUD da tela inferior</string>
|
||||
<string name="bottom_strip_tabs">Faixa em todas as abas</string>
|
||||
|
||||
@@ -2074,6 +2074,13 @@
|
||||
<string name="stats_hud_red_mark">Marcajul roșu indică locul în care HUD-ul afișează temperatura în roșu.</string>
|
||||
<string name="stats_hud_whole_device">tot dispozitivul</string>
|
||||
<string name="stats_hud_battery_temp">baterie</string>
|
||||
<string name="bottom_art_title">Imagini din joc</string>
|
||||
<string name="bottom_art_playing">Se joacă</string>
|
||||
<string name="bottom_idle_selected">Selectat în Steam</string>
|
||||
<string name="bottom_idle_recent">Jucat ultima dată</string>
|
||||
<string name="bottom_idle_never">Nejucat încă</string>
|
||||
<string name="bottom_idle_minutes">%1$d min jucate</string>
|
||||
<string name="bottom_idle_hours">%1$d h jucate</string>
|
||||
<string name="bottom_telemetry_send_title">Trimite date pentru tabloul de bord</string>
|
||||
<string name="bottom_telemetry_send_auto">Automat</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Activează trimiterea pentru fiecare joc din listă, inclusiv pentru jocurile găsite mai târziu. Jocurile pe care le dezactivezi rămân dezactivate.</string>
|
||||
@@ -2096,6 +2103,59 @@
|
||||
<string name="bottom_chat_mic_off">Microfon oprit</string>
|
||||
<string name="bottom_chat_mic_unavailable">Microfonul este oprit pentru acest joc. Pentru a vorbi, activează Microfon în setările Steam din DroidDeck (Sunet) și pornește din nou jocul.</string>
|
||||
<string name="bottom_chat_volume">Volum %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Ascunde bara</string>
|
||||
<string name="bottom_bar_show">Afișează bara</string>
|
||||
<string name="bottom_brightness">Luminozitatea ecranului de jos</string>
|
||||
<string name="bottom_screen_off">Oprește ecranul de jos</string>
|
||||
<string name="bottom_page_guides">Ghiduri</string>
|
||||
<string name="bottom_guides_no_game">Pornește un joc ca să-i vezi aici ghidurile Steam.</string>
|
||||
<string name="bottom_guides_continue">Continuă lectura</string>
|
||||
<string name="bottom_guides_empty">Încă nu există ghiduri Steam pentru acest joc.</string>
|
||||
<string name="bottom_guides_failed">Ghidurile Steam nu s-au putut încărca. Încearcă din nou când ești online.</string>
|
||||
<string name="bottom_page_mirror">Oglindă</string>
|
||||
<string name="bottom_mirror_pick">Trage peste partea din joc care să apară aici, de exemplu minimapa.</string>
|
||||
<string name="bottom_mirror_save">Salvează zona</string>
|
||||
<string name="bottom_mirror_sharp">Clar</string>
|
||||
<string name="bottom_mirror_smooth">Neted</string>
|
||||
<string name="bottom_mirror_no_frame">Imaginea jocului nu poate fi copiată acum.</string>
|
||||
<string name="bottom_guides_wiki">Wiki și remedieri</string>
|
||||
<string name="bottom_guides_maps">Hărți</string>
|
||||
<string name="bottom_guides_saved">Salvate</string>
|
||||
<string name="bottom_guides_tag_all">Toate</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Ghiduri complete</string>
|
||||
<string name="bottom_guides_tag_secrets">Secrete</string>
|
||||
<string name="bottom_guides_pinned">Harta a fost fixată la hărțile acestui joc.</string>
|
||||
<string name="bottom_guides_pin_failed">Imaginea nu a putut fi salvată.</string>
|
||||
<string name="bottom_guides_saved_note">Pagina a fost salvată pentru citire offline.</string>
|
||||
<string name="bottom_guides_search">Caută pe web</string>
|
||||
<string name="bottom_guides_markers">Marcaje: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Găsește hărți</string>
|
||||
<string name="bottom_guides_saved_hint">Folosește Salvează în cititor ca să păstrezi o pagină offline.</string>
|
||||
<string name="bottom_guides_pin">Fixează ca hartă</string>
|
||||
<string name="bottom_guides_pin_hint">Ține apăsat pe o imagine ca s-o fixezi ca hartă.</string>
|
||||
<string name="bottom_guides_marker_hint">Ciupește pentru zoom. Ține apăsat ca să adaugi un marcaj, atinge-l ca să-l elimini.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki-ul jocului</string>
|
||||
<string name="bottom_guides_link_pcgw">Remedieri din PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Ghiduri pe YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Vizibil</string>
|
||||
<string name="bottom_mirror_hide_black">Ascuns</string>
|
||||
<string name="bottom_mirror_hide_dim">Estompat</string>
|
||||
<string name="bottom_guides_steam">Ghiduri Steam</string>
|
||||
<string name="bottom_guides_category">Categorie</string>
|
||||
<string name="bottom_guides_maps_empty">Nicio hartă fixată încă</string>
|
||||
<string name="bottom_guides_map_name">Harta %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Nicio pagină salvată încă</string>
|
||||
<string name="bottom_mirror_options">Opțiuni oglindă</string>
|
||||
<string name="bottom_mirror_region">Zonă</string>
|
||||
<string name="bottom_mirror_top">Ecranul de sus</string>
|
||||
<string name="bottom_mirror_scaling">Scalare</string>
|
||||
<string name="bottom_qam_title">Acces rapid</string>
|
||||
<string name="bottom_qam_layout">Aspect: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Lățime completă</string>
|
||||
<string name="bottom_qam_layout_left">Stânga</string>
|
||||
<string name="bottom_qam_layout_center">Centru</string>
|
||||
<string name="bottom_qam_layout_right">Dreapta</string>
|
||||
<string name="bottom_qam_unavailable">Meniul de acces rapid Steam nu este încă disponibil.</string>
|
||||
<string name="bottom_page_telemetry">Statistici în joc</string>
|
||||
<string name="bottom_hud_group">HUD pe ecranul de jos</string>
|
||||
<string name="bottom_strip_tabs">Bandă pe fiecare filă</string>
|
||||
|
||||
@@ -2100,6 +2100,13 @@
|
||||
<string name="stats_hud_red_mark">Красная отметка — температура, с которой HUD показывает значение красным.</string>
|
||||
<string name="stats_hud_whole_device">все устройство</string>
|
||||
<string name="stats_hud_battery_temp">батарея</string>
|
||||
<string name="bottom_art_title">Обложка игры</string>
|
||||
<string name="bottom_art_playing">Идёт игра</string>
|
||||
<string name="bottom_idle_selected">Выбрано в Steam</string>
|
||||
<string name="bottom_idle_recent">Последняя игра</string>
|
||||
<string name="bottom_idle_never">Ещё не запускалась</string>
|
||||
<string name="bottom_idle_minutes">Сыграно %1$d мин</string>
|
||||
<string name="bottom_idle_hours">Сыграно %1$d ч</string>
|
||||
<string name="bottom_telemetry_send_title">Передавать данные на дашборд</string>
|
||||
<string name="bottom_telemetry_send_auto">Автоматически</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Включает передачу для всех игр в этом списке, в том числе найденных позже. Игры, для которых вы ее выключили, остаются выключенными.</string>
|
||||
@@ -2122,6 +2129,59 @@
|
||||
<string name="bottom_chat_mic_off">Микрофон выкл.</string>
|
||||
<string name="bottom_chat_mic_unavailable">Микрофон для этой игры выключен. Чтобы говорить, включите «Микрофон» в настройках Steam в DroidDeck (Аудио) и запустите игру снова.</string>
|
||||
<string name="bottom_chat_volume">Громкость %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Скрыть панель</string>
|
||||
<string name="bottom_bar_show">Показать панель</string>
|
||||
<string name="bottom_brightness">Яркость нижнего экрана</string>
|
||||
<string name="bottom_screen_off">Выключить нижний экран</string>
|
||||
<string name="bottom_page_guides">Руководства</string>
|
||||
<string name="bottom_guides_no_game">Запустите игру, чтобы увидеть здесь её руководства Steam.</string>
|
||||
<string name="bottom_guides_continue">Продолжить чтение</string>
|
||||
<string name="bottom_guides_empty">Для этой игры пока нет руководств Steam.</string>
|
||||
<string name="bottom_guides_failed">Не удалось загрузить руководства Steam. Попробуйте снова, когда будете в сети.</string>
|
||||
<string name="bottom_page_mirror">Зеркало</string>
|
||||
<string name="bottom_mirror_pick">Проведите по части игры, которую нужно показывать здесь, например по мини-карте.</string>
|
||||
<string name="bottom_mirror_save">Сохранить область</string>
|
||||
<string name="bottom_mirror_sharp">Чётко</string>
|
||||
<string name="bottom_mirror_smooth">Сглаженно</string>
|
||||
<string name="bottom_mirror_no_frame">Сейчас не удаётся скопировать изображение игры.</string>
|
||||
<string name="bottom_guides_wiki">Вики и исправления</string>
|
||||
<string name="bottom_guides_maps">Карты</string>
|
||||
<string name="bottom_guides_saved">Сохранённое</string>
|
||||
<string name="bottom_guides_tag_all">Все</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Прохождения</string>
|
||||
<string name="bottom_guides_tag_secrets">Секреты</string>
|
||||
<string name="bottom_guides_pinned">Карта закреплена в картах этой игры.</string>
|
||||
<string name="bottom_guides_pin_failed">Не удалось сохранить изображение.</string>
|
||||
<string name="bottom_guides_saved_note">Страница сохранена для чтения офлайн.</string>
|
||||
<string name="bottom_guides_search">Поиск в интернете</string>
|
||||
<string name="bottom_guides_markers">Метки: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Найти карты</string>
|
||||
<string name="bottom_guides_saved_hint">Нажмите «Сохранить» в читалке, чтобы читать страницу офлайн.</string>
|
||||
<string name="bottom_guides_pin">Закрепить как карту</string>
|
||||
<string name="bottom_guides_pin_hint">Удерживайте изображение, чтобы закрепить его как карту.</string>
|
||||
<string name="bottom_guides_marker_hint">Сведите пальцы для масштаба. Удерживайте, чтобы добавить метку; коснитесь метки, чтобы удалить её.</string>
|
||||
<string name="bottom_guides_link_wiki">Вики игры</string>
|
||||
<string name="bottom_guides_link_pcgw">Исправления PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Прохождения на YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Видно</string>
|
||||
<string name="bottom_mirror_hide_black">Скрыто</string>
|
||||
<string name="bottom_mirror_hide_dim">Затемнено</string>
|
||||
<string name="bottom_guides_steam">Руководства Steam</string>
|
||||
<string name="bottom_guides_category">Категория</string>
|
||||
<string name="bottom_guides_maps_empty">Пока нет закреплённых карт</string>
|
||||
<string name="bottom_guides_map_name">Карта %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Пока нет сохранённых страниц</string>
|
||||
<string name="bottom_mirror_options">Параметры зеркала</string>
|
||||
<string name="bottom_mirror_region">Область</string>
|
||||
<string name="bottom_mirror_top">Верхний экран</string>
|
||||
<string name="bottom_mirror_scaling">Масштабирование</string>
|
||||
<string name="bottom_qam_title">Быстрый доступ</string>
|
||||
<string name="bottom_qam_layout">Макет: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Во всю ширину</string>
|
||||
<string name="bottom_qam_layout_left">Слева</string>
|
||||
<string name="bottom_qam_layout_center">По центру</string>
|
||||
<string name="bottom_qam_layout_right">Справа</string>
|
||||
<string name="bottom_qam_unavailable">Меню быстрого доступа Steam пока недоступно.</string>
|
||||
<string name="bottom_page_telemetry">Игровая статистика</string>
|
||||
<string name="bottom_hud_group">HUD нижнего экрана</string>
|
||||
<string name="bottom_strip_tabs">Полоса на всех вкладках</string>
|
||||
|
||||
@@ -2049,6 +2049,13 @@
|
||||
<string name="stats_hud_red_mark">Det röda märket är där HUD:en visar temperaturen i rött.</string>
|
||||
<string name="stats_hud_whole_device">hela enheten</string>
|
||||
<string name="stats_hud_battery_temp">batteri</string>
|
||||
<string name="bottom_art_title">Spelgrafik</string>
|
||||
<string name="bottom_art_playing">Spelar</string>
|
||||
<string name="bottom_idle_selected">Vald i Steam</string>
|
||||
<string name="bottom_idle_recent">Senast spelad</string>
|
||||
<string name="bottom_idle_never">Inte spelad än</string>
|
||||
<string name="bottom_idle_minutes">%1$d min spelat</string>
|
||||
<string name="bottom_idle_hours">%1$d tim spelat</string>
|
||||
<string name="bottom_telemetry_send_title">Skicka data till instrumentpanelen</string>
|
||||
<string name="bottom_telemetry_send_auto">Automatiskt</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Slår på det för alla spel i listan, även spel som hittas senare. Spel som du stänger av förblir avstängda.</string>
|
||||
@@ -2071,6 +2078,59 @@
|
||||
<string name="bottom_chat_mic_off">Mikrofon av</string>
|
||||
<string name="bottom_chat_mic_unavailable">Mikrofonen är avstängd för det här spelet. Slå på Mikrofon i DroidDecks Steam-inställningar (Ljud) och starta spelet igen för att prata.</string>
|
||||
<string name="bottom_chat_volume">Volym %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Dölj fältet</string>
|
||||
<string name="bottom_bar_show">Visa fältet</string>
|
||||
<string name="bottom_brightness">Ljusstyrka för nedre skärmen</string>
|
||||
<string name="bottom_screen_off">Stäng av den nedre skärmen</string>
|
||||
<string name="bottom_page_guides">Guider</string>
|
||||
<string name="bottom_guides_no_game">Starta ett spel för att se dess Steam-guider här.</string>
|
||||
<string name="bottom_guides_continue">Fortsätt läsa</string>
|
||||
<string name="bottom_guides_empty">Det finns inga Steam-guider för det här spelet ännu.</string>
|
||||
<string name="bottom_guides_failed">Det gick inte att läsa in Steam-guider. Försök igen när du är online.</string>
|
||||
<string name="bottom_page_mirror">Spegel</string>
|
||||
<string name="bottom_mirror_pick">Dra över den del av spelet som ska visas här, till exempel minikartan.</string>
|
||||
<string name="bottom_mirror_save">Spara område</string>
|
||||
<string name="bottom_mirror_sharp">Skarp</string>
|
||||
<string name="bottom_mirror_smooth">Mjuk</string>
|
||||
<string name="bottom_mirror_no_frame">Spelbilden kan inte kopieras just nu.</string>
|
||||
<string name="bottom_guides_wiki">Wiki och fixar</string>
|
||||
<string name="bottom_guides_maps">Kartor</string>
|
||||
<string name="bottom_guides_saved">Sparat</string>
|
||||
<string name="bottom_guides_tag_all">Alla</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Genomgångar</string>
|
||||
<string name="bottom_guides_tag_secrets">Hemligheter</string>
|
||||
<string name="bottom_guides_pinned">Kartan har fästs bland spelets kartor.</string>
|
||||
<string name="bottom_guides_pin_failed">Bilden kunde inte sparas.</string>
|
||||
<string name="bottom_guides_saved_note">Sidan har sparats för läsning offline.</string>
|
||||
<string name="bottom_guides_search">Sök på webben</string>
|
||||
<string name="bottom_guides_markers">Markörer: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Hitta kartor</string>
|
||||
<string name="bottom_guides_saved_hint">Använd Spara i läsaren för att behålla en sida offline.</string>
|
||||
<string name="bottom_guides_pin">Fäst som karta</string>
|
||||
<string name="bottom_guides_pin_hint">Håll på en bild för att fästa den som karta.</string>
|
||||
<string name="bottom_guides_marker_hint">Nyp för att zooma. Håll för att lägga till en markör, tryck på en för att ta bort den.</string>
|
||||
<string name="bottom_guides_link_wiki">Spelets wiki</string>
|
||||
<string name="bottom_guides_link_pcgw">Fixar från PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Genomgångar på YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Visas</string>
|
||||
<string name="bottom_mirror_hide_black">Dold</string>
|
||||
<string name="bottom_mirror_hide_dim">Dämpad</string>
|
||||
<string name="bottom_guides_steam">Steam-guider</string>
|
||||
<string name="bottom_guides_category">Kategori</string>
|
||||
<string name="bottom_guides_maps_empty">Inga fästa kartor än</string>
|
||||
<string name="bottom_guides_map_name">Karta %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Inga sparade sidor än</string>
|
||||
<string name="bottom_mirror_options">Spegelalternativ</string>
|
||||
<string name="bottom_mirror_region">Område</string>
|
||||
<string name="bottom_mirror_top">Övre skärm</string>
|
||||
<string name="bottom_mirror_scaling">Skalning</string>
|
||||
<string name="bottom_qam_title">Snabbåtkomst</string>
|
||||
<string name="bottom_qam_layout">Layout: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Full bredd</string>
|
||||
<string name="bottom_qam_layout_left">Vänster</string>
|
||||
<string name="bottom_qam_layout_center">Mitten</string>
|
||||
<string name="bottom_qam_layout_right">Höger</string>
|
||||
<string name="bottom_qam_unavailable">Steams snabbåtkomstmeny är inte tillgänglig än.</string>
|
||||
<string name="bottom_page_telemetry">Statistik i spelet</string>
|
||||
<string name="bottom_hud_group">HUD på nedre skärmen</string>
|
||||
<string name="bottom_strip_tabs">Remsa på varje flik</string>
|
||||
|
||||
@@ -2025,6 +2025,13 @@
|
||||
<string name="stats_hud_red_mark">ขีดสีแดงคือจุดที่ HUD แสดงอุณหภูมิเป็นสีแดง</string>
|
||||
<string name="stats_hud_whole_device">ทั้งเครื่อง</string>
|
||||
<string name="stats_hud_battery_temp">แบตเตอรี่</string>
|
||||
<string name="bottom_art_title">ภาพเกม</string>
|
||||
<string name="bottom_art_playing">กำลังเล่น</string>
|
||||
<string name="bottom_idle_selected">เลือกใน Steam</string>
|
||||
<string name="bottom_idle_recent">เล่นล่าสุด</string>
|
||||
<string name="bottom_idle_never">ยังไม่ได้เล่น</string>
|
||||
<string name="bottom_idle_minutes">เล่นแล้ว %1$d นาที</string>
|
||||
<string name="bottom_idle_hours">เล่นแล้ว %1$d ชม.</string>
|
||||
<string name="bottom_telemetry_send_title">ส่งข้อมูลแดชบอร์ด</string>
|
||||
<string name="bottom_telemetry_send_auto">อัตโนมัติ</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">เปิดใช้สำหรับทุกเกมที่แสดงที่นี่ รวมถึงเกมที่พบในภายหลัง เกมที่คุณปิดไว้จะยังคงปิดอยู่</string>
|
||||
@@ -2047,6 +2054,59 @@
|
||||
<string name="bottom_chat_mic_off">ไมค์ปิด</string>
|
||||
<string name="bottom_chat_mic_unavailable">ไมค์ปิดอยู่สำหรับเกมนี้ หากต้องการพูด ให้เปิดไมโครโฟนในการตั้งค่า Steam ของ DroidDeck (เสียง) แล้วเริ่มเกมอีกครั้ง</string>
|
||||
<string name="bottom_chat_volume">ระดับเสียง %1$d%%</string>
|
||||
<string name="bottom_bar_hide">ซ่อนแถบ</string>
|
||||
<string name="bottom_bar_show">แสดงแถบ</string>
|
||||
<string name="bottom_brightness">ความสว่างของหน้าจอล่าง</string>
|
||||
<string name="bottom_screen_off">ปิดหน้าจอล่าง</string>
|
||||
<string name="bottom_page_guides">คู่มือ</string>
|
||||
<string name="bottom_guides_no_game">เริ่มเกมเพื่อดูคู่มือ Steam ของเกมที่นี่</string>
|
||||
<string name="bottom_guides_continue">อ่านต่อ</string>
|
||||
<string name="bottom_guides_empty">ยังไม่มีคู่มือ Steam สำหรับเกมนี้</string>
|
||||
<string name="bottom_guides_failed">โหลดคู่มือ Steam ไม่ได้ ลองอีกครั้งเมื่อออนไลน์</string>
|
||||
<string name="bottom_page_mirror">กระจก</string>
|
||||
<string name="bottom_mirror_pick">ลากครอบส่วนของเกมที่ต้องการแสดงที่นี่ เช่น มินิแมป</string>
|
||||
<string name="bottom_mirror_save">บันทึกพื้นที่</string>
|
||||
<string name="bottom_mirror_sharp">คมชัด</string>
|
||||
<string name="bottom_mirror_smooth">นุ่มนวล</string>
|
||||
<string name="bottom_mirror_no_frame">ตอนนี้ไม่สามารถคัดลอกภาพเกมได้</string>
|
||||
<string name="bottom_guides_wiki">วิกิและวิธีแก้</string>
|
||||
<string name="bottom_guides_maps">แผนที่</string>
|
||||
<string name="bottom_guides_saved">ที่บันทึกไว้</string>
|
||||
<string name="bottom_guides_tag_all">ทั้งหมด</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">บทสรุป</string>
|
||||
<string name="bottom_guides_tag_secrets">ความลับ</string>
|
||||
<string name="bottom_guides_pinned">ปักหมุดแผนที่ไว้ในแผนที่ของเกมนี้แล้ว</string>
|
||||
<string name="bottom_guides_pin_failed">บันทึกภาพนั้นไม่ได้</string>
|
||||
<string name="bottom_guides_saved_note">บันทึกหน้าไว้อ่านออฟไลน์แล้ว</string>
|
||||
<string name="bottom_guides_search">ค้นหาบนเว็บ</string>
|
||||
<string name="bottom_guides_markers">เครื่องหมาย: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">ค้นหาแผนที่</string>
|
||||
<string name="bottom_guides_saved_hint">ใช้ปุ่มบันทึกในตัวอ่านเพื่อเก็บหน้าไว้อ่านออฟไลน์</string>
|
||||
<string name="bottom_guides_pin">ปักหมุดเป็นแผนที่</string>
|
||||
<string name="bottom_guides_pin_hint">กดค้างที่ภาพเพื่อปักหมุดเป็นแผนที่</string>
|
||||
<string name="bottom_guides_marker_hint">จีบนิ้วเพื่อซูม กดค้างเพื่อเพิ่มเครื่องหมาย แตะเครื่องหมายเพื่อลบ</string>
|
||||
<string name="bottom_guides_link_wiki">วิกิของเกม</string>
|
||||
<string name="bottom_guides_link_pcgw">วิธีแก้จาก PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">บทสรุปบน YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">แสดง</string>
|
||||
<string name="bottom_mirror_hide_black">ซ่อน</string>
|
||||
<string name="bottom_mirror_hide_dim">หรี่</string>
|
||||
<string name="bottom_guides_steam">คู่มือ Steam</string>
|
||||
<string name="bottom_guides_category">หมวดหมู่</string>
|
||||
<string name="bottom_guides_maps_empty">ยังไม่มีแผนที่ที่ปักหมุด</string>
|
||||
<string name="bottom_guides_map_name">แผนที่ %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">ยังไม่มีหน้าที่บันทึก</string>
|
||||
<string name="bottom_mirror_options">ตัวเลือกการสะท้อน</string>
|
||||
<string name="bottom_mirror_region">พื้นที่</string>
|
||||
<string name="bottom_mirror_top">จอบน</string>
|
||||
<string name="bottom_mirror_scaling">การปรับขนาด</string>
|
||||
<string name="bottom_qam_title">เข้าถึงด่วน</string>
|
||||
<string name="bottom_qam_layout">เลย์เอาต์: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">เต็มความกว้าง</string>
|
||||
<string name="bottom_qam_layout_left">ซ้าย</string>
|
||||
<string name="bottom_qam_layout_center">กึ่งกลาง</string>
|
||||
<string name="bottom_qam_layout_right">ขวา</string>
|
||||
<string name="bottom_qam_unavailable">เมนูเข้าถึงด่วนของ Steam ยังไม่พร้อมใช้งาน</string>
|
||||
<string name="bottom_page_telemetry">สถิติในเกม</string>
|
||||
<string name="bottom_hud_group">HUD หน้าจอล่าง</string>
|
||||
<string name="bottom_strip_tabs">แถบในทุกแท็บ</string>
|
||||
|
||||
@@ -2041,6 +2041,13 @@
|
||||
<string name="stats_hud_red_mark">Kırmızı işaret, sıcaklığın HUD üzerinde kırmızı göründüğü yerdir.</string>
|
||||
<string name="stats_hud_whole_device">tüm cihaz</string>
|
||||
<string name="stats_hud_battery_temp">pil</string>
|
||||
<string name="bottom_art_title">Oyun görseli</string>
|
||||
<string name="bottom_art_playing">Oynanıyor</string>
|
||||
<string name="bottom_idle_selected">Steam\'de seçili</string>
|
||||
<string name="bottom_idle_recent">Son oynanan</string>
|
||||
<string name="bottom_idle_never">Henüz oynanmadı</string>
|
||||
<string name="bottom_idle_minutes">%1$d dk oynandı</string>
|
||||
<string name="bottom_idle_hours">%1$d sa oynandı</string>
|
||||
<string name="bottom_telemetry_send_title">Gösterge verilerini gönder</string>
|
||||
<string name="bottom_telemetry_send_auto">Otomatik</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Sonradan bulunanlar dahil, burada listelenen her oyun için açar. Kapattığınız oyunlar kapalı kalır.</string>
|
||||
@@ -2063,6 +2070,59 @@
|
||||
<string name="bottom_chat_mic_off">Mikrofon kapalı</string>
|
||||
<string name="bottom_chat_mic_unavailable">Bu oyun için mikrofon kapalı. Konuşmak için DroidDeck\'in Steam ayarlarında (Ses) Mikrofon\'u açın ve oyunu yeniden başlatın.</string>
|
||||
<string name="bottom_chat_volume">Ses düzeyi %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Çubuğu gizle</string>
|
||||
<string name="bottom_bar_show">Çubuğu göster</string>
|
||||
<string name="bottom_brightness">Alt ekran parlaklığı</string>
|
||||
<string name="bottom_screen_off">Alt ekranı kapat</string>
|
||||
<string name="bottom_page_guides">Rehberler</string>
|
||||
<string name="bottom_guides_no_game">Steam rehberlerini burada görmek için bir oyun başlatın.</string>
|
||||
<string name="bottom_guides_continue">Okumaya devam et</string>
|
||||
<string name="bottom_guides_empty">Bu oyun için henüz Steam rehberi yok.</string>
|
||||
<string name="bottom_guides_failed">Steam rehberleri yüklenemedi. Çevrimiçi olduğunuzda tekrar deneyin.</string>
|
||||
<string name="bottom_page_mirror">Ayna</string>
|
||||
<string name="bottom_mirror_pick">Burada gösterilecek oyun bölümünün üzerinden sürükleyin, örneğin mini harita.</string>
|
||||
<string name="bottom_mirror_save">Bölgeyi kaydet</string>
|
||||
<string name="bottom_mirror_sharp">Keskin</string>
|
||||
<string name="bottom_mirror_smooth">Yumuşak</string>
|
||||
<string name="bottom_mirror_no_frame">Oyun görüntüsü şu anda kopyalanamıyor.</string>
|
||||
<string name="bottom_guides_wiki">Wiki ve düzeltmeler</string>
|
||||
<string name="bottom_guides_maps">Haritalar</string>
|
||||
<string name="bottom_guides_saved">Kaydedilenler</string>
|
||||
<string name="bottom_guides_tag_all">Tümü</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">İzlenecek yollar</string>
|
||||
<string name="bottom_guides_tag_secrets">Sırlar</string>
|
||||
<string name="bottom_guides_pinned">Harita bu oyunun haritalarına sabitlendi.</string>
|
||||
<string name="bottom_guides_pin_failed">Görsel kaydedilemedi.</string>
|
||||
<string name="bottom_guides_saved_note">Sayfa çevrimdışı okumak için kaydedildi.</string>
|
||||
<string name="bottom_guides_search">Web\'de ara</string>
|
||||
<string name="bottom_guides_markers">İşaretler: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Harita bul</string>
|
||||
<string name="bottom_guides_saved_hint">Sayfayı çevrimdışı tutmak için okuyucuda Kaydet\'i kullanın.</string>
|
||||
<string name="bottom_guides_pin">Harita olarak sabitle</string>
|
||||
<string name="bottom_guides_pin_hint">Bir görseli harita olarak sabitlemek için uzun basın.</string>
|
||||
<string name="bottom_guides_marker_hint">Yakınlaştırmak için sıkıştırın. İşaret eklemek için uzun basın, kaldırmak için işarete dokunun.</string>
|
||||
<string name="bottom_guides_link_wiki">Oyun wiki\'si</string>
|
||||
<string name="bottom_guides_link_pcgw">PCGamingWiki düzeltmeleri</string>
|
||||
<string name="bottom_guides_search_youtube">YouTube izlenecek yolları</string>
|
||||
<string name="bottom_mirror_hide_off">Görünür</string>
|
||||
<string name="bottom_mirror_hide_black">Gizli</string>
|
||||
<string name="bottom_mirror_hide_dim">Karartılmış</string>
|
||||
<string name="bottom_guides_steam">Steam rehberleri</string>
|
||||
<string name="bottom_guides_category">Kategori</string>
|
||||
<string name="bottom_guides_maps_empty">Henüz sabitlenmiş harita yok</string>
|
||||
<string name="bottom_guides_map_name">Harita %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Henüz kaydedilmiş sayfa yok</string>
|
||||
<string name="bottom_mirror_options">Ayna seçenekleri</string>
|
||||
<string name="bottom_mirror_region">Bölge</string>
|
||||
<string name="bottom_mirror_top">Üst ekran</string>
|
||||
<string name="bottom_mirror_scaling">Ölçekleme</string>
|
||||
<string name="bottom_qam_title">Hızlı Erişim</string>
|
||||
<string name="bottom_qam_layout">Düzen: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Tam genişlik</string>
|
||||
<string name="bottom_qam_layout_left">Sol</string>
|
||||
<string name="bottom_qam_layout_center">Orta</string>
|
||||
<string name="bottom_qam_layout_right">Sağ</string>
|
||||
<string name="bottom_qam_unavailable">Steam Hızlı Erişim menüsü henüz kullanılamıyor.</string>
|
||||
<string name="bottom_page_telemetry">Oyun içi istatistikler</string>
|
||||
<string name="bottom_hud_group">Alt ekrandaki HUD</string>
|
||||
<string name="bottom_strip_tabs">Her sekmede şerit</string>
|
||||
|
||||
@@ -2099,6 +2099,13 @@
|
||||
<string name="stats_hud_red_mark">Червона позначка — це поріг, після якого HUD показує температуру червоним.</string>
|
||||
<string name="stats_hud_whole_device">весь пристрій</string>
|
||||
<string name="stats_hud_battery_temp">акумулятор</string>
|
||||
<string name="bottom_art_title">Обкладинка гри</string>
|
||||
<string name="bottom_art_playing">Триває гра</string>
|
||||
<string name="bottom_idle_selected">Вибрано в Steam</string>
|
||||
<string name="bottom_idle_recent">Остання гра</string>
|
||||
<string name="bottom_idle_never">Ще не запускалася</string>
|
||||
<string name="bottom_idle_minutes">Зіграно %1$d хв</string>
|
||||
<string name="bottom_idle_hours">Зіграно %1$d год</string>
|
||||
<string name="bottom_telemetry_send_title">Надсилати дані для панелі</string>
|
||||
<string name="bottom_telemetry_send_auto">Автоматично</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Вмикає це для кожної гри в цьому списку, зокрема для знайдених пізніше. Ігри, які ви вимкнете, лишаються вимкненими.</string>
|
||||
@@ -2121,6 +2128,59 @@
|
||||
<string name="bottom_chat_mic_off">Мікрофон вимкнено</string>
|
||||
<string name="bottom_chat_mic_unavailable">Для цієї гри мікрофон вимкнено. Щоб говорити, увімкніть «Мікрофон» у налаштуваннях Steam у DroidDeck (Звук) і запустіть гру знову.</string>
|
||||
<string name="bottom_chat_volume">Гучність %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Сховати панель</string>
|
||||
<string name="bottom_bar_show">Показати панель</string>
|
||||
<string name="bottom_brightness">Яскравість нижнього екрана</string>
|
||||
<string name="bottom_screen_off">Вимкнути нижній екран</string>
|
||||
<string name="bottom_page_guides">Посібники</string>
|
||||
<string name="bottom_guides_no_game">Запустіть гру, щоб побачити тут її посібники Steam.</string>
|
||||
<string name="bottom_guides_continue">Продовжити читання</string>
|
||||
<string name="bottom_guides_empty">Для цієї гри ще немає посібників Steam.</string>
|
||||
<string name="bottom_guides_failed">Не вдалося завантажити посібники Steam. Спробуйте знову, коли будете онлайн.</string>
|
||||
<string name="bottom_page_mirror">Дзеркало</string>
|
||||
<string name="bottom_mirror_pick">Проведіть по частині гри, яку треба показувати тут, наприклад по мінікарті.</string>
|
||||
<string name="bottom_mirror_save">Зберегти область</string>
|
||||
<string name="bottom_mirror_sharp">Чітко</string>
|
||||
<string name="bottom_mirror_smooth">Згладжено</string>
|
||||
<string name="bottom_mirror_no_frame">Зараз не вдається скопіювати зображення гри.</string>
|
||||
<string name="bottom_guides_wiki">Вікі та виправлення</string>
|
||||
<string name="bottom_guides_maps">Мапи</string>
|
||||
<string name="bottom_guides_saved">Збережене</string>
|
||||
<string name="bottom_guides_tag_all">Усі</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Проходження</string>
|
||||
<string name="bottom_guides_tag_secrets">Секрети</string>
|
||||
<string name="bottom_guides_pinned">Мапу закріплено в мапах цієї гри.</string>
|
||||
<string name="bottom_guides_pin_failed">Не вдалося зберегти зображення.</string>
|
||||
<string name="bottom_guides_saved_note">Сторінку збережено для читання офлайн.</string>
|
||||
<string name="bottom_guides_search">Пошук в інтернеті</string>
|
||||
<string name="bottom_guides_markers">Позначки: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Знайти мапи</string>
|
||||
<string name="bottom_guides_saved_hint">Натисніть «Зберегти» в читачі, щоб читати сторінку офлайн.</string>
|
||||
<string name="bottom_guides_pin">Закріпити як мапу</string>
|
||||
<string name="bottom_guides_pin_hint">Утримуйте зображення, щоб закріпити його як мапу.</string>
|
||||
<string name="bottom_guides_marker_hint">Зведіть пальці для масштабу. Утримуйте, щоб додати позначку; торкніться її, щоб видалити.</string>
|
||||
<string name="bottom_guides_link_wiki">Вікі гри</string>
|
||||
<string name="bottom_guides_link_pcgw">Виправлення PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Проходження на YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Видно</string>
|
||||
<string name="bottom_mirror_hide_black">Приховано</string>
|
||||
<string name="bottom_mirror_hide_dim">Затемнено</string>
|
||||
<string name="bottom_guides_steam">Посібники Steam</string>
|
||||
<string name="bottom_guides_category">Категорія</string>
|
||||
<string name="bottom_guides_maps_empty">Ще немає закріплених мап</string>
|
||||
<string name="bottom_guides_map_name">Мапа %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Ще немає збережених сторінок</string>
|
||||
<string name="bottom_mirror_options">Параметри дзеркала</string>
|
||||
<string name="bottom_mirror_region">Область</string>
|
||||
<string name="bottom_mirror_top">Верхній екран</string>
|
||||
<string name="bottom_mirror_scaling">Масштабування</string>
|
||||
<string name="bottom_qam_title">Швидкий доступ</string>
|
||||
<string name="bottom_qam_layout">Макет: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">На всю ширину</string>
|
||||
<string name="bottom_qam_layout_left">Ліворуч</string>
|
||||
<string name="bottom_qam_layout_center">По центру</string>
|
||||
<string name="bottom_qam_layout_right">Праворуч</string>
|
||||
<string name="bottom_qam_unavailable">Меню швидкого доступу Steam ще недоступне.</string>
|
||||
<string name="bottom_page_telemetry">Ігрова статистика</string>
|
||||
<string name="bottom_hud_group">HUD на нижньому екрані</string>
|
||||
<string name="bottom_strip_tabs">Смуга на кожній вкладці</string>
|
||||
|
||||
@@ -2025,6 +2025,13 @@
|
||||
<string name="stats_hud_red_mark">Vạch đỏ là vị trí HUD hiển thị nhiệt độ bằng màu đỏ.</string>
|
||||
<string name="stats_hud_whole_device">toàn thiết bị</string>
|
||||
<string name="stats_hud_battery_temp">pin</string>
|
||||
<string name="bottom_art_title">Hình ảnh trò chơi</string>
|
||||
<string name="bottom_art_playing">Đang chơi</string>
|
||||
<string name="bottom_idle_selected">Đã chọn trong Steam</string>
|
||||
<string name="bottom_idle_recent">Chơi gần đây</string>
|
||||
<string name="bottom_idle_never">Chưa chơi</string>
|
||||
<string name="bottom_idle_minutes">Đã chơi %1$d phút</string>
|
||||
<string name="bottom_idle_hours">Đã chơi %1$d giờ</string>
|
||||
<string name="bottom_telemetry_send_title">Gửi dữ liệu bảng đồng hồ</string>
|
||||
<string name="bottom_telemetry_send_auto">Tự động</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Bật cho mọi game trong danh sách này, kể cả game được tìm thấy sau này. Game bạn đã tắt sẽ vẫn tắt.</string>
|
||||
@@ -2047,6 +2054,59 @@
|
||||
<string name="bottom_chat_mic_off">Micro tắt</string>
|
||||
<string name="bottom_chat_mic_unavailable">Micro đang tắt cho game này. Để nói chuyện, hãy bật Micro trong thiết lập Steam của DroidDeck (Âm thanh) rồi khởi động lại game.</string>
|
||||
<string name="bottom_chat_volume">Âm lượng %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Ẩn thanh</string>
|
||||
<string name="bottom_bar_show">Hiện thanh</string>
|
||||
<string name="bottom_brightness">Độ sáng màn hình dưới</string>
|
||||
<string name="bottom_screen_off">Tắt màn hình dưới</string>
|
||||
<string name="bottom_page_guides">Hướng dẫn</string>
|
||||
<string name="bottom_guides_no_game">Hãy mở một trò chơi để xem hướng dẫn Steam của nó tại đây.</string>
|
||||
<string name="bottom_guides_continue">Đọc tiếp</string>
|
||||
<string name="bottom_guides_empty">Trò chơi này chưa có hướng dẫn Steam nào.</string>
|
||||
<string name="bottom_guides_failed">Không tải được hướng dẫn Steam. Hãy thử lại khi bạn trực tuyến.</string>
|
||||
<string name="bottom_page_mirror">Phản chiếu</string>
|
||||
<string name="bottom_mirror_pick">Kéo qua phần trò chơi muốn hiển thị ở đây, chẳng hạn bản đồ nhỏ.</string>
|
||||
<string name="bottom_mirror_save">Lưu vùng</string>
|
||||
<string name="bottom_mirror_sharp">Sắc nét</string>
|
||||
<string name="bottom_mirror_smooth">Mượt</string>
|
||||
<string name="bottom_mirror_no_frame">Hiện không thể sao chép hình ảnh trò chơi.</string>
|
||||
<string name="bottom_guides_wiki">Wiki và cách sửa</string>
|
||||
<string name="bottom_guides_maps">Bản đồ</string>
|
||||
<string name="bottom_guides_saved">Đã lưu</string>
|
||||
<string name="bottom_guides_tag_all">Tất cả</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Hướng dẫn đầy đủ</string>
|
||||
<string name="bottom_guides_tag_secrets">Bí mật</string>
|
||||
<string name="bottom_guides_pinned">Đã ghim bản đồ vào bản đồ của trò chơi này.</string>
|
||||
<string name="bottom_guides_pin_failed">Không lưu được hình ảnh đó.</string>
|
||||
<string name="bottom_guides_saved_note">Đã lưu trang để đọc ngoại tuyến.</string>
|
||||
<string name="bottom_guides_search">Tìm trên web</string>
|
||||
<string name="bottom_guides_markers">Điểm đánh dấu: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Tìm bản đồ</string>
|
||||
<string name="bottom_guides_saved_hint">Dùng Lưu trong trình đọc để giữ trang đọc ngoại tuyến.</string>
|
||||
<string name="bottom_guides_pin">Ghim làm bản đồ</string>
|
||||
<string name="bottom_guides_pin_hint">Nhấn giữ một hình để ghim làm bản đồ.</string>
|
||||
<string name="bottom_guides_marker_hint">Chụm để thu phóng. Nhấn giữ để thêm điểm đánh dấu, chạm vào để xóa.</string>
|
||||
<string name="bottom_guides_link_wiki">Wiki trò chơi</string>
|
||||
<string name="bottom_guides_link_pcgw">Cách sửa từ PCGamingWiki</string>
|
||||
<string name="bottom_guides_search_youtube">Hướng dẫn trên YouTube</string>
|
||||
<string name="bottom_mirror_hide_off">Hiện</string>
|
||||
<string name="bottom_mirror_hide_black">Ẩn</string>
|
||||
<string name="bottom_mirror_hide_dim">Làm tối</string>
|
||||
<string name="bottom_guides_steam">Hướng dẫn Steam</string>
|
||||
<string name="bottom_guides_category">Danh mục</string>
|
||||
<string name="bottom_guides_maps_empty">Chưa có bản đồ nào được ghim</string>
|
||||
<string name="bottom_guides_map_name">Bản đồ %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">Chưa có trang nào được lưu</string>
|
||||
<string name="bottom_mirror_options">Tùy chọn phản chiếu</string>
|
||||
<string name="bottom_mirror_region">Vùng</string>
|
||||
<string name="bottom_mirror_top">Màn hình trên</string>
|
||||
<string name="bottom_mirror_scaling">Thu phóng</string>
|
||||
<string name="bottom_qam_title">Truy cập nhanh</string>
|
||||
<string name="bottom_qam_layout">Bố cục: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Toàn chiều rộng</string>
|
||||
<string name="bottom_qam_layout_left">Trái</string>
|
||||
<string name="bottom_qam_layout_center">Giữa</string>
|
||||
<string name="bottom_qam_layout_right">Phải</string>
|
||||
<string name="bottom_qam_unavailable">Menu Truy cập nhanh của Steam chưa sẵn sàng.</string>
|
||||
<string name="bottom_page_telemetry">Thông số trong game</string>
|
||||
<string name="bottom_hud_group">HUD màn hình dưới</string>
|
||||
<string name="bottom_strip_tabs">Thanh trên mọi tab</string>
|
||||
|
||||
@@ -2102,6 +2102,13 @@
|
||||
<string name="stats_hud_red_mark">红色标记处,HUD 会以红色显示温度。</string>
|
||||
<string name="stats_hud_whole_device">整机</string>
|
||||
<string name="stats_hud_battery_temp">电池</string>
|
||||
<string name="bottom_art_title">游戏插图</string>
|
||||
<string name="bottom_art_playing">正在游玩</string>
|
||||
<string name="bottom_idle_selected">在 Steam 中选中</string>
|
||||
<string name="bottom_idle_recent">最近玩过</string>
|
||||
<string name="bottom_idle_never">尚未玩过</string>
|
||||
<string name="bottom_idle_minutes">已玩 %1$d 分钟</string>
|
||||
<string name="bottom_idle_hours">已玩 %1$d 小时</string>
|
||||
<string name="bottom_telemetry_send_title">发送仪表盘数据</string>
|
||||
<string name="bottom_telemetry_send_auto">自动</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">为此处列出的所有游戏开启,包括之后发现的游戏。你手动关闭的游戏会保持关闭。</string>
|
||||
@@ -2124,6 +2131,59 @@
|
||||
<string name="bottom_chat_mic_off">麦克风已关</string>
|
||||
<string name="bottom_chat_mic_unavailable">此游戏的麦克风已关闭。如需语音通话,请在 DroidDeck 的 Steam 设置(音频)中开启麦克风,然后重新启动游戏。</string>
|
||||
<string name="bottom_chat_volume">音量 %1$d%%</string>
|
||||
<string name="bottom_bar_hide">隐藏栏</string>
|
||||
<string name="bottom_bar_show">显示栏</string>
|
||||
<string name="bottom_brightness">下屏幕亮度</string>
|
||||
<string name="bottom_screen_off">关闭下屏</string>
|
||||
<string name="bottom_page_guides">指南</string>
|
||||
<string name="bottom_guides_no_game">启动游戏后,这里会显示它的 Steam 指南。</string>
|
||||
<string name="bottom_guides_continue">继续阅读</string>
|
||||
<string name="bottom_guides_empty">此游戏还没有 Steam 指南。</string>
|
||||
<string name="bottom_guides_failed">无法加载 Steam 指南。请在联网后重试。</string>
|
||||
<string name="bottom_page_mirror">镜像</string>
|
||||
<string name="bottom_mirror_pick">拖动框选要在这里显示的游戏区域,例如小地图。</string>
|
||||
<string name="bottom_mirror_save">保存区域</string>
|
||||
<string name="bottom_mirror_sharp">锐利</string>
|
||||
<string name="bottom_mirror_smooth">平滑</string>
|
||||
<string name="bottom_mirror_no_frame">现在无法复制游戏画面。</string>
|
||||
<string name="bottom_guides_wiki">Wiki 与修复</string>
|
||||
<string name="bottom_guides_maps">地图</string>
|
||||
<string name="bottom_guides_saved">已保存</string>
|
||||
<string name="bottom_guides_tag_all">全部</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">流程攻略</string>
|
||||
<string name="bottom_guides_tag_secrets">秘密</string>
|
||||
<string name="bottom_guides_pinned">已将地图固定到此游戏的地图。</string>
|
||||
<string name="bottom_guides_pin_failed">无法保存该图片。</string>
|
||||
<string name="bottom_guides_saved_note">已保存页面以供离线阅读。</string>
|
||||
<string name="bottom_guides_search">网络搜索</string>
|
||||
<string name="bottom_guides_markers">标记:%1$d</string>
|
||||
<string name="bottom_guides_find_maps">查找地图</string>
|
||||
<string name="bottom_guides_saved_hint">在阅读器中点保存,即可离线阅读页面。</string>
|
||||
<string name="bottom_guides_pin">固定为地图</string>
|
||||
<string name="bottom_guides_pin_hint">长按图片即可固定为地图。</string>
|
||||
<string name="bottom_guides_marker_hint">双指缩放。长按添加标记,点按标记可删除。</string>
|
||||
<string name="bottom_guides_link_wiki">游戏 Wiki</string>
|
||||
<string name="bottom_guides_link_pcgw">PCGamingWiki 修复</string>
|
||||
<string name="bottom_guides_search_youtube">YouTube 攻略</string>
|
||||
<string name="bottom_mirror_hide_off">显示</string>
|
||||
<string name="bottom_mirror_hide_black">隐藏</string>
|
||||
<string name="bottom_mirror_hide_dim">变暗</string>
|
||||
<string name="bottom_guides_steam">Steam 指南</string>
|
||||
<string name="bottom_guides_category">分类</string>
|
||||
<string name="bottom_guides_maps_empty">还没有固定的地图</string>
|
||||
<string name="bottom_guides_map_name">地图 %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">还没有保存的页面</string>
|
||||
<string name="bottom_mirror_options">镜像选项</string>
|
||||
<string name="bottom_mirror_region">区域</string>
|
||||
<string name="bottom_mirror_top">上屏</string>
|
||||
<string name="bottom_mirror_scaling">缩放</string>
|
||||
<string name="bottom_qam_title">快速访问</string>
|
||||
<string name="bottom_qam_layout">布局:%1$s</string>
|
||||
<string name="bottom_qam_layout_full">全宽</string>
|
||||
<string name="bottom_qam_layout_left">左侧</string>
|
||||
<string name="bottom_qam_layout_center">居中</string>
|
||||
<string name="bottom_qam_layout_right">右侧</string>
|
||||
<string name="bottom_qam_unavailable">Steam 快速访问菜单暂不可用。</string>
|
||||
<string name="bottom_page_telemetry">游戏内数据</string>
|
||||
<string name="bottom_hud_group">下屏 HUD</string>
|
||||
<string name="bottom_strip_tabs">所有页签显示横条</string>
|
||||
|
||||
@@ -2024,6 +2024,13 @@
|
||||
<string name="stats_hud_red_mark">紅色標記是 HUD 將溫度顯示為紅色的界線。</string>
|
||||
<string name="stats_hud_whole_device">整機</string>
|
||||
<string name="stats_hud_battery_temp">電池</string>
|
||||
<string name="bottom_art_title">遊戲美術</string>
|
||||
<string name="bottom_art_playing">遊玩中</string>
|
||||
<string name="bottom_idle_selected">在 Steam 中選取</string>
|
||||
<string name="bottom_idle_recent">最近玩過</string>
|
||||
<string name="bottom_idle_never">尚未玩過</string>
|
||||
<string name="bottom_idle_minutes">已玩 %1$d 分鐘</string>
|
||||
<string name="bottom_idle_hours">已玩 %1$d 小時</string>
|
||||
<string name="bottom_telemetry_send_title">傳送儀表板資料</string>
|
||||
<string name="bottom_telemetry_send_auto">自動</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">為這裡列出的所有遊戲開啟,包括之後找到的遊戲。你關閉的遊戲會維持關閉。</string>
|
||||
@@ -2046,6 +2053,59 @@
|
||||
<string name="bottom_chat_mic_off">麥克風已關閉</string>
|
||||
<string name="bottom_chat_mic_unavailable">此遊戲的麥克風已關閉。若要說話,請在 DroidDeck 的 Steam 設定(音訊)中開啟麥克風,然後重新啟動遊戲。</string>
|
||||
<string name="bottom_chat_volume">音量 %1$d%%</string>
|
||||
<string name="bottom_bar_hide">隱藏列</string>
|
||||
<string name="bottom_bar_show">顯示列</string>
|
||||
<string name="bottom_brightness">下方螢幕亮度</string>
|
||||
<string name="bottom_screen_off">關閉下螢幕</string>
|
||||
<string name="bottom_page_guides">指南</string>
|
||||
<string name="bottom_guides_no_game">啟動遊戲後,這裡會顯示它的 Steam 指南。</string>
|
||||
<string name="bottom_guides_continue">繼續閱讀</string>
|
||||
<string name="bottom_guides_empty">此遊戲暫時沒有 Steam 指南。</string>
|
||||
<string name="bottom_guides_failed">無法載入 Steam 指南。請在連線後再試。</string>
|
||||
<string name="bottom_page_mirror">鏡像</string>
|
||||
<string name="bottom_mirror_pick">拖曳框選要在這裡顯示的遊戲區域,例如小地圖。</string>
|
||||
<string name="bottom_mirror_save">儲存區域</string>
|
||||
<string name="bottom_mirror_sharp">銳利</string>
|
||||
<string name="bottom_mirror_smooth">平滑</string>
|
||||
<string name="bottom_mirror_no_frame">目前無法複製遊戲畫面。</string>
|
||||
<string name="bottom_guides_wiki">Wiki 與修正</string>
|
||||
<string name="bottom_guides_maps">地圖</string>
|
||||
<string name="bottom_guides_saved">已儲存</string>
|
||||
<string name="bottom_guides_tag_all">全部</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">流程攻略</string>
|
||||
<string name="bottom_guides_tag_secrets">秘密</string>
|
||||
<string name="bottom_guides_pinned">已將地圖釘選到此遊戲的地圖。</string>
|
||||
<string name="bottom_guides_pin_failed">無法儲存該圖片。</string>
|
||||
<string name="bottom_guides_saved_note">已儲存頁面供離線閱讀。</string>
|
||||
<string name="bottom_guides_search">網上搜尋</string>
|
||||
<string name="bottom_guides_markers">標記:%1$d</string>
|
||||
<string name="bottom_guides_find_maps">尋找地圖</string>
|
||||
<string name="bottom_guides_saved_hint">在閱讀器中按儲存,即可離線閱讀頁面。</string>
|
||||
<string name="bottom_guides_pin">釘選為地圖</string>
|
||||
<string name="bottom_guides_pin_hint">長按圖片即可釘選為地圖。</string>
|
||||
<string name="bottom_guides_marker_hint">雙指縮放。長按加入標記,點按標記可刪除。</string>
|
||||
<string name="bottom_guides_link_wiki">遊戲 Wiki</string>
|
||||
<string name="bottom_guides_link_pcgw">PCGamingWiki 修正</string>
|
||||
<string name="bottom_guides_search_youtube">YouTube 攻略</string>
|
||||
<string name="bottom_mirror_hide_off">顯示</string>
|
||||
<string name="bottom_mirror_hide_black">隱藏</string>
|
||||
<string name="bottom_mirror_hide_dim">變暗</string>
|
||||
<string name="bottom_guides_steam">Steam 指南</string>
|
||||
<string name="bottom_guides_category">分類</string>
|
||||
<string name="bottom_guides_maps_empty">尚未釘選地圖</string>
|
||||
<string name="bottom_guides_map_name">地圖 %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">尚未儲存頁面</string>
|
||||
<string name="bottom_mirror_options">鏡像選項</string>
|
||||
<string name="bottom_mirror_region">區域</string>
|
||||
<string name="bottom_mirror_top">上屏</string>
|
||||
<string name="bottom_mirror_scaling">縮放</string>
|
||||
<string name="bottom_qam_title">快速存取</string>
|
||||
<string name="bottom_qam_layout">版面配置:%1$s</string>
|
||||
<string name="bottom_qam_layout_full">全寬</string>
|
||||
<string name="bottom_qam_layout_left">左側</string>
|
||||
<string name="bottom_qam_layout_center">置中</string>
|
||||
<string name="bottom_qam_layout_right">右側</string>
|
||||
<string name="bottom_qam_unavailable">Steam 快速存取選單暫時無法使用。</string>
|
||||
<string name="bottom_page_telemetry">遊戲內數據</string>
|
||||
<string name="bottom_hud_group">下方螢幕 HUD</string>
|
||||
<string name="bottom_strip_tabs">在所有分頁顯示資訊列</string>
|
||||
|
||||
@@ -2024,6 +2024,13 @@
|
||||
<string name="stats_hud_red_mark">紅色標記是 HUD 將溫度顯示為紅色的位置。</string>
|
||||
<string name="stats_hud_whole_device">整台裝置</string>
|
||||
<string name="stats_hud_battery_temp">電池</string>
|
||||
<string name="bottom_art_title">遊戲美術</string>
|
||||
<string name="bottom_art_playing">遊玩中</string>
|
||||
<string name="bottom_idle_selected">在 Steam 中選取</string>
|
||||
<string name="bottom_idle_recent">最近玩過</string>
|
||||
<string name="bottom_idle_never">尚未玩過</string>
|
||||
<string name="bottom_idle_minutes">已玩 %1$d 分鐘</string>
|
||||
<string name="bottom_idle_hours">已玩 %1$d 小時</string>
|
||||
<string name="bottom_telemetry_send_title">傳送儀表板資料</string>
|
||||
<string name="bottom_telemetry_send_auto">自動</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">為這裡列出的所有遊戲開啟,包括之後找到的遊戲。你關閉的遊戲會維持關閉。</string>
|
||||
@@ -2046,6 +2053,59 @@
|
||||
<string name="bottom_chat_mic_off">麥克風已關閉</string>
|
||||
<string name="bottom_chat_mic_unavailable">此遊戲的麥克風已關閉。若要說話,請在 DroidDeck 的 Steam 設定(音訊)中開啟麥克風,然後重新啟動遊戲。</string>
|
||||
<string name="bottom_chat_volume">音量 %1$d%%</string>
|
||||
<string name="bottom_bar_hide">隱藏列</string>
|
||||
<string name="bottom_bar_show">顯示列</string>
|
||||
<string name="bottom_brightness">下方螢幕亮度</string>
|
||||
<string name="bottom_screen_off">關閉下螢幕</string>
|
||||
<string name="bottom_page_guides">指南</string>
|
||||
<string name="bottom_guides_no_game">啟動遊戲後,這裡會顯示它的 Steam 指南。</string>
|
||||
<string name="bottom_guides_continue">繼續閱讀</string>
|
||||
<string name="bottom_guides_empty">此遊戲尚無 Steam 指南。</string>
|
||||
<string name="bottom_guides_failed">無法載入 Steam 指南。請在連線後再試。</string>
|
||||
<string name="bottom_page_mirror">鏡像</string>
|
||||
<string name="bottom_mirror_pick">拖曳框選要在這裡顯示的遊戲區域,例如小地圖。</string>
|
||||
<string name="bottom_mirror_save">儲存區域</string>
|
||||
<string name="bottom_mirror_sharp">銳利</string>
|
||||
<string name="bottom_mirror_smooth">平滑</string>
|
||||
<string name="bottom_mirror_no_frame">目前無法複製遊戲畫面。</string>
|
||||
<string name="bottom_guides_wiki">Wiki 與修正</string>
|
||||
<string name="bottom_guides_maps">地圖</string>
|
||||
<string name="bottom_guides_saved">已儲存</string>
|
||||
<string name="bottom_guides_tag_all">全部</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">流程攻略</string>
|
||||
<string name="bottom_guides_tag_secrets">秘密</string>
|
||||
<string name="bottom_guides_pinned">已將地圖釘選到此遊戲的地圖。</string>
|
||||
<string name="bottom_guides_pin_failed">無法儲存該圖片。</string>
|
||||
<string name="bottom_guides_saved_note">已儲存頁面供離線閱讀。</string>
|
||||
<string name="bottom_guides_search">網路搜尋</string>
|
||||
<string name="bottom_guides_markers">標記:%1$d</string>
|
||||
<string name="bottom_guides_find_maps">尋找地圖</string>
|
||||
<string name="bottom_guides_saved_hint">在閱讀器中按儲存,即可離線閱讀頁面。</string>
|
||||
<string name="bottom_guides_pin">釘選為地圖</string>
|
||||
<string name="bottom_guides_pin_hint">長按圖片即可釘選為地圖。</string>
|
||||
<string name="bottom_guides_marker_hint">雙指縮放。長按新增標記,點按標記可刪除。</string>
|
||||
<string name="bottom_guides_link_wiki">遊戲 Wiki</string>
|
||||
<string name="bottom_guides_link_pcgw">PCGamingWiki 修正</string>
|
||||
<string name="bottom_guides_search_youtube">YouTube 攻略</string>
|
||||
<string name="bottom_mirror_hide_off">顯示</string>
|
||||
<string name="bottom_mirror_hide_black">隱藏</string>
|
||||
<string name="bottom_mirror_hide_dim">變暗</string>
|
||||
<string name="bottom_guides_steam">Steam 指南</string>
|
||||
<string name="bottom_guides_category">分類</string>
|
||||
<string name="bottom_guides_maps_empty">尚未釘選地圖</string>
|
||||
<string name="bottom_guides_map_name">地圖 %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">尚未儲存頁面</string>
|
||||
<string name="bottom_mirror_options">鏡像選項</string>
|
||||
<string name="bottom_mirror_region">區域</string>
|
||||
<string name="bottom_mirror_top">上螢幕</string>
|
||||
<string name="bottom_mirror_scaling">縮放</string>
|
||||
<string name="bottom_qam_title">快速存取</string>
|
||||
<string name="bottom_qam_layout">版面配置:%1$s</string>
|
||||
<string name="bottom_qam_layout_full">全寬</string>
|
||||
<string name="bottom_qam_layout_left">左側</string>
|
||||
<string name="bottom_qam_layout_center">置中</string>
|
||||
<string name="bottom_qam_layout_right">右側</string>
|
||||
<string name="bottom_qam_unavailable">Steam 快速存取選單暫時無法使用。</string>
|
||||
<string name="bottom_page_telemetry">遊戲內數據</string>
|
||||
<string name="bottom_hud_group">下螢幕 HUD</string>
|
||||
<string name="bottom_strip_tabs">在每個分頁顯示資訊列</string>
|
||||
|
||||
@@ -2319,6 +2319,14 @@
|
||||
<string name="stats_hud_red_mark">The red mark is where the HUD shows the temperature in red.</string>
|
||||
<string name="stats_hud_whole_device">whole device</string>
|
||||
<string name="stats_hud_battery_temp">battery</string>
|
||||
<string name="bottom_art_title">Game art</string>
|
||||
<string name="bottom_art_playing">Playing</string>
|
||||
<string name="bottom_idle_selected">Selected in Steam</string>
|
||||
<string name="bottom_idle_recent">Last played</string>
|
||||
<string name="bottom_idle_never">Not played yet</string>
|
||||
<string name="bottom_idle_minutes">%1$d min played</string>
|
||||
<string name="bottom_idle_hours">%1$d h played</string>
|
||||
<string name="bottom_idle_details" translatable="false">%1$s · %2$s</string>
|
||||
<string name="bottom_telemetry_send_title">Send dashboard data</string>
|
||||
<string name="bottom_telemetry_send_auto">Automatic</string>
|
||||
<string name="bottom_telemetry_send_auto_hint">Turns it on for every game listed here, including games found later. Games you switch off stay off.</string>
|
||||
@@ -2341,6 +2349,70 @@
|
||||
<string name="bottom_chat_mic_off">Mic off</string>
|
||||
<string name="bottom_chat_mic_unavailable">Mic is off for this game. To talk, turn on Microphone in DroidDeck\'s Steam settings (Audio) and start the game again.</string>
|
||||
<string name="bottom_chat_volume">Volume %1$d%%</string>
|
||||
<string name="bottom_bar_hide">Hide bar</string>
|
||||
<string name="bottom_bar_show">Show bar</string>
|
||||
<string name="bottom_brightness">Bottom screen brightness</string>
|
||||
<string name="bottom_screen_off">Turn off the bottom screen</string>
|
||||
<string name="bottom_page_guides">Guides</string>
|
||||
<string name="bottom_guides_no_game">Start a game to see its Steam guides here.</string>
|
||||
<string name="bottom_guides_continue">Continue reading</string>
|
||||
<string name="bottom_guides_empty">There are no Steam guides for this game yet.</string>
|
||||
<string name="bottom_guides_failed">Could not load Steam guides. Check back once you are online.</string>
|
||||
<string name="bottom_page_mirror">Mirror</string>
|
||||
<string name="bottom_mirror_pick">Drag over the part of the game to show here, such as the minimap.</string>
|
||||
<string name="bottom_mirror_save">Save region</string>
|
||||
<string name="bottom_mirror_sharp">Sharp</string>
|
||||
<string name="bottom_mirror_smooth">Smooth</string>
|
||||
<string name="bottom_mirror_no_frame">The game picture cannot be copied right now.</string>
|
||||
<string name="bottom_guides_wiki">Wiki & fixes</string>
|
||||
<string name="bottom_guides_maps">Maps</string>
|
||||
<string name="bottom_guides_saved">Saved</string>
|
||||
<string name="bottom_guides_tag_all">All</string>
|
||||
<string name="bottom_guides_tag_walkthroughs">Walkthroughs</string>
|
||||
<string name="bottom_guides_tag_secrets">Secrets</string>
|
||||
<string name="bottom_guides_pinned">Map pinned to this game\'s maps.</string>
|
||||
<string name="bottom_guides_pin_failed">That image could not be saved.</string>
|
||||
<string name="bottom_guides_saved_note">Page saved for offline reading.</string>
|
||||
<string name="bottom_guides_search">Search the web</string>
|
||||
<string name="bottom_guides_markers">Markers: %1$d</string>
|
||||
<string name="bottom_guides_find_maps">Find maps</string>
|
||||
<string name="bottom_guides_saved_hint">Use Save in the reader to keep a page for offline reading.</string>
|
||||
<string name="bottom_guides_pin">Pin as map</string>
|
||||
<string name="bottom_guides_pin_hint">Long-press an image to pin it as a map.</string>
|
||||
<string name="bottom_guides_marker_hint">Pinch to zoom. Long-press to add a marker, tap one to remove it.</string>
|
||||
<string name="bottom_guides_link_wiki">Game wiki</string>
|
||||
<string name="bottom_guides_link_pcgw">PCGamingWiki fixes</string>
|
||||
<string name="bottom_guides_search_youtube">YouTube walkthroughs</string>
|
||||
<string name="bottom_mirror_hide_off">Shown</string>
|
||||
<string name="bottom_mirror_hide_black">Hidden</string>
|
||||
<string name="bottom_mirror_hide_dim">Dimmed</string>
|
||||
<string name="bottom_guides_protondb" translatable="false">ProtonDB</string>
|
||||
<string name="bottom_guides_link_strategywiki" translatable="false">StrategyWiki</string>
|
||||
<string name="bottom_guides_link_gamefaqs" translatable="false">GameFAQs</string>
|
||||
<string name="bottom_guides_link_ign" translatable="false">IGN</string>
|
||||
<string name="bottom_guides_link_hltb" translatable="false">HowLongToBeat</string>
|
||||
<string name="bottom_guides_search_mapgenie" translatable="false">Map Genie</string>
|
||||
<string name="bottom_guides_tier_platinum" translatable="false">Platinum</string>
|
||||
<string name="bottom_guides_tier_gold" translatable="false">Gold</string>
|
||||
<string name="bottom_guides_tier_silver" translatable="false">Silver</string>
|
||||
<string name="bottom_guides_tier_bronze" translatable="false">Bronze</string>
|
||||
<string name="bottom_guides_tier_borked" translatable="false">Borked</string>
|
||||
<string name="bottom_guides_steam">Steam guides</string>
|
||||
<string name="bottom_guides_category">Category</string>
|
||||
<string name="bottom_guides_maps_empty">No pinned maps yet</string>
|
||||
<string name="bottom_guides_map_name">Map %1$d</string>
|
||||
<string name="bottom_guides_saved_empty">No saved pages yet</string>
|
||||
<string name="bottom_mirror_options">Mirror options</string>
|
||||
<string name="bottom_mirror_region">Region</string>
|
||||
<string name="bottom_mirror_top">Top screen</string>
|
||||
<string name="bottom_mirror_scaling">Scaling</string>
|
||||
<string name="bottom_qam_title">Quick Access</string>
|
||||
<string name="bottom_qam_layout">Layout: %1$s</string>
|
||||
<string name="bottom_qam_layout_full">Full width</string>
|
||||
<string name="bottom_qam_layout_left">Left</string>
|
||||
<string name="bottom_qam_layout_center">Center</string>
|
||||
<string name="bottom_qam_layout_right">Right</string>
|
||||
<string name="bottom_qam_unavailable">Steam\'s Quick Access menu is not available yet.</string>
|
||||
<string name="bottom_page_telemetry">In-game stats</string>
|
||||
<string name="bottom_hud_group">Bottom screen HUD</string>
|
||||
<string name="bottom_strip_tabs">Strip on every tab</string>
|
||||
|
||||
@@ -99,6 +99,18 @@ class SecondScreenModeTest {
|
||||
assertEquals(SecondScreenMode.MENU, SecondScreenMode.opening("dashboard", deckPad = false))
|
||||
}
|
||||
|
||||
@Test fun steamQuickAccessOpensAgainOnlyInASteamSession() {
|
||||
assertEquals(SecondScreenMode.STEAM_QAM, SecondScreenMode.opening("steam-qam", deckPad = true, dashboard = true, steam = true))
|
||||
assertEquals(SecondScreenMode.MENU, SecondScreenMode.opening("steam-qam", deckPad = true, dashboard = true))
|
||||
assertEquals(SecondScreenMode.MENU, SecondScreenMode.opening("steam-qam", deckPad = true, steam = true))
|
||||
}
|
||||
|
||||
@Test fun gameArtOpensAgainOnlyInASteamSession() {
|
||||
assertEquals(SecondScreenMode.ART, SecondScreenMode.opening("art", deckPad = true, dashboard = true, steam = true))
|
||||
assertEquals(SecondScreenMode.MENU, SecondScreenMode.opening("art", deckPad = true, dashboard = true))
|
||||
assertTrue(SecondScreenMode.ART.sessionPanel)
|
||||
}
|
||||
|
||||
@Test fun theDesktopOpensAgainOnlyWhileItCanRun() {
|
||||
assertEquals(SecondScreenMode.DESKTOP, SecondScreenMode.opening("desktop", deckPad = true, dashboard = true, bottomDesktop = true))
|
||||
assertEquals(SecondScreenMode.MENU, SecondScreenMode.opening("desktop", deckPad = true, dashboard = true))
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [33])
|
||||
class GameLinksTest {
|
||||
private fun row(vararg pairs: Pair<String, String>) =
|
||||
pairs.joinToString(",", "{", "}") { (k, v) -> "\"$k\":{\"type\":\"literal\",\"value\":\"$v\"}" }
|
||||
|
||||
@Test
|
||||
fun mapsWikidataIdsToSiteUrls() {
|
||||
val json = """{"results":{"bindings":[
|
||||
${row("fandom" to "it.eldenring", "pcgw" to "Elden_Ring", "gamefaqs" to "265984", "ign" to "elden-ring", "hltb" to "68151", "sw" to "Elden Ring")},
|
||||
${row("fandom" to "eldenring", "pcgw" to "Elden_Ring", "gamefaqs" to "323053")}
|
||||
]}}"""
|
||||
val links = GameLinks.parse(json).associate { it.kind to it.url }
|
||||
assertEquals("https://eldenring.fandom.com/", links[GameLinks.Kind.WIKI])
|
||||
assertEquals("https://strategywiki.org/wiki/Elden_Ring", links[GameLinks.Kind.STRATEGYWIKI])
|
||||
assertEquals("https://www.pcgamingwiki.com/wiki/Elden_Ring", links[GameLinks.Kind.PCGAMINGWIKI])
|
||||
assertEquals("https://gamefaqs.gamespot.com/-/265984-", links[GameLinks.Kind.GAMEFAQS])
|
||||
assertEquals("https://www.ign.com/games/elden-ring", links[GameLinks.Kind.IGN])
|
||||
assertEquals("https://howlongtobeat.com/game/68151", links[GameLinks.Kind.HOWLONGTOBEAT])
|
||||
}
|
||||
|
||||
@Test
|
||||
fun aLanguageOnlyFandomWikiKeepsItsLanguage() {
|
||||
val links = GameLinks.parse("""{"results":{"bindings":[${row("fandom" to "de.hollowknight")}]}}""")
|
||||
assertEquals("https://hollowknight.fandom.com/de/", links.single().url)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun noMatchIsNoLinks() {
|
||||
assertTrue(GameLinks.parse("""{"results":{"bindings":[]}}""").isEmpty())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun protonDbTiers() {
|
||||
assertEquals("gold", GameLinks.parseTier("""{"bestReportedTier":"platinum","tier":"gold","total":2109}"""))
|
||||
assertNull(GameLinks.parseTier("""{"tier":"pending"}"""))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun searchesStayOnTheSitesAndSkipGameFaqsWhenItHasAPage() {
|
||||
val youtube = GameLinks.searches("Arcade Paradise", emptyList()).first { it.id == "youtube" }.url
|
||||
assertEquals("https://m.youtube.com/results?search_query=Arcade+Paradise+walkthrough", youtube)
|
||||
assertTrue(GameLinks.searches("Bully", emptyList()).none { "duckduckgo" in it.url })
|
||||
val faqs = GameLinks.Link(GameLinks.Kind.GAMEFAQS, "https://gamefaqs.gamespot.com/-/1-")
|
||||
assertEquals(listOf("youtube"), GameLinks.searches("Bully", listOf(faqs)).map { it.id })
|
||||
}
|
||||
|
||||
@Test
|
||||
fun slugsTryTheFullNameThenTheShortOne() {
|
||||
assertEquals(listOf("bully-scholarship-edition", "bully"), GameLinks.slugs("Bully: Scholarship Edition"))
|
||||
assertEquals(listOf("sonic-mania"), GameLinks.slugs("Sonic Mania"))
|
||||
assertEquals(listOf("tom-clancys-the-division-2"), GameLinks.slugs("Tom Clancy’s The Division 2"))
|
||||
assertEquals(listOf("hotline-miami"), GameLinks.slugs("Hotline Miami™"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun directPagesComeFromTheSitesOwnRoutes() {
|
||||
val live = setOf("https://mapgenie.io/bully", "https://www.ign.com/wikis/bully", "https://bully.fandom.com/api.php?action=query&meta=siteinfo&format=json")
|
||||
val found = GameLinks.direct("Bully: Scholarship Edition",
|
||||
listOf(GameLinks.Link(GameLinks.Kind.IGN, "https://www.ign.com/games/bully-scholarship-edition")),
|
||||
exists = { it in live }, strategyWiki = { if (it == "Bully") "https://strategywiki.org/wiki/Bully" else null })
|
||||
assertEquals(mapOf(
|
||||
GameLinks.Kind.MAPGENIE to "https://mapgenie.io/bully",
|
||||
GameLinks.Kind.IGN to "https://www.ign.com/wikis/bully",
|
||||
GameLinks.Kind.WIKI to "https://bully.fandom.com/",
|
||||
GameLinks.Kind.STRATEGYWIKI to "https://strategywiki.org/wiki/Bully",
|
||||
), found.associate { it.kind to it.url })
|
||||
assertTrue(found.none { "duckduckgo" in it.url })
|
||||
}
|
||||
|
||||
@Test
|
||||
fun aMissingSiteLeavesWikidataLinksAlone() {
|
||||
val ign = GameLinks.Link(GameLinks.Kind.IGN, "https://www.ign.com/games/x")
|
||||
assertEquals(listOf(ign), GameLinks.direct("X", listOf(ign), exists = { false }, strategyWiki = { null }))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun openSearchPicksTheExactTitle() {
|
||||
val json = """["Bully",["Bully's Sporting Darts","Bully"],["",""],["https://strategywiki.org/wiki/Bully%27s_Sporting_Darts","https://strategywiki.org/wiki/Bully"]]"""
|
||||
assertEquals("https://strategywiki.org/wiki/Bully", GameLinks.parseOpenSearch(json, "Bully"))
|
||||
assertNull(GameLinks.parseOpenSearch(json, "Canis Canem Edit"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun cachedDiscoveriesYieldToNewWikidataLinks() {
|
||||
val fandom = GameLinks.Link(GameLinks.Kind.WIKI, "https://bully.fandom.com/")
|
||||
val map = GameLinks.Link(GameLinks.Kind.MAPGENIE, "https://mapgenie.io/bully")
|
||||
val wiki = GameLinks.Link(GameLinks.Kind.WIKI, "https://bully.wiki.gg/")
|
||||
assertEquals(listOf(wiki, map), GameLinks.merge(listOf(wiki), listOf(fandom, map)))
|
||||
assertEquals(listOf(fandom, map), GameLinks.merge(emptyList(), listOf(fandom, map)))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun cachedLinksRoundTrip() {
|
||||
val links = listOf(GameLinks.Link(GameLinks.Kind.MAPGENIE, "https://mapgenie.io/bully"))
|
||||
assertEquals(links, GameLinks.readLinks(GameLinks.writeLinks(links)))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun steamGuideTagFilter() {
|
||||
assertEquals("https://steamcommunity.com/app/620/guides/?browsefilter=toprated&browsesort=toprated&requiredtags%5B%5D=Maps+or+Levels",
|
||||
SteamGuides.listUrl(620, "Maps or Levels"))
|
||||
assertEquals("https://steamcommunity.com/app/620/guides/?browsefilter=toprated&browsesort=toprated", SteamGuides.listUrl(620, null))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun guideLanguageFollowsTheDevice() {
|
||||
assertEquals("english", SteamGuides.language(java.util.Locale.US))
|
||||
assertEquals("german", SteamGuides.language(java.util.Locale.GERMANY))
|
||||
assertEquals("schinese", SteamGuides.language(java.util.Locale.SIMPLIFIED_CHINESE))
|
||||
assertEquals("tchinese", SteamGuides.language(java.util.Locale.TRADITIONAL_CHINESE))
|
||||
assertEquals("brazilian", SteamGuides.language(java.util.Locale("pt", "BR")))
|
||||
assertEquals("latam", SteamGuides.language(java.util.Locale("es", "MX")))
|
||||
assertEquals("spanish", SteamGuides.language(java.util.Locale("es", "ES")))
|
||||
assertEquals("english", SteamGuides.language(java.util.Locale("eo")))
|
||||
assertEquals("https://steamcommunity.com/app/620/guides/?browsefilter=toprated&browsesort=toprated&requiredtags%5B%5D=Secrets&requiredtags%5B%5D=english",
|
||||
SteamGuides.listUrl(620, "Secrets", "english"))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertThrows
|
||||
import org.junit.Test
|
||||
import java.io.DataInputStream
|
||||
import java.io.IOException
|
||||
import java.net.ServerSocket
|
||||
import kotlin.concurrent.thread
|
||||
|
||||
class LoopbackWebSocketTest {
|
||||
@Test
|
||||
fun talksToALoopbackWebSocketServer() {
|
||||
val server = ServerSocket(0).apply { soTimeout = 5_000 }
|
||||
var received: String? = null
|
||||
val worker = thread {
|
||||
server.accept().use { client ->
|
||||
client.soTimeout = 5_000
|
||||
val input = DataInputStream(client.getInputStream())
|
||||
val out = client.getOutputStream()
|
||||
out.write(upgrade(handshakeKey(input)).toByteArray())
|
||||
for (text in listOf("""{"id":1}""", "x".repeat(300))) {
|
||||
val bytes = text.toByteArray()
|
||||
out.write(0x81)
|
||||
if (bytes.size < 126) out.write(bytes.size) else { out.write(126); out.write(bytes.size shr 8); out.write(bytes.size and 0xFF) }
|
||||
out.write(bytes)
|
||||
}
|
||||
out.flush()
|
||||
val b0 = input.read()
|
||||
val len = input.read() and 0x7F
|
||||
val mask = ByteArray(4).also(input::readFully)
|
||||
val payload = ByteArray(len).also(input::readFully)
|
||||
for (i in payload.indices) payload[i] = (payload[i].toInt() xor mask[i % 4].toInt()).toByte()
|
||||
if (b0 == 0x81) received = String(payload)
|
||||
}
|
||||
}
|
||||
try {
|
||||
LoopbackWebSocket(server.localPort, readTimeoutMs = 5_000).use { ws ->
|
||||
assertEquals("""{"id":1}""", ws.receive())
|
||||
assertEquals(300, ws.receive()!!.length)
|
||||
ws.send("""{"id":2}""")
|
||||
}
|
||||
worker.join(5_000)
|
||||
} finally {
|
||||
server.close()
|
||||
}
|
||||
assertEquals("""{"id":2}""", received)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun rejectsAnUpgradeWithoutTheRightAcceptHeader() {
|
||||
for (reply in listOf(
|
||||
"HTTP/1.1 101 Switching Protocols\r\n\r\n",
|
||||
"HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: wrong\r\n\r\n",
|
||||
"HTTP/1.1 1010 Nope\r\n\r\n",
|
||||
)) {
|
||||
val server = ServerSocket(0)
|
||||
val worker = thread {
|
||||
server.accept().use { client ->
|
||||
handshakeKey(DataInputStream(client.getInputStream()))
|
||||
client.getOutputStream().apply { write(reply.toByteArray()); flush() }
|
||||
Thread.sleep(200)
|
||||
}
|
||||
}
|
||||
assertThrows(IOException::class.java) { LoopbackWebSocket(server.localPort).close() }
|
||||
worker.join(5_000)
|
||||
server.close()
|
||||
}
|
||||
}
|
||||
|
||||
private fun upgrade(key: String) = "HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\n" +
|
||||
"Sec-WebSocket-Accept: ${LoopbackWebSocket.accept(key)}\r\n\r\n"
|
||||
|
||||
private fun handshakeKey(input: DataInputStream): String =
|
||||
generateSequence { readLine(input) }.takeWhile { it.isNotEmpty() }.toList()
|
||||
.first { it.startsWith("Sec-WebSocket-Key:") }.substringAfter(':').trim()
|
||||
|
||||
private fun readLine(input: DataInputStream): String? {
|
||||
val sb = StringBuilder()
|
||||
while (true) {
|
||||
val c = input.read()
|
||||
if (c < 0) return null
|
||||
if (c == '\n'.code) return sb.toString().trimEnd('\r')
|
||||
sb.append(c.toChar())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [33])
|
||||
class SteamGuidesTest {
|
||||
private val page = """
|
||||
<div class="workshopBrowsePagingControls"></div>
|
||||
<div data-panel="{}" role="button" id="sharedfile_1848481525_1" class="workshopItemCollectionContainer">
|
||||
<a class="workshopItemCollection ugc" href="https://steamcommunity.com/sharedfiles/filedetails/?id=1848481525" data-appid="413150">
|
||||
<div class="workshopItemPreviewHolder ">
|
||||
<img class="workshopItemPreviewImage" src="https://images.steamusercontent.com/ugc/1/A/?imw=200&imh=200">
|
||||
</div>
|
||||
<div class="workshopItemDetails">
|
||||
<img class="fileRating" src="https://community.akamai.steamstatic.com/public/images/sharedfiles/5-star.png?v=2" />
|
||||
<div class="workshopItemTitle">
|
||||
Stardew & You </div>
|
||||
<div class="workshopItemAuthorLine">by <span class="workshopItemAuthorName">Farmer</span></div>
|
||||
<div class="workshopItemShortDesc">Everything about
|
||||
the valley...</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div data-panel="{}" role="button" id="sharedfile_2_1" class="workshopItemCollectionContainer">
|
||||
<a class="workshopItemCollection ugc" href="https://steamcommunity.com/sharedfiles/filedetails/?id=2">
|
||||
<div class="workshopItemTitle"></div>
|
||||
</a>
|
||||
</div>
|
||||
""".trimIndent()
|
||||
|
||||
@Test
|
||||
fun parsesGuideCards() {
|
||||
val guides = SteamGuides.parse(page)
|
||||
assertEquals(1, guides.size)
|
||||
val g = guides.single()
|
||||
assertEquals("1848481525", g.id)
|
||||
assertEquals("Stardew & You", g.title)
|
||||
assertEquals("Farmer", g.author)
|
||||
assertEquals("Everything about the valley...", g.summary)
|
||||
assertEquals("https://images.steamusercontent.com/ugc/1/A/?imw=200&imh=200", g.preview)
|
||||
assertEquals(5, g.stars)
|
||||
assertEquals("https://steamcommunity.com/sharedfiles/filedetails/?id=1848481525", g.url)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun remembersOnlyGuidePagesPerGame() {
|
||||
val context = ApplicationProvider.getApplicationContext<android.content.Context>()
|
||||
assertNull(SteamGuides.place(context, "413150"))
|
||||
SteamGuides.savePlace(context, "413150", "https://example.com/", 0.5f)
|
||||
assertNull(SteamGuides.place(context, "413150"))
|
||||
SteamGuides.savePlace(context, "413150", "https://steamcommunity.com/sharedfiles/filedetails/?id=1#Section", 0.4f)
|
||||
assertEquals(0.4f, SteamGuides.place(context, "413150")!!.scroll, 0.001f)
|
||||
assertNull(SteamGuides.place(context, "620"))
|
||||
SteamGuides.clear(context, "413150")
|
||||
assertNull(SteamGuides.place(context, "413150"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun guideUrls() {
|
||||
assertTrue(SteamGuides.isGuide("https://steamcommunity.com/sharedfiles/filedetails/?id=123"))
|
||||
assertFalse(SteamGuides.isGuide("https://steamcommunity.com.evil/sharedfiles/filedetails/?id=123"))
|
||||
assertFalse(SteamGuides.isGuide("http://steamcommunity.com/sharedfiles/filedetails/?id=123"))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Test
|
||||
|
||||
class SteamLocalConfigTest {
|
||||
private val config = """
|
||||
"UserLocalConfigStore"
|
||||
{
|
||||
"Software"
|
||||
{
|
||||
"Valve"
|
||||
{
|
||||
"Steam"
|
||||
{
|
||||
"apps"
|
||||
{
|
||||
"620"
|
||||
{
|
||||
"cloud"
|
||||
{
|
||||
"last_sync_state" "synchronized"
|
||||
}
|
||||
"LastPlayed" "1764000000"
|
||||
"Playtime" "754"
|
||||
}
|
||||
"1145360"
|
||||
{
|
||||
"LastPlayed" "1764100000"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"1145360" { "Playtime" "9999" }
|
||||
}
|
||||
""".trimIndent()
|
||||
|
||||
@Test
|
||||
fun readsPlaytimeAndLastPlayedPastNestedBlocks() {
|
||||
val stats = SteamLocalConfig.appStats(config, 620)!!
|
||||
assertEquals(754L, stats.playtimeMinutes)
|
||||
assertEquals(1764000000L, stats.lastPlayed)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun onlyReadsTheAppsBlock() {
|
||||
val stats = SteamLocalConfig.appStats(config, 1145360)!!
|
||||
assertEquals(0L, stats.playtimeMinutes)
|
||||
assertEquals(1764100000L, stats.lastPlayed)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun unknownAppIsNull() {
|
||||
assertNull(SteamLocalConfig.appStats(config, 413150))
|
||||
assertNull(SteamLocalConfig.appStats("not vdf", 620))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import com.droiddeck.launcher.ui.QamFit
|
||||
import com.droiddeck.launcher.ui.QamLayout
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
class SteamQamTest {
|
||||
@Test fun findsTheQuickAccessPageAndKeepsOnlyItsPath() {
|
||||
val json = """[
|
||||
{"title":"SP BPM_uid0","webSocketDebuggerUrl":"ws://127.0.0.1:8080/devtools/page/AAA"},
|
||||
{"title":"QuickAccess_uid2","webSocketDebuggerUrl":"ws://127.0.0.1:8080/devtools/page/0F3A-b9"}
|
||||
]"""
|
||||
assertEquals(SteamQam.Target(4321, "/devtools/page/0F3A-b9"), SteamQam.parseTarget(4321, json))
|
||||
}
|
||||
|
||||
@Test fun readsTheTargetListByContentLengthWithoutWaitingForClose() {
|
||||
val stream = object : java.io.InputStream() {
|
||||
val bytes = "HTTP/1.1 200 OK\r\nContent-Type: application/json\r\nContent-Length: 4\r\n\r\n[{}]".toByteArray()
|
||||
var at = 0
|
||||
override fun read(): Int = if (at < bytes.size) bytes[at++].toInt() and 0xff else error("read past the response")
|
||||
}
|
||||
assertEquals("[{}]", SteamQam.httpBody(stream))
|
||||
}
|
||||
|
||||
@Test fun ignoresMissingOrForeignDebuggerUrls() {
|
||||
assertNull(SteamQam.parseTarget(1, """[{"title":"SP BPM_uid0","webSocketDebuggerUrl":"ws://127.0.0.1:1/devtools/page/A"}]"""))
|
||||
assertNull(SteamQam.parseTarget(1, """[{"title":"QuickAccess_uid2"}]"""))
|
||||
assertNull(SteamQam.parseTarget(1, """[{"title":"QuickAccess_uid2","webSocketDebuggerUrl":"ws://x/devtools/page/A?b=1"}]"""))
|
||||
}
|
||||
|
||||
@Test fun holdingIsALeaseAndReleasingEndsIt() {
|
||||
assertTrue(SteamQam.script(true, owner = 7).contains(SteamQam.leaseScript(true, 7)))
|
||||
assertTrue(SteamQam.script(false, owner = 7).contains(SteamQam.leaseScript(false, 7)))
|
||||
assertTrue(SteamQam.newOwner() < SteamQam.newOwner())
|
||||
}
|
||||
|
||||
/** Runs the lease steps in Node, in order, and returns which owner holds a live lease afterwards (0 for none). */
|
||||
private fun leaseAfter(vararg steps: Pair<Boolean, Long>): Long? = runLease(steps.toList(), "g.__ddQamUntil > Date.now() ? g.__ddQamOwner : 0")?.toLongOrNull()
|
||||
|
||||
/** Runs lease steps (on, owner, aspect) in Node and returns [result], a JS expression over `g`. */
|
||||
private fun runLease(steps: List<Any>, result: String): String? {
|
||||
val node = runCatching { ProcessBuilder("node", "--version").start().waitFor() == 0 }.getOrDefault(false)
|
||||
org.junit.Assume.assumeTrue("node is not installed", node)
|
||||
val program = "const g = {};\n" + steps.joinToString("\n") { step ->
|
||||
when (step) {
|
||||
is Triple<*, *, *> -> SteamQam.leaseScript(step.first as Boolean, step.second as Long, step.third as Float)
|
||||
is Pair<*, *> -> if (step.second == EXPIRE) "g.__ddQamUntil = Date.now() - 1;" else SteamQam.leaseScript(step.first as Boolean, step.second as Long)
|
||||
else -> error("unknown step $step")
|
||||
}
|
||||
} +
|
||||
"\nprocess.stdout.write(String($result));"
|
||||
val p = ProcessBuilder("node", "-e", program).redirectErrorStream(true).start()
|
||||
val out = p.inputStream.bufferedReader().readText().trim()
|
||||
assertEquals(out, 0, p.waitFor())
|
||||
return out
|
||||
}
|
||||
|
||||
@Test fun aLateRequestFromAnOldPanelLeavesItsReplacementsLease() {
|
||||
// The replacement takes the lease, then the old panel's in-flight hold lands, then its release.
|
||||
assertEquals(2L, leaseAfter(true to 2L, true to 1L, false to 1L))
|
||||
// The old panel's release alone does not end the replacement's lease either.
|
||||
assertEquals(2L, leaseAfter(true to 1L, true to 2L, false to 1L))
|
||||
// A panel releases its own lease.
|
||||
assertEquals(0L, leaseAfter(true to 2L, false to 2L))
|
||||
// With no live lease, any panel can take it: after a release, or once a newer panel's lease has run out.
|
||||
assertEquals(1L, leaseAfter(true to 2L, false to 2L, true to 1L))
|
||||
assertEquals(1L, leaseAfter(true to 2L, false to EXPIRE, true to 1L))
|
||||
// A rejected hold from an older panel leaves the newer panel's layout alone.
|
||||
assertEquals("1.5", runLease(listOf(Triple(true, 2L, 1.5f), Triple(true, 1L, 0.75f)), "g.__ddQamAspect"))
|
||||
assertEquals("0.75", runLease(listOf(Triple(true, 2L, 1.5f), Triple(false, 2L, 0f), Triple(true, 1L, 0.75f)), "g.__ddQamAspect"))
|
||||
}
|
||||
|
||||
@Test fun readsWhetherTheMenuIsShownOnTheTopScreen() {
|
||||
assertEquals(SteamQam.Hold(2, false), SteamQam.parseHold("[2,0]"))
|
||||
assertEquals(SteamQam.Hold(2, true), SteamQam.parseHold("[2,1]"))
|
||||
assertNull(SteamQam.parseHold("2"))
|
||||
}
|
||||
|
||||
@Test fun theQuickAccessButtonTogglesTheTopScreenAndTheWideLayoutFollows() {
|
||||
val script = SteamQam.script(true)
|
||||
assertTrue(script.contains("const ours = () => held() && m.m_eOpenSideMenu === QAM && !g.__ddQamTop;"))
|
||||
assertTrue(script.contains("if (press !== g.__ddQamPress) {"))
|
||||
assertTrue(QamLayout.contentScript(true).contains("max-width: none !important"))
|
||||
assertFalse(QamLayout.contentScript(false).contains("max-width: none"))
|
||||
}
|
||||
|
||||
@Test fun theMenuIsLaidOutAtThePanelsShapeOnlyWhileHeld() {
|
||||
assertTrue(SteamQam.script(true, 1.5f, owner = 3).contains("g.__ddQamOwner = 3; g.__ddQamUntil = Date.now() + ${SteamQam.LEASE_MS}; g.__ddQamAspect = 1.5; }"))
|
||||
assertFalse(SteamQam.script(true).contains("g.__ddQamAspect ="))
|
||||
assertFalse(SteamQam.script(false, 1.5f).contains("g.__ddQamAspect ="))
|
||||
}
|
||||
|
||||
@Test fun aSteamDialogOverTheGameGetsTheInput() {
|
||||
val script = SteamQam.script(true)
|
||||
assertTrue(script.contains("t.m_ID?.startsWith(\"ModalDialogOverlay\") && t.m_Root?.m_element?.isConnected"))
|
||||
assertTrue(script.contains("if (dialog && !g.__ddQamTop) {"))
|
||||
assertTrue(script.indexOf("if (dialog && !g.__ddQamTop)") < script.indexOf("g.__ddQamDecky = decky;"))
|
||||
}
|
||||
|
||||
@Test fun theRelayAnswersWithItsPortAndSecret() {
|
||||
assertEquals(41234 to "0123456789abcdef0123456789abcdef", SteamQam.parseRelay("41234 0123456789abcdef0123456789abcdef\n"))
|
||||
assertNull(SteamQam.parseRelay("41234"))
|
||||
assertNull(SteamQam.parseRelay("41234 not-a-secret"))
|
||||
assertNull(SteamQam.parseRelay(null))
|
||||
}
|
||||
|
||||
@Test fun whileHeldTheMenuStaysOffTheTopScreenAndOutOfTheGamesWay() {
|
||||
val script = SteamQam.script(true)
|
||||
assertTrue(script.contains("return without >= 2 ? v : 1;"))
|
||||
assertTrue(script.contains("if (w > 0 && ours()) { x = popup.m_popup.innerWidth + 64; w = width(h) || w; }"))
|
||||
assertTrue(script.contains("nav.m_LastActiveNavTree?.m_ID?.startsWith(\"QuickAccess\")"))
|
||||
assertTrue(script.contains("if (m.m_eOpenSideMenu === QAM) m.CloseSideMenus();"))
|
||||
}
|
||||
|
||||
@Test fun theMenuFillsTheHeightAndCentresAndTouchesMapBack() {
|
||||
val (scale, left) = QamLayout.fit(1280f, 832f, 400f, 640f)
|
||||
assertEquals(1.3f, scale, 0.001f)
|
||||
assertEquals((1280f - 520f) / 2f, left, 0.001f)
|
||||
val (x, y) = QamLayout.toCss(left + 130f, 260f, scale, left)
|
||||
assertEquals(100f, x, 0.001f)
|
||||
assertEquals(200f, y, 0.001f)
|
||||
}
|
||||
|
||||
@Test fun aNarrowMenuCanSitLeftOrRight() {
|
||||
assertEquals(0f, QamLayout.fit(1280f, 832f, 400f, 640f, -1).second, 0.001f)
|
||||
assertEquals(1280f - 520f, QamLayout.fit(1280f, 832f, 400f, 640f, 1).second, 0.001f)
|
||||
assertEquals(0f, QamLayout.fit(1280f, 832f, 1280f, 640f, 1).second, 0.001f)
|
||||
}
|
||||
|
||||
@Test fun theLayoutButtonCyclesFullLeftCenterRight() {
|
||||
assertEquals(listOf(QamFit.LEFT, QamFit.CENTER, QamFit.RIGHT, QamFit.FULL), QamFit.entries.map { it.next })
|
||||
assertEquals(QamFit.FULL, QamFit.from(null))
|
||||
assertEquals(QamFit.RIGHT, QamFit.from("right"))
|
||||
assertEquals(QamFit.FULL, QamFit.from("sideways"))
|
||||
}
|
||||
|
||||
@Test fun aWideMenuFitsTheWidth() {
|
||||
val (scale, left) = QamLayout.fit(1280f, 832f, 1280f, 640f)
|
||||
assertEquals(1f, scale, 0.001f)
|
||||
assertEquals(0f, left, 0.001f)
|
||||
}
|
||||
|
||||
private companion object {
|
||||
/** A lease step that lets the current lease run out. */
|
||||
const val EXPIRE = -1L
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.droiddeck.launcher.stores
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [33])
|
||||
class SteamAchievementsTest {
|
||||
@Test
|
||||
fun parsesTheClientsAchievementList() {
|
||||
val json = """{"result":1,"data":{"rgAchievements":[
|
||||
{"strID":"ACH_WIN","strName":"Winner","strDescription":"Win once","bAchieved":true,"rtUnlocked":1764000000,
|
||||
"strImage":"https://cdn.example/apps/620/abc.jpg","bHidden":false},
|
||||
{"strID":"ACH_SECRET","strName":"Secret","strDescription":"","bAchieved":false,"rtUnlocked":1764000000,
|
||||
"strImage":"def.jpg","bHidden":true}]}}"""
|
||||
val list = (SteamAchievements.parse(620, json) as StoreAchievements.Result.Found).list
|
||||
assertEquals(2, list.size)
|
||||
assertEquals("Winner", list[0].name)
|
||||
assertTrue(list[0].unlocked)
|
||||
assertEquals(1764000000L, list[0].unlockedAt)
|
||||
assertEquals("https://cdn.example/apps/620/abc.jpg", list[0].icon)
|
||||
assertTrue(list[1].hidden)
|
||||
assertEquals(0L, list[1].unlockedAt)
|
||||
assertEquals("https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/apps/620/def.jpg", list[1].icon)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun gamesWithoutStatsHaveNoAchievementsAndGarbageIsUnreachable() {
|
||||
assertEquals(0, (SteamAchievements.parse(12200, """{"result":2,"message":"Failed to retrieve user stats"}""") as StoreAchievements.Result.Found).list.size)
|
||||
assertTrue(SteamAchievements.parse(620, "nope") is StoreAchievements.Result.Failed)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun noListIsNoAchievements() {
|
||||
assertEquals(0, (SteamAchievements.parse(620, """{"result":1,"data":{}}""") as StoreAchievements.Result.Found).list.size)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import android.content.Context
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
class BottomBrightnessTest {
|
||||
private val context = ApplicationProvider.getApplicationContext<Context>()
|
||||
|
||||
@Test fun followsTheSystemUntilTheUserPicksALevel() {
|
||||
assertNull(BottomBrightness.level(context))
|
||||
SessionPrefs.setBottomBrightness(context, 40)
|
||||
assertEquals(0.4f, BottomBrightness.level(context)!!, 0.001f)
|
||||
}
|
||||
|
||||
@Test fun theSliderNeverReachesZero() {
|
||||
assertEquals(BottomBrightness.MIN, BottomBrightness.clamp(0))
|
||||
assertEquals(BottomBrightness.MIN, BottomBrightness.clamp(-20))
|
||||
assertEquals(100, BottomBrightness.clamp(150))
|
||||
SessionPrefs.setBottomBrightness(context, 0)
|
||||
assertEquals(BottomBrightness.MIN / 100f, BottomBrightness.level(context)!!, 0.001f)
|
||||
}
|
||||
|
||||
@Test fun autoDimNeverBrightensADarkerChoice() {
|
||||
assertEquals(0.05f, BottomBrightness.dimmed(context, 0.05f), 0.001f)
|
||||
SessionPrefs.setBottomBrightness(context, 5)
|
||||
assertEquals(0.05f, BottomBrightness.dimmed(context, 0.2f), 0.001f)
|
||||
SessionPrefs.setBottomBrightness(context, 80)
|
||||
assertEquals(0.05f, BottomBrightness.dimmed(context, 0.05f), 0.001f)
|
||||
}
|
||||
|
||||
@Test fun autoDimFollowsADarkerManualSystemLevelWhenNothingIsSaved() {
|
||||
val resolver = context.contentResolver
|
||||
android.provider.Settings.System.putInt(resolver, android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE,
|
||||
android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL)
|
||||
android.provider.Settings.System.putInt(resolver, android.provider.Settings.System.SCREEN_BRIGHTNESS, 3)
|
||||
assertEquals(3 / 255f, BottomBrightness.dimmed(context, 0.05f), 0.001f)
|
||||
android.provider.Settings.System.putInt(resolver, android.provider.Settings.System.SCREEN_BRIGHTNESS, 200)
|
||||
assertEquals(0.05f, BottomBrightness.dimmed(context, 0.05f), 0.001f)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import org.junit.After
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
class BottomChromeTest {
|
||||
@After fun clear() {
|
||||
BottomChrome.reset()
|
||||
}
|
||||
|
||||
@Test fun aFullScreenPanelHidesTheBarAndThePullTabBringsItBack() {
|
||||
assertTrue(BottomChrome.barShown)
|
||||
BottomChrome.request(true)
|
||||
assertFalse(BottomChrome.barShown)
|
||||
BottomChrome.show(true)
|
||||
assertTrue(BottomChrome.barShown)
|
||||
BottomChrome.request(false)
|
||||
assertTrue(BottomChrome.barShown)
|
||||
}
|
||||
|
||||
@Test fun hidingByHandLastsUntilAPanelChangesItsRequest() {
|
||||
BottomChrome.show(false)
|
||||
assertFalse(BottomChrome.barShown)
|
||||
BottomChrome.request(true)
|
||||
BottomChrome.request(false)
|
||||
assertTrue(BottomChrome.barShown)
|
||||
}
|
||||
|
||||
@Test fun moreReleasesThanRequestsNeverHideTheBarForGood() {
|
||||
BottomChrome.request(false)
|
||||
BottomChrome.request(false)
|
||||
assertTrue(BottomChrome.barShown)
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,11 @@ class BottomDashboardTest {
|
||||
assertEquals("telemetry", pageForGameStart(listOf("telemetry", "downloads", "chat")))
|
||||
assertNull(pageForGameStart(listOf("downloads", "chat")))
|
||||
}
|
||||
|
||||
@Test fun aGameStartShowsThePageLastPickedForThatGame() {
|
||||
assertEquals("chat", pageForGameStart(listOf("telemetry", "downloads", "chat"), "chat"))
|
||||
assertEquals("telemetry", pageForGameStart(listOf("telemetry", "downloads"), "chat"))
|
||||
}
|
||||
}
|
||||
|
||||
class BottomDownloadsRateTest {
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.net.Uri
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [33])
|
||||
class BottomGuidesPageTest {
|
||||
@Test
|
||||
fun theReaderStaysOnTheSiteUnlessTheUserFollowsALink() {
|
||||
val start = "https://eldenring.fandom.com/"
|
||||
assertTrue(readerAllows(start, Uri.parse("https://eldenring.fandom.com/wiki/Margit"), false))
|
||||
assertTrue(readerAllows(start, Uri.parse("https://community.fandom.com/"), false))
|
||||
assertFalse(readerAllows(start, Uri.parse("https://ads.example.com/landing"), false))
|
||||
assertTrue(readerAllows(start, Uri.parse("https://mapgenie.io/elden-ring"), true))
|
||||
assertTrue(readerAllows(start, Uri.parse("https://steamcommunity.com/app/1"), false))
|
||||
assertFalse(readerAllows(start, Uri.parse("intent://scan/#Intent;end"), true))
|
||||
assertFalse(readerAllows(start, Uri.parse("javascript:alert(1)"), true))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun adHostsAreBlockedBySuffix() {
|
||||
assertTrue(ReaderAds.blocks("securepubads.g.doubleclick.net"))
|
||||
assertTrue(ReaderAds.blocks("c.amazon-adsystem.com"))
|
||||
assertFalse(ReaderAds.blocks("strategywiki.org"))
|
||||
assertFalse(ReaderAds.blocks("static.wikia.nocookie.net"))
|
||||
assertFalse(ReaderAds.blocks("net"))
|
||||
assertFalse(ReaderAds.blocks(null))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun bigMapsAreDecodedAtAManageableSize() {
|
||||
assertEquals(1, MapMarkers.sampleSize(4000, 3000, 4096))
|
||||
assertEquals(1, MapMarkers.sampleSize(4096, 2000, 4096))
|
||||
assertEquals(2, MapMarkers.sampleSize(6000, 6000, 4096))
|
||||
assertEquals(2, MapMarkers.sampleSize(8192, 8192, 4096))
|
||||
assertEquals(4, MapMarkers.sampleSize(9000, 6000, 4096))
|
||||
assertEquals(8, MapMarkers.sampleSize(20000, 12000, 4096))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun mirrorHideCyclesAndDefaultsToShown() {
|
||||
assertEquals(MirrorHide.OFF, MirrorHide.from(null))
|
||||
assertEquals(MirrorHide.DIM, MirrorHide.from("dim"))
|
||||
assertEquals(MirrorHide.BLACK, MirrorHide.OFF.next())
|
||||
assertEquals(MirrorHide.OFF, MirrorHide.DIM.next())
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [33])
|
||||
class BottomIdleHomeTest {
|
||||
private val games = listOf(
|
||||
Library.SteamGame(620, "Portal 2", null, "", lastPlayed = 100),
|
||||
Library.SteamGame(1145360, "Hades", null, "", lastPlayed = 300),
|
||||
Library.SteamGame(504230, "Celeste", null, ""),
|
||||
)
|
||||
|
||||
@Test
|
||||
fun prefersTheGameSelectedInSteam() {
|
||||
val (game, highlighted) = IdleHome.pick(games, 504230)!!
|
||||
assertEquals(504230, game.appId)
|
||||
assertEquals(true, highlighted)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun fallsBackToTheMostRecentGame() {
|
||||
val (game, highlighted) = IdleHome.pick(games, 999)!!
|
||||
assertEquals(1145360, game.appId)
|
||||
assertEquals(false, highlighted)
|
||||
assertEquals(1145360, IdleHome.pick(games, null)!!.first.appId)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun nothingPlayedAndNothingSelected() {
|
||||
assertNull(IdleHome.pick(listOf(Library.SteamGame(1, "A", null, "")), null))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun readsSteamsOverviewOfTheHighlightedGame() {
|
||||
val o = IdleHome.parseOverview("""{"name":"Sonic Mania","minutes":864,"last":1764000000}""")!!
|
||||
assertEquals("Sonic Mania", o.name)
|
||||
assertEquals(864L, o.minutes)
|
||||
assertEquals(1764000000L, o.lastPlayed)
|
||||
assertNull(IdleHome.parseOverview(null))
|
||||
assertNull(IdleHome.parseOverview("""{"name":""}"""))
|
||||
assertNull(IdleHome.parseOverview("nope"))
|
||||
assertEquals(true, IdleHome.overviewExpression(584400).contains("GetAppOverviewByAppID?.(584400)"))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [33])
|
||||
class BottomMirrorPageTest {
|
||||
@Test
|
||||
fun regionsRoundTripAndNormalize() {
|
||||
val r = MirrorRegion.normalize(0.9f, 0.3f, 0.75f, 0.05f)!!
|
||||
assertEquals(0.75f, r.left, 0.0001f)
|
||||
assertEquals(0.05f, r.top, 0.0001f)
|
||||
assertEquals(0.9f, r.right, 0.0001f)
|
||||
assertEquals(0.3f, r.bottom, 0.0001f)
|
||||
val back = MirrorRegion.parse(MirrorRegion.format(r))!!
|
||||
assertEquals(r.left, back.left, 0.0001f)
|
||||
assertEquals(r.bottom, back.bottom, 0.0001f)
|
||||
assertEquals(1f, MirrorRegion.normalize(-1f, -1f, 2f, 2f)!!.right, 0f)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun tinyOrBrokenRegionsAreRejected() {
|
||||
assertNull(MirrorRegion.normalize(0.5f, 0.5f, 0.505f, 0.9f))
|
||||
assertNull(MirrorRegion.parse("0.1,0.2,0.3"))
|
||||
assertNull(MirrorRegion.parse(null))
|
||||
assertNull(MirrorRegion.parse("a,b,c,d"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun outputKeepsTheRegionsAspect() {
|
||||
val minimap = MirrorRegion.normalize(0.8f, 0.0f, 1.0f, 0.3555f)!!
|
||||
val (w, h) = MirrorRegion.outputSize(minimap, 16f / 9f, 720)
|
||||
assertEquals(720, w)
|
||||
assertEquals(720, h)
|
||||
val bar = MirrorRegion.normalize(0.3f, 0.9f, 0.7f, 1.0f)!!
|
||||
assertEquals(720 to 101, MirrorRegion.outputSize(bar, 16f / 9f, 720))
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.droiddeck.launcher.ui
|
||||
|
||||
import android.hardware.display.DisplayManager
|
||||
import android.view.Display
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.compose.runtime.MutableState
|
||||
@@ -76,6 +77,27 @@ class SecondScreenBarTest {
|
||||
return (0 until root.childCount).map { root.getChildAt(it) }
|
||||
}
|
||||
|
||||
@Test fun theTouchThatWakesTheScreenDoesNotReachThePanel() {
|
||||
SessionState.mode = SessionService.MODE_STEAM
|
||||
val panel = presentation()
|
||||
try {
|
||||
panel.show()
|
||||
panel.showMode(SecondScreenMode.KEYBOARD_TRACKPAD)
|
||||
val root: ViewGroup = ReflectionHelpers.getField(panel, "root")
|
||||
val seen = mutableListOf<Int>()
|
||||
root.setOnTouchListener { _, e -> seen += e.actionMasked; true }
|
||||
fun touch(action: Int) = MotionEvent.obtain(0, 0, action, 10f, 10f, 0).also { panel.dispatchTouchEvent(it); it.recycle() }
|
||||
panel.screenOff()
|
||||
touch(MotionEvent.ACTION_DOWN)
|
||||
touch(MotionEvent.ACTION_UP)
|
||||
assertTrue(seen.isEmpty())
|
||||
assertEquals(BottomScreenLight.ON, ReflectionHelpers.getField<BottomScreenLight>(panel, "screen"))
|
||||
assertEquals(false, ReflectionHelpers.getField<Boolean>(panel, "waking"))
|
||||
} finally {
|
||||
panel.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun trackpadPanelHasTheBarWithTheKeyboardToggleStateAndSwap() {
|
||||
SessionState.mode = SessionService.MODE_STEAM
|
||||
var swaps = 0
|
||||
@@ -90,13 +112,13 @@ class SecondScreenBarTest {
|
||||
assertEquals(context.getString(R.string.second_mode_keyboard_trackpad), bar.title)
|
||||
assertNotNull(bar.onClose); assertNotNull(bar.onMenu); assertNotNull(bar.onSteam); assertNotNull(bar.onQam)
|
||||
assertNull(bar.tabs)
|
||||
assertEquals(listOf("bottom-keyboard", "bottom-swap"), bar.extras.map { it.tag })
|
||||
assertEquals(listOf("bottom-keyboard", "bottom-swap", "bottom-brightness-toggle", "bottom-bar-hide"), bar.extras.map { it.tag })
|
||||
val keyboard = bar.extras.first()
|
||||
assertEquals(context.getString(R.string.second_show_keyboard), keyboard.description)
|
||||
assertFalse(keyboard.active)
|
||||
bar.extras.last().onClick()
|
||||
bar.extras.first { it.tag == "bottom-swap" }.onClick()
|
||||
assertEquals(1, swaps)
|
||||
assertEquals(listOf("bottom-keyboard", "bottom-swap"), panel.barModel(SecondScreenMode.TERMINAL)!!.extras.map { it.tag })
|
||||
assertEquals(listOf("bottom-keyboard", "bottom-swap", "bottom-brightness-toggle", "bottom-bar-hide"), panel.barModel(SecondScreenMode.TERMINAL)!!.extras.map { it.tag })
|
||||
ReflectionHelpers.getField<MutableState<Boolean>>(panel, "keyboardShown").value = true
|
||||
val shown = panel.barModel(SecondScreenMode.KEYBOARD_TRACKPAD)!!.extras.first()
|
||||
assertEquals(context.getString(R.string.second_hide_keyboard), shown.description)
|
||||
@@ -115,17 +137,17 @@ class SecondScreenBarTest {
|
||||
assertTrue(rootChildren(panel)[0] is ComposeView)
|
||||
val bar = panel.barModel(SecondScreenMode.DECK_CONTROLS)!!
|
||||
assertEquals(context.getString(R.string.second_mode_deck_controls), bar.title)
|
||||
assertEquals(listOf(context.getString(R.string.swap_screens)), bar.extras.map { it.description })
|
||||
bar.extras.single().onClick()
|
||||
assertEquals(listOf(context.getString(R.string.swap_screens), context.getString(R.string.bottom_brightness), context.getString(R.string.bottom_bar_hide)), bar.extras.map { it.description })
|
||||
bar.extras.first { it.tag == "bottom-swap" }.onClick()
|
||||
assertEquals(1, swaps)
|
||||
assertEquals(DeckPanel.entries.map { context.getString(it.label) }, bar.tabs!!.labels)
|
||||
assertEquals(DeckPanel.BOTH.ordinal, bar.tabs!!.selected)
|
||||
panel.showMode(SecondScreenMode.CUSTOM_CONTROLS)
|
||||
val profile = panel.barModel(SecondScreenMode.CUSTOM_CONTROLS)!!
|
||||
assertEquals(context.getString(R.string.input_profile_controls_mode), profile.title)
|
||||
assertEquals(listOf(context.getString(R.string.swap_screens)), profile.extras.map { it.description })
|
||||
assertEquals(listOf(context.getString(R.string.swap_screens), context.getString(R.string.bottom_brightness), context.getString(R.string.bottom_bar_hide)), profile.extras.map { it.description })
|
||||
assertNotNull(profile.onClose); assertNotNull(profile.onMenu)
|
||||
profile.extras.single().onClick()
|
||||
profile.extras.first { it.tag == "bottom-swap" }.onClick()
|
||||
assertEquals(2, swaps)
|
||||
assertTrue(rootChildren(panel)[0] is ComposeView)
|
||||
assertTrue(rootChildren(panel)[1] is InputSurfaceView)
|
||||
@@ -134,9 +156,9 @@ class SecondScreenBarTest {
|
||||
try {
|
||||
noSwap.show()
|
||||
noSwap.showMode(SecondScreenMode.DECK_CONTROLS)
|
||||
assertTrue(noSwap.barModel(SecondScreenMode.DECK_CONTROLS)!!.extras.isEmpty())
|
||||
assertEquals(listOf("bottom-keyboard"), noSwap.barModel(SecondScreenMode.TERMINAL)!!.extras.map { it.tag })
|
||||
assertEquals(listOf("bottom-keyboard"), noSwap.barModel(SecondScreenMode.KEYBOARD_TRACKPAD)!!.extras.map { it.tag })
|
||||
assertEquals(listOf("bottom-brightness-toggle", "bottom-bar-hide"), noSwap.barModel(SecondScreenMode.DECK_CONTROLS)!!.extras.map { it.tag })
|
||||
assertEquals(listOf("bottom-keyboard", "bottom-brightness-toggle", "bottom-bar-hide"), noSwap.barModel(SecondScreenMode.TERMINAL)!!.extras.map { it.tag })
|
||||
assertEquals(listOf("bottom-keyboard", "bottom-brightness-toggle", "bottom-bar-hide"), noSwap.barModel(SecondScreenMode.KEYBOARD_TRACKPAD)!!.extras.map { it.tag })
|
||||
} finally { noSwap.closeControls() }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
# Bottom screen: guides tab
|
||||
|
||||
Part of the [bottom screen research](bottom-screen.md). Researched 2026-11-26 against `main` at `d788afc12`. Milestones 1 and 4 are built (Steam guides with tag and language filters, the Wikidata crosswalk with wiki, fixes and the ProtonDB tier, pinned maps with markers, and saved pages); see the status in the overview. Milestones 2 (achievement checklist with spoiler blur), 3 (native section reader and controller mode) and 5 (progress-aware help) are not started.
|
||||
|
||||
A dashboard tab that follows the running game and shows its guides, achievements, maps and fixes, reopens where the user left off, and saves pages for offline use.
|
||||
|
||||
## Use cases
|
||||
|
||||
- Stuck on a puzzle or boss: the walkthrough for this game is already open on the bottom screen at the last section read.
|
||||
- Achievement hunting: a checklist of locked achievements with missable ones flagged, spoilers blurred until tapped.
|
||||
- Collectibles: a map image pinned with pan and zoom, markers saved per map.
|
||||
- Fixes: PCGamingWiki and ProtonDB notes for the game when it misbehaves.
|
||||
- Offline play on a plane with guides saved earlier.
|
||||
|
||||
## Prior art
|
||||
|
||||
| Project | Matching | Offline | Reader and extras | Complaints and requests |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| [Game Twin](https://github.com/alpha-minus/game-twin) (GPL-3, 157★) | Bundled catalogs (GameFAQs, StrategyWiki, VGMaps, Steam guides) rebuilt offline; Jaccard title match at 0.6 with a sequel guard (numbers must match); hand-mapped series sites (Zelda Dungeon, Bulbapedia); site search URLs for the rest | `WebView.saveWebArchive` after forcing lazy images to load; MHT split into HTML and assets served via `shouldInterceptRequest`; scripts stripped; OkHttp with WebView cookies for side downloads. Also imports PDF, TXT, EPUB | Reading mode with per-host cleanup, auto table of contents, find, bookmarks. Resume by the text at the top of the viewport plus its occurrence, so it survives reflow. Maps with markers, checklists, RetroAchievements and Steam achievements, folder sync, optional Gemini with a screenshot | Battery and fan noise from live pages left running ([#12](https://github.com/alpha-minus/game-twin/issues/12), [#24](https://github.com/alpha-minus/game-twin/issues/24)); saved guides unreadable in dark mode ([#9](https://github.com/alpha-minus/game-twin/issues/9)); cookie banners ([#2](https://github.com/alpha-minus/game-twin/issues/2)); requests for notes ([#28](https://github.com/alpha-minus/game-twin/issues/28)) and a visible capture indicator for AI ([#22](https://github.com/alpha-minus/game-twin/issues/22)) |
|
||||
| [Pixel Guide](https://github.com/rexmont/Pixel-Guide-Android) (closed source) | Manual | TXT, single-file HTML, multi-page Neoseeker | ASCII reflow with auto table of contents, per-guide font, resume, find, controller scrolling, 14 themes, manuals, translation, AI | Ads in saved pages ([#46](https://github.com/rexmont/Pixel-Guide-Android/issues/46)), very large guides fail ([#58](https://github.com/rexmont/Pixel-Guide-Android/issues/58)); requests for stick scrolling ([#35](https://github.com/rexmont/Pixel-Guide-Android/issues/35)), prev/next ([#27](https://github.com/rexmont/Pixel-Guide-Android/issues/27)), checklists ([#44](https://github.com/rexmont/Pixel-Guide-Android/issues/44)), remembering the game association ([#20](https://github.com/rexmont/Pixel-Guide-Android/issues/20)) |
|
||||
| [WalkThor](https://github.com/nerf-herder-29/WalkThor) (MIT) | Fuzzy match of ROM name to local files | Local PDF and TXT only | Position stored as a character offset; 80-column pages for ASCII tables; L1/R1 page turns. Bottom window is non-focusable while a game runs because taking focus "can halve its frame rate" | n/a |
|
||||
| Steam Deck overlay Guides (SteamOS 3.3) | Exact app id | No | Favourites and popular guides; later fixes for oversized images and spoiler tags. Gone from the desktop overlay, where the 2023 overlay instead added pinned windows and Game Notes ([PC Gamer](https://pcgamer.com/new-steam-feature-lets-you-pin-windows-over-games-including-guides-notes-and-web-pages)) | n/a |
|
||||
|
||||
DroidDeck's advantage: we know the exact Steam app id of the focused game, so we need no title matching for Steam games.
|
||||
|
||||
## Sources
|
||||
|
||||
| Source | Access | Terms | Use |
|
||||
| --- | --- | --- | --- |
|
||||
| **Steam Community guides** | Listing: `steamcommunity.com/app/<appid>/guides/?browsefilter=toprated\|trend&requiredtags[]=Walkthroughs`. API: `IPublishedFileService/QueryFiles` with `filetype=11` needs a key or the signed-in user's token. Guide pages (`sharedfiles/filedetails/?id=`) are server-rendered; sections are `div.subSection` with numeric ids | Authors own their guides under the Steam Subscriber Agreement. Cache per user, never redistribute | First source. Native section reader with stable anchors for chapter jumps and resume |
|
||||
| **Steam achievements** | `IPlayerService/GetGameAchievements/v1/?appid=&language=` needs no key and returns names, icons, the hidden flag, global unlock percentage, and descriptions even for hidden achievements (checked on Elden Ring, Hollow Knight, Baldur's Gate 3). It is undocumented. `GetGlobalAchievementPercentagesForApp` also needs no key. The player's unlocks should come from the local client (`SteamClient.Apps` through CDP, or the client's stats cache); not yet tested | Valve | Achievement checklist with spoiler blur and difficulty from unlock % |
|
||||
| **Wikidata** | SPARQL by Steam app id (P1733), or Epic (P6278) or GOG (P2725) id, returns the Fandom wiki (P4073), PCGamingWiki (P6337), GameFAQs (P4769), IGN (P5385), HowLongToBeat (P2816) and speedrun.com ids | CC0 | Crosswalk from the running game to every other site, including non-Steam games |
|
||||
| **StrategyWiki** | MediaWiki API | CC BY-SA 4.0 | Full offline caching allowed |
|
||||
| **Fandom wikis** | MediaWiki `api.php` per wiki | CC BY-SA (media excluded) | Per-game wiki pages, found through Wikidata |
|
||||
| **PCGamingWiki** | `pcgamingwiki.com/api/appid.php?appid=` redirects to the page; MediaWiki API (anonymous Cargo queries are refused now) | CC BY-NC-SA 3.0 | Fixes and settings, in a "Fixes" section |
|
||||
| **ProtonDB** | `protondb.com/api/v1/reports/summaries/<appid>.json`, no key | ProtonDB | A tier badge next to fixes |
|
||||
| **GameFAQs, Neoseeker, IGN** | No API. GameFAQs terms forbid unauthorized scraping; its robots signals allow reference use but not AI training | Authors' copyright; Ziff Davis bans automated retrieval including AI use without permission | Browse in a WebView; save a page only when the user asks; never prefetch or send to AI |
|
||||
| **VGMaps, Map Genie** | Images; Map Genie is an interactive site (Ziff Davis) | Maps belong to the games' owners; Map Genie bans automated retrieval | Save VGMaps images on request into the map viewer; Map Genie only as a live WebView |
|
||||
| **YouTube** | Search URL (free) or Data API (100 quota units per search) | YouTube | Search link and embedded player, no downloads |
|
||||
| **HowLongToBeat, TrueSteamAchievements** | No stable API ([unofficial library breaks often](https://github.com/ScrappyCocco/HowLongToBeat-PythonAPI/issues)) | Ziff Davis / site owners | Links only |
|
||||
|
||||
Recommended order for the tab: Steam guides → achievements → StrategyWiki or the game's Fandom wiki (via Wikidata) → PCGamingWiki and ProtonDB → curated series sites → GameFAQs, Neoseeker and IGN in a WebView → maps → YouTube.
|
||||
|
||||
## What DroidDeck already has
|
||||
|
||||
Paths are under [`app/src/main/java/com/droiddeck/launcher/`](../../app/src/main/java/com/droiddeck/launcher/).
|
||||
|
||||
- **Game identity.** Bottom pages receive `gestureGame` as `runningGame`. In Steam mode it is the gamescope-focused app id (ignoring the Steam client, 769); in direct-run mode it is `program:<path>`, which is not a Steam app id, so Steam lookups must not use it. `AgentGuest.activeSteamAppId` reads the focused Steam app directly and is the source for Steam lookups. Non-Steam store games are Steam shortcuts; `resolveAchievementsInFront` already maps the focused id to the store and store id through the library cache.
|
||||
- **WebView base.** [`ui/BottomChatPage.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomChatPage.kt) loads Steam Community with a host allow-list, desktop user agent, fit-to-screen CSS and crash recovery. [`session/SteamWebLogin.kt`](../../app/src/main/java/com/droiddeck/launcher/session/SteamWebLogin.kt) imports the Steam client's own `steamcommunity.com` cookies, so guides load signed in without another login.
|
||||
- **Achievements.** [`stores/StoreAchievements.kt`](../../app/src/main/java/com/droiddeck/launcher/stores/StoreAchievements.kt) is a provider base with a per-game cache; GOG and Epic implement it. [`ui/StoreAchievementsUi.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/StoreAchievementsUi.kt) has the rows, tab and session panel. A Steam provider plugs in as source `steam`.
|
||||
- **Per-game storage.** `SessionPrefs` already keys settings by game (for example `fpsLimit.game.<id>`); the guide workspace fits the same pattern.
|
||||
- **Game frame without MediaProjection.** `SessionActivity.copyGameFrame` and `AgentAttachments.gameFrame` capture the game image directly, which an optional AI helper could use with no capture permission.
|
||||
- **Controller.** The dashboard forwards controller input to the game and has no D-pad focus today. The docked session menu has focus handling (`SecondScreenPresentation.dispatchMenuKey`, the `dockedMenuController` setting) and is the pattern to follow.
|
||||
|
||||
## Design
|
||||
|
||||
**Workspace per game.** One workspace per Steam app id (or store key): open guide, section, text anchor, recent searches, pinned maps, checklist ticks. Restored when the game gains focus. Cleared with the game profile.
|
||||
|
||||
**Home of the tab** for the running game:
|
||||
|
||||
1. Continue: the last guide at the last section.
|
||||
2. Steam guides, top rated and trending, filterable by tag (Walkthroughs, Achievements, Secrets, Maps).
|
||||
3. Achievements: locked first, missable flagged, hidden descriptions blurred.
|
||||
4. Wiki: StrategyWiki or Fandom, from Wikidata.
|
||||
5. Fixes: PCGamingWiki and the ProtonDB tier.
|
||||
6. Saved: offline pages and maps for this game.
|
||||
7. Search the web: GameFAQs, Neoseeker, IGN and YouTube with the game name prefilled.
|
||||
|
||||
**Reader.**
|
||||
|
||||
- Steam guides and MediaWiki pages are rendered natively from their HTML (sections, images, spoilers), not as a full web page: smaller, dark by default, and reflowed for the panel.
|
||||
- Other sites open in a WebView with cleanup CSS, forced dark mode and a cookie-banner dismiss.
|
||||
- Resume by text anchor (Game Twin's approach), falling back to scroll ratio.
|
||||
- Table of contents from Steam section ids or the MediaWiki outline; find in page.
|
||||
- Spoiler-safe by default: Steam `[spoiler]` spans and hidden achievements blurred until tapped.
|
||||
|
||||
**Offline.**
|
||||
|
||||
- Steam guides and wiki pages: save the parsed HTML and images per user.
|
||||
- Other sites: MHT saved on request, with scripts stripped.
|
||||
- Saved pages are listed per game and work without network.
|
||||
|
||||
**Controller.**
|
||||
|
||||
- The guide never takes focus or priority from the game (WalkThor's lesson).
|
||||
- A dedicated chord or the docked-menu controller mode gives it the pad: right stick scrolls, L1/R1 change section, D-pad moves through links and the contents, B returns the pad to the game.
|
||||
- Touch always works.
|
||||
|
||||
**Battery.** Pause or destroy WebViews when the tab is not visible; the top complaint about Game Twin is a live page draining the battery behind the game.
|
||||
|
||||
## Progress-aware help (later)
|
||||
|
||||
Signals we can use without reading game memory:
|
||||
|
||||
- Steam achievement unlocks with timestamps, matched to guide section titles.
|
||||
- Steam rich presence (`steam_display`) and, for games that report it, [Steam Timeline](https://partner.steamgames.com/doc/api/ISteamTimeline) game phases and tooltips. Whether the client exposes these to CDP needs checking.
|
||||
|
||||
An optional AI helper ("Where am I, what next?") would send the game frame plus those signals. Rules from Game Twin's feedback and the criticism of Xbox Gaming Copilot ([Tom's Hardware](https://www.tomshardware.com/video-games/pc-gaming/microsoft-says-gaming-copilot-uses-screenshots-to-understand-in-game-events-not-for-training-ai-models-optional-feature-can-be-turned-off-but-not-easily-uninstalled)):
|
||||
|
||||
- opt-in, user's own key;
|
||||
- one frame per question, with a visible indicator;
|
||||
- crop out notifications and overlays;
|
||||
- never send cached text from sources that forbid AI use.
|
||||
|
||||
## Open questions
|
||||
|
||||
- The most reliable way to read the player's Steam unlocks locally (CDP versus the client's stats cache).
|
||||
- Whether Steam guide listings load reliably without the web API key, using the signed-in cookies.
|
||||
- How much of a Steam guide's formatting (tables, embedded video) the native reader must support.
|
||||
- Where the tab lives in swapped mode (it follows the panel to the top screen).
|
||||
|
||||
## Milestones
|
||||
|
||||
1. Steam guides list and WebView reader for the running app id, with a per-game last page.
|
||||
2. Steam achievements provider and checklist with spoiler blur.
|
||||
3. Native section reader, offline saving and the controller mode.
|
||||
4. Wikidata crosswalk, wiki and fixes sections, maps viewer.
|
||||
5. Progress-aware suggestions and the optional AI helper.
|
||||
@@ -0,0 +1,107 @@
|
||||
# Bottom screen: region mirror
|
||||
|
||||
Part of the [bottom screen research](bottom-screen.md). Researched 2026-11-26 against `main` at `d788afc12`. Milestone 1 (the PixelCopy prototype) is built: a Mirror tab with a drag-to-pick editor on a still frame, a live view at about 15 fps with sharp or smooth scaling, and one region per game stored as fractions of the output. PixelCopy sees nothing while the zero-copy path puts the game on a child layer, so the tab turns zero-copy off while it is shown (HDR still forces it on). Checked on a Retroid Pocket Duo Lite Plus. Hide on top (milestone 3 in part) is built as a view over the game surface while the tab is shown: shown, black or dimmed per game. App views sit above the SurfaceView, so the mask hides the region on screen while PixelCopy still reads the real pixels. Blur and the compositor output are not done.
|
||||
|
||||
Show live crops of the game image (minimap, HUD, ability bar, dialogue box) scaled up on the bottom screen, and optionally remove them from the top screen. Regions are saved per game.
|
||||
|
||||
## Use cases
|
||||
|
||||
- **Minimaps** in open-world and action games (GTA, Monster Hunter, The Witcher, Elden Ring's compass): bigger on the bottom, gone from the top.
|
||||
- **MMO and ARPG bars**: ability, health and buff bars moved off a crowded 6" screen. Megingiard users asked for 90° rotation for a Guild Wars 2 ability bar and for very thin crops for visual-novel text.
|
||||
- **Racing**: rear-view mirror or track map on the bottom while the top shows only the road.
|
||||
- **Strategy**: the minimap of an RTS or a city builder, where it is the main navigation tool.
|
||||
- **Clean top screen**: hide every HUD element on top and keep them all on the bottom.
|
||||
|
||||
## Prior art
|
||||
|
||||
| Project | Capture | Notes |
|
||||
| --- | --- | --- |
|
||||
| [Megingiard](https://github.com/stormpanda/megingiard) (Thor) | A privileged shell helper creates a mirror display (hidden `SurfaceControl.createDisplay` on API 33; `AUTO_MIRROR` virtual display through `mirrorSurface` on API 34+), then SurfaceTexture → GLES → TextureView. Falls back to MediaProjection with a consent prompt on every start | Up to 10 cutouts. Crop box edited on the top screen, placement on the bottom. Edge handles, 1 px gamepad steps, snap guides, aspect lock (free, source-locked, destination-locked), rotation and flips, pinch zoom, circle shape, edge blending, temporal smoothing. Variance masks cut moving background out of HUD art. "Visual anchors" (a 256-point colour signature checked at 60 Hz) switch layout or freeze cutouts when a menu covers the HUD. FPS cap 10–120. Complaints: black mirror, consent prompts, helper pairing, DRM blanking ([docs](https://github.com/stormpanda/megingiard/tree/main/docs/features/mirror)) |
|
||||
| [Heimdall](https://github.com/mastercook777/Heimdall-AYN-Thor-Assistant) (Thor) | MediaProjection into one virtual display, fanned out on the GPU: one EGL surface per "Portal", crop in the texture matrix | Two Portals. Per-Portal zoom, shape, fps, and an "Interactive" mode that sends one-finger touch back to the region. Curated [community profiles](https://github.com/mastercook777/heimdall-community-profiles) keyed by app, checked by SHA-256 |
|
||||
| [WalkThor](https://github.com/nerf-herder-29/WalkThor) (Thor) | MediaProjection at half resolution into an `ImageReader`, drawn with Compose | Four regions per game stored as fractions of the screen and keyed by game title. Pick box keeps the bottom screen's aspect by default. About 30 fps. Its bottom window is non-focusable so the game keeps top-app priority |
|
||||
| [OnTopReplica](https://github.com/LorenzCK/OnTopReplica) (Windows) | DWM thumbnails (`DwmRegisterThumbnail` with source and destination rectangles): a crop done by the compositor, with no copy | The usual way to put an MMO minimap on a second monitor. SteamDeckHQ's [AYANEO Flip DS review](https://steamdeckhq.com/news/ayaneo-flip-ds-review/) used it for a Monster Hunter: World minimap on the bottom screen |
|
||||
| [wl-mirror](https://github.com/Ferdi265/wl-mirror) (Linux) | wlr-screencopy or dmabuf export with `--region` | Scaling modes fit, cover, exact, linear and nearest, plus freeze |
|
||||
| gamescope PipeWire stream | An extra composite pass of the whole output, used by Steam for recording | Full output only, no regions. Still a precedent for a second output rendered inside the compositor |
|
||||
|
||||
None of the Android tools can hide the region on the top screen: they capture the final display output, so any mask they drew would be captured too. Each also adds at least one composition cycle of latency and needs MediaProjection or a privileged helper.
|
||||
|
||||
## Why DroidDeck can do better
|
||||
|
||||
The game is composited by our own Wayland compositor in the app process. We have the game image as a Vulkan image before it reaches the display, so we can:
|
||||
|
||||
- crop without screen capture, a consent prompt or a privileged helper;
|
||||
- avoid the extra SurfaceFlinger round trip;
|
||||
- mask the region on the top screen in the same pass;
|
||||
- know the game's own resolution and our letterbox or stretch transform, so regions can be stored in game coordinates.
|
||||
|
||||
## Current pipeline
|
||||
|
||||
Paths are under [`app/src/main/cpp/waylandcomp/src/`](../../app/src/main/cpp/waylandcomp/src/).
|
||||
|
||||
- gamescope runs nested in our compositor with its Wayland backend (`tools/linuxfs/overlay/usr/local/bin/droiddeck-session`). Client buffers arrive as dma-bufs or AHardwareBuffers and are imported as `VkImage`s ([`vk_present.c`](../../app/src/main/cpp/waylandcomp/src/vk_present.c)).
|
||||
- `render_scene()` in [`compositor.c`](../../app/src/main/cpp/waylandcomp/src/compositor.c) builds a draw list; `vkp_render()` composites it, runs the effects chain ([`effects_chain.c`](../../app/src/main/cpp/waylandcomp/src/effects_chain.c): FSR, NIS, SGSR, CAS, CRT and others) and blits into one swapchain on one `ANativeWindow`.
|
||||
- There is exactly one output window. Swapping the game to the bottom screen ([`BottomGameScreen.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomGameScreen.kt), `SessionActivity.putGameOnBottom`) re-targets that window to the Presentation's `SurfaceView`; it does not feed two surfaces.
|
||||
- A gated zero-copy path ([`sc_layer.c`](../../app/src/main/cpp/waylandcomp/src/sc_layer.c), [`ZERO_COPY_SPIKE.md`](../../app/src/main/cpp/waylandcomp/ZERO_COPY_SPIKE.md)) posts the game's AHardwareBuffer straight to an `ASurfaceControl` child layer, with no composited image.
|
||||
- `update_map()` holds the scene-to-output transform for each scale mode (letterbox, fit, stretch, fill, integer); `vkp_output_to_scene` and `vkp_scene_to_output` convert between them. `vkp_blit_image()` already blits into AHB-backed images.
|
||||
- Screenshots use `PixelCopy` on the active `SurfaceView` (`SessionActivity.copyGameFrame`).
|
||||
- The bottom-screen Presentation ([`SecondScreenPresentation.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/SecondScreenPresentation.kt)) lives in the same process as the compositor, so a new JNI call can hand it a surface. The bottom KDE desktop runs a second compositor in another process and cannot share images without AHB IPC.
|
||||
|
||||
## Technical options
|
||||
|
||||
### A. Second output from the compositor (recommended first)
|
||||
|
||||
Add a second, optional output to `vk_present`: its own `ANativeWindow` and swapchain, fed by a `nativeSetMirrorSurface` JNI call from a `SurfaceView` in the bottom Presentation.
|
||||
|
||||
- After compositing the top frame, blit each region's source rectangle from the scene image into the mirror swapchain image with `vkCmdBlitImage` (or a small shader pass), and present it.
|
||||
- The copy is small: a 1240×1080 target at 60 Hz is about 0.3 GB/s against roughly 60 GB/s of memory bandwidth on the Thor's SoC (an estimate, not measured). The real costs are an extra queue submit competing with a GPU-bound game, and pacing a second display.
|
||||
- A shader pass makes nearest or integer scaling (pixel-art HUDs), masks, circles, rounded corners and colour keys possible. An existing upscaler (FSR EASU or SGSR) could scale a small minimap cleanly.
|
||||
- The mirror runs at its own rate (default 30 fps, options 15 and 60) and skips frames when the bottom panel is behind.
|
||||
- The top pass can fill, blur or dim the same rectangles to hide them.
|
||||
|
||||
### B. Zero-copy layers
|
||||
|
||||
Composite the top frame into compositor-owned AHardwareBuffers, then attach the same buffer to one `ASurfaceControl` child per region under the bottom `SurfaceView`, with `setCrop`, `setPosition`, `setScale` and `setBufferTransform`.
|
||||
|
||||
- The NDK documents that each layer holding a buffer counts as its own reference, and that all of them must be released before the buffer is reused ([`surface_control.h`](https://cs.android.com/android/platform/superproject/main/+/main:frameworks/native/include/android/surface_control.h)).
|
||||
- On API 33 (the Thor) the NDK `setBuffer` has no per-buffer release callback; release comes as a per-surface fence in the completion callback. All region fences must be merged before reuse, and the pool needs one or two extra buffers because the 60 Hz bottom panel holds buffers longer than the 120 Hz top panel.
|
||||
- Avoid the Java `Transaction.setBuffer` release callback here: callbacks are keyed by buffer and per-layer frame number, so two layers showing the same buffer can collide. This is inferred from AOSP source, not tested.
|
||||
- `ASurfaceControl_fromJava` needs API 34; on API 33 parent through `ASurfaceControl_createFromWindow` on the bottom `SurfaceView`'s window.
|
||||
- Scaling is done by the display hardware with a fixed vendor filter (no nearest neighbour), and the number of hardware planes is limited. If they run out, SurfaceFlinger composites on the GPU instead, which still works.
|
||||
- This only makes sense once the top screen itself is presented through AHB layers. Option A first.
|
||||
|
||||
### C. PixelCopy prototype
|
||||
|
||||
Crop a `PixelCopy` of the top `SurfaceView` at 5–10 fps into a bitmap. Useful for testing the editor UX and region presets quickly, but too slow for a real minimap, and it probably returns nothing when the zero-copy path puts the game on a child layer.
|
||||
|
||||
## Coordinates and presets
|
||||
|
||||
- Store rectangles in game-surface coordinates (gamescope's output, `DD_WIDTH`×`DD_HEIGHT`), not display pixels, so they survive changes to scale mode, FSR and output size. The compositor converts them each frame.
|
||||
- Fractions of the screen alone break when the aspect ratio changes, because engines anchor HUD widgets to corners and scale by height or DPI ([Unreal anchors](https://dev.epicgames.com/documentation/en-us/unreal-engine/umg-anchors-in-unreal-engine-ui)). Store an anchor (one of nine corners, edges or centre), an offset and a size in units of the game's height.
|
||||
- Key presets by Steam app id, aspect bucket (16:9, 16:10, 4:3, other) and an optional UI-scale tag set by the user.
|
||||
- Later: a community preset catalog keyed by app id, curated and hashed like Heimdall's, offered as "Suggested regions" for the running game.
|
||||
|
||||
## UX
|
||||
|
||||
- **Editing on both screens.** The top screen shows the frozen frame with a crop box: edge and corner handles, D-pad nudge by 1 px and shoulder buttons by 10. The bottom screen shows placement with snap guides, aspect lock, rotation, flip, filter (smooth or sharp) and shape.
|
||||
- **Limits.** Up to four regions per game. Long-press freezes a region; tap opens its options.
|
||||
- **Hide on top.** Per region: off, fill, blur or dim.
|
||||
- **Auto-hide.** Later, Megingiard-style colour anchors that hide or freeze regions when a menu covers the HUD.
|
||||
- **Place in the panel system.** A new "Mirror" bottom-screen mode next to the dashboard and control modes, remembered per game (see per-game panel memory in the overview). Regions can also be shown in a corner of the dashboard.
|
||||
- **Swapped mode.** With the game on the bottom screen, the mirror output goes to the top screen.
|
||||
- Reuse DroidDeck's own settings components; no generic dialogs.
|
||||
|
||||
## Open questions
|
||||
|
||||
- Pacing and fencing of a second swapchain on a different display without stalling the top present.
|
||||
- Interaction with glasses output, which already re-targets the single window.
|
||||
- Whether regions apply before or after effects (a CRT shader on a minimap is probably unwanted).
|
||||
- Battery and thermal cost, measured on the Thor and Duo with a GPU-bound game.
|
||||
- Touch forwarding into a region (Heimdall's "Interactive"), mapped back to game coordinates.
|
||||
|
||||
## Milestones
|
||||
|
||||
1. PixelCopy prototype of the editor and per-game storage.
|
||||
2. Second output in `vk_present` with one region and smooth scaling.
|
||||
3. Multiple regions, shader filters, hide on top.
|
||||
4. Presets keyed by aspect, suggested regions, anchors.
|
||||
5. Zero-copy layers once the top screen uses AHB presentation.
|
||||
@@ -0,0 +1,209 @@
|
||||
# Bottom screen: research and proposals
|
||||
|
||||
Researched 2026-11-26 against `main` at `d788afc12` (0.7.11). This document records what other dual-screen Android projects put on the second screen, how they get their data, where DroidDeck stood at that commit, and the features we want to build. "DroidDeck today" is that researched baseline; each proposal's **Status** line says what has been built since, and proposals without one are not scheduled. Two proposals have their own documents: [region mirror](bottom-screen-region-mirror.md) and [guides tab](bottom-screen-guides.md).
|
||||
|
||||
The starting point was WULFF DEN's survey video [Dual screen Android apps are getting crazy](https://youtu.be/dAiuG2A-wkc) (2026-11-26). It covers the AYN Thor and Retroid Pocket Duo, and most of its apps come from the [GAFT list](https://andreyvelsk.github.io/GAFT) of Thor apps.
|
||||
|
||||
## DroidDeck in the video
|
||||
|
||||
DroidDeck appears from 17:47 to 18:30 on a Thor: the Steam gamepad UI on top, our bottom panel below.
|
||||
|
||||
- Shown: the mode picker (DroidDeck menu, Keyboard + trackpad, Terminal, Deck grips + trackpads, Profile controls, Dashboard), the controller page of the docked menu, and the Dashboard's In-game stats card with FPS, 1%/0.1%/0.01% lows and a frame-time graph while Ball x Pit runs.
|
||||
- Verdict: it fills the bottom screen "with useful things like a keyboard and a trackpad" or game information, and makes the device feel "a lot more like having a dual screen Steam Deck".
|
||||
- Problem: it "froze on install a handful of times" and needed three device restarts. The build was probably 0.7.1 or earlier. Two first-run hang fixes landed later: #3070 (FEX/AppImage extraction deadlock in the clock-pause preload) and #3212 (first-run setup crashing in the background). Whether they cover this report is unconfirmed; slow exFAT preallocation on the Thor's SD card ([thor-sd-storage-investigation.md](thor-sd-storage-investigation.md)) can also look like a freeze.
|
||||
- Problem: with no game running, the stats card reads "59.6 fps · Steam Client ARM". It measures the Steam client itself, which tells the user nothing.
|
||||
|
||||
## What other projects do
|
||||
|
||||
### System companions and utilities
|
||||
|
||||
| Project | Bottom screen | Data source |
|
||||
| --- | --- | --- |
|
||||
| [ArmadaLive](https://github.com/FabianZettl/armadalive) (Armada OS, SteamOS-like Linux on the Thor) | Follows the top screen: logo, background, info, PDF manual, cheats and play time of the current game. Launcher with user and smart folders (recent, favourites, per system), random pick, Add to Steam. System page with FPS and a 60/120 Hz switch, rearrangeable quick-setting tiles (power profile, fan curve, stick LEDs, per-screen brightness, screen off), gauges. Rules (power profile, FPS limit, emulator resolution per game, per system, idle, or base). Tuning (governor, GPU limits, fan curve editor) that reverts after 15 s unless kept. Graphs, task manager, play-time history, trackpads, back buttons as a second controller. Dims after 10 s; hold Start+Select to close a game; AYN button shows or hides it, hold turns the screen off. 55 themes, first-run permission walkthrough, health check, verified self-update | ES-DE custom event scripts writing a state file, emulator process scan matched to ROMs, gamescope focus and stats pipe, the Big Picture selection read over Steam's CEF debug port, ES-DE scraped media and Steam's library cache |
|
||||
| [Armada OS](https://github.com/armada-os/armada) | Little in game mode: the bottom screen sleeps with the top. An experimental Plasma Mobile session, and `armada-run-bottom -- <cmd>` to run single apps on a second gamescope on the bottom panel | n/a |
|
||||
| [Thor Command Panel](https://github.com/BrianJr03/command-panel) | Replaces the stock dual-screen assistant: screen modes with real blanking, per-screen brightness and volume, 60/120 Hz with FPS, tiles, telemetry, themes, drag-to-arrange cards, replay buffer of either or both screens, full gamepad navigation | System APIs |
|
||||
| [Better Dual Screen Assistant](https://github.com/stormpanda/better-dual-screen-assistant) (Thor and Duo) | One-tap swap of the foreground apps between screens, linked brightness and volume, FPS from real frame delivery, paged tiles switched with L1/R1, recording, touch lock, mouse mode, key mapper, works before unlock | System APIs |
|
||||
| [Wayfinder](https://github.com/Thor-Wayfinder/thor-wayfinder) | Move or swap live apps between screens, button combos with a cheat sheet, per-app profiles (screen, performance, fan, refresh rate, lights, controls), keyboard and trackpad on the other screen | System APIs |
|
||||
| [Megingiard](https://github.com/stormpanda/megingiard) | Mirrors up to 10 cropped regions of the top screen (minimap, HUD) with pinch zoom; per-app macro pads; split keyboard on text focus; trackpad | Screen capture |
|
||||
| [WalkThor](https://github.com/nerf-herder-29/WalkThor) | Now Playing art, the guide at your last page, up to 4 mirrored top-screen regions remembered per game, console-style face-button labels, FPS graph, learned per-game battery runtime, offline captions of game audio. Hands focus back to the game | Cocoon and ES-DE log files, screen capture |
|
||||
| [Heimdall](https://github.com/mastercook777/Heimdall-AYN-Thor-Assistant) | Per-game module grid, macros, precision aim, virtual mouse and stick, "portals" (live top-screen regions), OCR translation | Screen capture |
|
||||
| [ThorSport](https://github.com/CHINW3/ThorSport) | Live scoreboards for 15 leagues, bottom-only mode so a game can run on top, spoiler delay synced to a stream | Sports APIs |
|
||||
| AYANEO Flip DS (Windows, AYASpace) | Performance stats, quick settings, app shortcuts, moving any window between screens | Windows |
|
||||
|
||||
### Guides
|
||||
|
||||
| Project | Bottom screen | Data source |
|
||||
| --- | --- | --- |
|
||||
| [Game Twin](https://github.com/alpha-minus/game-twin) | Per-game vault of guides (GameFAQs, StrategyWiki, IGN) saved offline, VGMaps maps with markers, RetroAchievements and Steam achievements including missables, checklists. Switches workspace with the game and reopens where you left off. Optional Gemini help with a screenshot of the top screen | Polls Cocoon `launch_debug.log`, ES-DE `es_log.txt`, RetroArch `content_history.lpl`, and the Steam Web API for recently played |
|
||||
| [Pixel Guide](https://github.com/rexmont/Pixel-Guide-Android) | Offline guides, maps, manuals, RetroAchievements, AI help | Games are added by hand |
|
||||
|
||||
### Game companions
|
||||
|
||||
| Project | Bottom screen | How it gets live state |
|
||||
| --- | --- | --- |
|
||||
| [Eden Duo](https://github.com/igawa6/eden-duo) (Switch) | Interactive per-game pages (Stats, Map, Tasks); can use items and change equipment | Per-game `.dsmod.zip` packages from a [catalog repo](https://github.com/igawa6/eden-duo-companions): `package.json` with build IDs and per-ABI native modules, a declarative UI manifest (pages, widgets, actions, `poll_hz`, art loaded from the game's own romfs), and pointer chains per build. A small C ABI gives modules `read_memory`/`write_memory`/`publish_*`. Unity IL2CPP members are resolved by name. Unknown builds show a "needs version X" page |
|
||||
| [GBA DS](https://github.com/kyannon/gba-ds) | Map or HUD for 77 GBA games. Per-game screen sizing, placement, generated overlays and per-screen brightness | A second silent emulator instance receives the live state, opens the map and captures it, confirmed by RAM flags and pixel probes. Some games render twice, with and without the HUD |
|
||||
| [WiiDS](https://github.com/Maddex712/WiiDS) | Course maps, standings, a rotating Galaxy planet with a touch cursor | Native recompilations, so state is in-process |
|
||||
| [Silksong Android](https://github.com/jakobkhansen/SilksongAndroid) | Interactive map, inventory and pause menu that look like part of the game | C# patches compiled on-device against the game's assemblies, drawn by a Unity camera on `Display.displays[1]`. Downloads the Linux depot with JavaSteam and syncs Steam Cloud saves |
|
||||
| [AYN Thor dual-screen mods](https://github.com/JoeCorrell/AYN-Thor-Dualscreen-Mods) (Stardew Valley) | Today, Map, Farm, Journal, Bundles, Calendar; touch actions | A SMAPI mod inside a Steam container serves a WebSocket on `127.0.0.1:7786`; a separate APK draws the pages. A [second client](https://github.com/project-barry/stardew-dual-screen) speaks the same protocol |
|
||||
| [ShulkDS](https://github.com/NaiSenshin/ShulkDS) (Minecraft Java) | Minimap, touch inventory, options | Its own client reimplementation |
|
||||
| [TotK Native](https://github.com/AurelioB/totk-android) | Touch equip and eat actions | Guarded reads of native memory into a JSON snapshot polled by a Java UI |
|
||||
| [Kanto Gear](https://github.com/AverageConsumer/kanto-gear) ([Gen 1 recomp](https://github.com/bryanthaboi/gen1recomp)) | Companion panel, as a combined window, a separate process, or a phone/browser over Wi-Fi | In-process; [KantoGearBottom](https://github.com/venatrix-ritz/KantoGearBottom) puts the separate window on Armada's bottom gamescope |
|
||||
| [EmuLnk](https://github.com/EmuLnk/emulnk) | HTML/JS dashboards per game that can also write memory or run macros | Emulator forks send memory over UDP; profiles are JSON memory points from a [content repo](https://github.com/EmuLnk/emulnk-repo) |
|
||||
|
||||
Other GAFT companions: Thor Pip-Boy, FNVDS, Grand Theft Companion, FFXII, Terraria, ZomboidDS, Skyrim, Delphis (live Dolphin button guide), PokeMMO Companion, Thor-SpeedrunSplits, DrillPod.
|
||||
|
||||
### Patterns that recur
|
||||
|
||||
- The bottom screen follows the game on top without the user telling it which game.
|
||||
- Everything is remembered per game: panel, guide page, mirrored regions, power and FPS rules, control profiles.
|
||||
- One hardware button shows or hides the panel; holding it switches the bottom screen fully off, not just black.
|
||||
- Per-screen brightness, a 60/120 Hz switch and an honest FPS readout.
|
||||
- Live crops of the minimap or HUD.
|
||||
- Auto-dim of an idle OLED panel.
|
||||
- The panel never takes focus or priority from the game.
|
||||
|
||||
## DroidDeck today
|
||||
|
||||
As of `d788afc12`, before the work in the Status lines below.
|
||||
|
||||
Paths are under [`app/src/main/java/com/droiddeck/launcher/`](../../app/src/main/java/com/droiddeck/launcher/).
|
||||
|
||||
**Panels.** [`input/SecondScreenMode.kt`](../../app/src/main/java/com/droiddeck/launcher/input/SecondScreenMode.kt) lists the modes: menu, keyboard + trackpad, terminal, Deck grips + trackpads, profile controls, dashboard and the KDE desktop. [`ui/SecondScreenPresentation.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/SecondScreenPresentation.kt) hosts them in a `Presentation`, with the bar in [`ui/BottomScreenBar.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomScreenBar.kt). The last mode is remembered once for game sessions and once for desktop sessions (`SessionPrefs.secondScreenPanel`), not per game. Outside a session the launcher shows [`ui/DualScreenPanel.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/DualScreenPanel.kt).
|
||||
|
||||
**Dashboard.** [`ui/BottomDashboard.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomDashboard.kt) has In-game stats, Downloads, Screenshots and Chat & voice. The tab is remembered per session and jumps to stats when a game starts. A strip of metrics ([`ui/BottomStrip.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomStrip.kt)) can sit on the other tabs.
|
||||
|
||||
**Displays.** [`input/DualScreen.kt`](../../app/src/main/java/com/droiddeck/launcher/input/DualScreen.kt) finds built-in presentation displays with their own touch panel. Sessions support Auto, On, Swapped (game on the bottom, [`ui/BottomGameScreen.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomGameScreen.kt)) and Off. The game is rendered by our compositor into a `SurfaceView` we own, not by a separate activity. [`input/BottomScreenGuests.kt`](../../app/src/main/java/com/droiddeck/launcher/input/BottomScreenGuests.kt) yields the screen when another app takes it.
|
||||
|
||||
**Data already available.**
|
||||
|
||||
- Frame times from gamescope's ring buffer ([`hud/GameFrames.kt`](../../app/src/main/java/com/droiddeck/launcher/hud/GameFrames.kt)), with lows, graph, focused app and refresh rate.
|
||||
- Device metrics ([`hud/HudMetrics.java`](../../app/src/main/java/com/droiddeck/launcher/hud/HudMetrics.java)): CPU/GPU load, clocks and temperatures, RAM, VRAM, network, battery with a runtime estimate, fan.
|
||||
- Game telemetry ([`session/GameTelemetry.kt`](../../app/src/main/java/com/droiddeck/launcher/session/GameTelemetry.kt)): racing UDP, War Thunder over local HTTP, Elite Dangerous status file.
|
||||
- Steam downloads from app manifests and `content_log.txt`, screenshots from DroidDeck and Steam, Steam chat in a WebView with the web-login cookies.
|
||||
- `AgentGuest.steamEval` runs `SteamClient.*` in Steam's UI. Only offline mode and live shortcuts use it today.
|
||||
- Per-game profiles ([`session/SelectedGameProfile.kt`](../../app/src/main/java/com/droiddeck/launcher/session/SelectedGameProfile.kt)) that follow the game Steam has focused (`GameProfileFollowState`).
|
||||
|
||||
**Gaps.**
|
||||
|
||||
- The panel does not follow the game: no per-game mode, tab or control layout.
|
||||
- With no game running, the stats card measures the Steam client.
|
||||
- No Steam achievements, friends or notifications on the bottom screen. Achievements exist only for Epic, GOG and EA. The 0.7.0 notes mention a notifications page that no longer exists.
|
||||
- No way to switch the bottom panel fully off or dim it when idle.
|
||||
- [`settings-map.md`](../settings-map.md) lists only "Dual screen launcher". Dual screen sessions, Show the game on, Bottom screen controls in games, Bottom screen HUD, Strip on every tab and Physical controls can use bottom screen are missing.
|
||||
|
||||
DroidDeck already has more on the bottom screen than any other project that runs PC games. What it lacks is context: it does not react to what is on top.
|
||||
|
||||
## Proposals
|
||||
|
||||
Ordered by value for effort. Each is independent unless noted.
|
||||
|
||||
### 1. Idle home page
|
||||
|
||||
**Status:** built as its own panel, Game art (Steam sessions), after a first version as a row on the dashboard was removed. The bottom screen shows the hero art of the running game, or the one selected in Big Picture, or the most recently played, with a slow pan and zoom, its logo, and play time; it cross-fades when the selection changes and starts with the bar hidden. Checked on a Retroid Pocket Duo Lite Plus. Code: [`ui/BottomArtPanel.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomArtPanel.kt), selection in [`ui/BottomIdleHome.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomIdleHome.kt).
|
||||
|
||||

|
||||
|
||||
When no game is focused, replace the Steam-client FPS card with a page about the game highlighted in Steam: art, play time, last played, achievement progress, and Play / Stream buttons. Add downloads in progress and friends online.
|
||||
|
||||
- Source: the Big Picture selection and app details through `steamEval`, as ArmadaLive does over the CEF port. Art from the existing `SteamGameArt`.
|
||||
- Open question: which `SteamClient` call or store gives the focused library item most reliably across client updates. ArmadaLive lists this as fragile; we need a fallback to the most recent game.
|
||||
|
||||
### 2. Per-game panel memory
|
||||
|
||||
**Status:** built. Picking a bottom mode or a dashboard tab while a game is focused saves it for that game (`secondScreenPanel.app.<id>`, `bottomPage.app.<id>`); focusing the game restores it, and returning to Steam restores the global choice. Resetting the game profile clears both. Control layouts already follow the game through input profiles. Not yet checked on hardware: launching a game on the test device would have signed out another session on the same Steam account.
|
||||
|
||||
Remember the bottom mode, dashboard tab and control layout per Steam app id, and restore them when that game gains focus. Fall back to today's global choice.
|
||||
|
||||
- Source: the focus already tracked for `GameProfileFollowState`. Store next to the game profile so Reset clears it.
|
||||
- Applies to swapped mode too, where the panel is on the top screen.
|
||||
|
||||
### 3. Steam achievements and notifications
|
||||
|
||||
**Status:** achievements built, as a section of the Guides panel rather than a dashboard tab. They are read from `SteamClient.Apps.GetMyAchievementsForApp` into the shared `StoreAchievements` model (same list and hidden-achievement handling as Epic and GOG); games without Steam stats show the empty state. Notifications are not started.
|
||||
|
||||
An achievements page for the running game (progress, recent unlocks, locked list with hidden descriptions behind a tap) and a notifications page (friends, invites, downloads finished).
|
||||
|
||||
- Source: `steamEval` against Steam's UI stores, which keep the last synced achievements while the device is offline. The Steam Web API is a fallback only when the device has a network but the Steam client is offline; with no network, the page shows the cached list or says achievements are unavailable.
|
||||
- Matches the existing Epic, GOG and EA achievement readers so all stores look the same.
|
||||
|
||||
### 4. Quick tiles and per-game rules
|
||||
|
||||
**Status:** not built. A first tile page was tried and removed: the in-game menu already has these controls, and a second copy on the dashboard did not fit the panel's style.
|
||||
|
||||
Rearrangeable tiles on the dashboard: FPS limit, 60/120 Hz, per-screen brightness, frame generation, screen effects, screenshot, swap screens, bottom screen off. A "Keep for this game" action saves the value into the game profile; settings that can make the device unusable revert after 15 s unless confirmed.
|
||||
|
||||
- Most of these are already per-game somewhere (frame generation, screen effects, FPS limit for non-Steam games). This exposes them where the user is looking during play.
|
||||
|
||||
### 5. Bottom screen off and auto-dim
|
||||
|
||||
**Status:** built and checked on a Retroid Pocket Duo Lite Plus, where the window brightness override is per display: screen off sets the bottom display to 0.0 and auto-dim to 0.05 (`mBrightnessReason=override(com.droiddeck.launcher)`), while the top display stays at the user's manual level. Every panel's bar has a sun button that drops down a brightness slider for the bottom screen only (5–100 %, saved; it never reaches 0) with the screen-off button at its end: the panel goes black and asks for the lowest window brightness (`BRIGHTNESS_OVERRIDE_OFF`); a touch wakes it to the chosen level, and the waking touch does not reach the panel. Auto-dim never brightens a level set below it. The dashboard dims after 60 s without touch (pref `bottomAutoDim`, on by default); trackpad and keyboard panels never dim. Hardware buttons are not claimed.
|
||||
|
||||
- A real off state for the bottom panel during a game (the backlight off, not a black Presentation), toggled from the bar or a button hold.
|
||||
- Dim after a period without touch, wake on touch. Off by default for the trackpad and keyboard modes.
|
||||
- Investigate which hardware buttons we can claim on the Thor and Duo without fighting the stock assistant.
|
||||
|
||||
**Bar:** every panel's bar can be hidden with its chevron button; a pull tab at the top edge brings it back by a tap or a pull down. Game art, a page open in the Guides reader and a pinned map hide it on their own, and leaving them shows it again.
|
||||
|
||||
| Brightness | Bar hidden |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
|
||||
### 6. Region mirror from our compositor
|
||||
|
||||
**Status:** milestone 1 built as its own bottom-screen panel (Mirror in the panel picker): the live region fills the panel, and Region, Top screen (shown, hidden or dimmed) and Scaling open as a card from the bar's options button. Checked on a Retroid Pocket Duo Lite Plus; see the region mirror doc.
|
||||
|
||||
Crop rectangles of the game image (minimap, HUD, ability bars) onto the bottom screen, saved per game, optionally hidden on the top screen. Other Thor tools need MediaProjection or a privileged helper and cannot hide the original; our compositor has the game image before display, so it can do both with no permission prompt. Recommended path: a second output in `vk_present` that blits region sub-rectangles, with zero-copy layers later.
|
||||
|
||||
Details: [bottom-screen-region-mirror.md](bottom-screen-region-mirror.md).
|
||||
|
||||
### 7. Guides panel
|
||||
|
||||
**Status:** milestones 1 and 4 built as their own bottom-screen panel (Guides in the panel picker), checked on a Retroid Pocket Duo Lite Plus. Five sections, switched with the app's tab strip and LB/RB, for the running game or the one selected in Steam: Guides (top-rated Steam guides in the device's language with a category choice and Continue reading), Achievements, Wiki & fixes (ProtonDB tier, and the wiki, StrategyWiki, PCGamingWiki, GameFAQs, IGN and HowLongToBeat through Wikidata; what Wikidata lacks is found from each site's own routes, such as Map Genie and IGN wiki slugs, Fandom's API and StrategyWiki's search API, so every row opens the page itself rather than a web search; only YouTube walkthroughs stay a search), Maps (images pinned by long-press, with zoom and markers per map, and the game's Map Genie page) and Saved (web archives for offline reading). The reader never takes focus, blocks common ad hosts and stays on the opened site unless the user follows a link. Code: [`session/SteamGuides.kt`](../../app/src/main/java/com/droiddeck/launcher/session/SteamGuides.kt), [`session/GameLinks.kt`](../../app/src/main/java/com/droiddeck/launcher/session/GameLinks.kt), [`ui/BottomGuidesPage.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomGuidesPage.kt).
|
||||
|
||||
A per-game tab with Steam Community guides for the exact app id, Steam achievements as a spoiler-safe checklist, the game's wiki and fixes (found through Wikidata), saved pages for offline use, and a workspace that reopens at the last section. It must never take focus from the game, and pauses pages it is not showing.
|
||||
|
||||
Details: [bottom-screen-guides.md](bottom-screen-guides.md).
|
||||
|
||||
### 8. Companion API for PC games
|
||||
|
||||
**Status:** not built here; the first adapters (Stardew Valley, Skyrim SE, Fallout 4) follow in their own change.
|
||||
|
||||
Let mods running in Proton drive native bottom-screen pages over loopback. Thor Pip-Boy (Fallout 4) and Grand Theft Companion (GTA) already run against DroidDeck as separate apps, and the Stardew, Skyrim and RimWorld ecosystems have servers we can adapt to. Plan: adapters for those first, then DroidDeck's own token-authenticated protocol with declarative pages and normalized state keys, then "run on bottom", then memory profiles only if needed. The existing racing, War Thunder and Elite Dangerous telemetry is the first set of built-in adapters.
|
||||
|
||||
### 9. Steam's Quick Access menu on the bottom screen
|
||||
|
||||
**Status:** built as its own panel (Quick Access in the panel picker, Steam sessions only) and checked on a Retroid Pocket Duo Lite Plus in Big Picture and in a game. The bottom screen shows Steam's real Quick Access menu: notifications, friends and chat, quick settings, performance, soundtracks and help, plus Decky Loader's tab and its plugins when Decky is enabled. Taps, drags and scrolling go to it; the controller stays on the top screen, so the d-pad drives the library or the game while the menu stays open. Code: [`session/SteamQam.kt`](../../app/src/main/java/com/droiddeck/launcher/session/SteamQam.kt), [`ui/BottomSteamQamPanel.kt`](../../app/src/main/java/com/droiddeck/launcher/ui/BottomSteamQamPanel.kt), [`droiddeck-qam-relay`](../../tools/linuxfs/overlay/usr/local/bin/droiddeck-qam-relay).
|
||||
|
||||
Plugin loaders expose Steam's CEF DevTools so the menu can be viewed in a desktop browser, but it renders only while it is open on the main screen. The panel keeps it open without covering the top screen:
|
||||
|
||||
- Steam's UI is told to open the menu and keep it open: its composition request is capped at "notification" while the menu is ours, so gamescope keeps focus on the game, and losing focus no longer closes it. Gamepad focus moves from the menu back to the main UI only when the menu took it, so Steam's own popups keep the controller. The blurred backdrop is hidden.
|
||||
- The menu's browser view is placed just outside the Big Picture window through its own `SetBounds`, so it keeps rendering but never shows on top, including while Steam slides it wider for Friends and chat. The view is also given the panel's shape (about 712 × 463 instead of Steam's 856 × 463), so every tab shows at one scale. In Full width, a style on the menu page also lifts Steam's 300 px cap on each tab, so every tab fills the panel and Friends shows its list and chat side by side.
|
||||
- A timer inside Steam keeps this state every 250 ms, so the menu comes back, on the tab it was showing, as soon as Steam's main menu or a full-screen page such as Decky's store closes. It runs on a 5 s lease that the panel renews each second: if the app stops, Steam returns to normal by itself.
|
||||
- The hold starts only once the session is ready: holding the menu before Steam's first frame kept gamescope from presenting anything.
|
||||
- `droiddeck-qam-relay` relays the app to the DevTools port, which only answers clients inside the guest. The panel streams the menu with `Page.startScreencast`, scales its content to the panel and fills the rest with the menu's own background, and forwards touches on the menu with `Input.dispatchTouchEvent`. A layout button in the panel's bar cycles Full width (every tab stretched to the panel), Left, Center and Right (Steam's own narrow tabs, placed on that side); the choice is kept. Returning to the panel shows the last frame at once while the stream reconnects, and the first frame after a cold start takes about 1.4 s.
|
||||
- The Quick Access button still shows the menu on the top screen, in Steam's own layout and with the controller; closing it there (B or the button again) returns it to the bottom screen on the same tab.
|
||||
- Leaving the panel closes the menu and turns the patches off; the Steam button and the normal Quick Access button then work as before. Opening Steam's main menu replaces the Quick Access menu for as long as it is open, as on a Deck.
|
||||
|
||||
Checked with Decky Loader 3.3.1 enabled: its tab renders and takes touch, and its store opens full screen on top with the controller, then returns to the Decky tab below. Decky hooks the menu after Steam starts, so the panel reopens it once when that happens.
|
||||
|
||||
Limits: it relies on Steam's minified UI stores and method names, so a client update can break it; the panel then shows that the menu is not available.
|
||||
|
||||
| Big Picture, friends | In game, performance | In game, quick settings |
|
||||
| --- | --- | --- |
|
||||
|  |  |  |
|
||||
|
||||
| Decky | Performance |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
|
||||
| Layout: Center | Layout: Right |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
|
||||
The top screen during that game, with the menu open on the bottom: 
|
||||
|
||||
## Related fixes
|
||||
|
||||
- Add the missing dual-screen settings to `SettingsIndex` and regenerate [`settings-map.md`](../settings-map.md).
|
||||
- Reproduce a first install on a Thor from a clean state, including with Steam on the SD card, against 0.7.11 to confirm the reported freeze is gone.
|
||||
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 341 KiB |
|
After Width: | Height: | Size: 760 KiB |
|
After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 642 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 463 KiB |
|
After Width: | Height: | Size: 359 KiB |
|
After Width: | Height: | Size: 265 KiB |
|
After Width: | Height: | Size: 486 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 285 KiB |
|
After Width: | Height: | Size: 215 KiB |
|
After Width: | Height: | Size: 162 KiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 792 KiB |
@@ -0,0 +1,195 @@
|
||||
#!/usr/bin/python3
|
||||
# Relays the app to Steam's DevTools port, which only answers clients inside the guest, while the bottom screen
|
||||
# shows Steam's quick access menu. Only requests carrying the secret printed at start reach DevTools, and only for
|
||||
# the target list and page sockets, so other local apps cannot use the relay to reach Steam.
|
||||
# droiddeck-qam-relay start <devtools port> prints the relay port and its secret
|
||||
# droiddeck-qam-relay stop [<relay port>] stops the relay, or only the one on that port
|
||||
|
||||
import contextlib
|
||||
import hmac
|
||||
import os
|
||||
import re
|
||||
import secrets
|
||||
import socket
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
|
||||
try:
|
||||
import fcntl
|
||||
except ImportError:
|
||||
fcntl = None
|
||||
|
||||
FLAG = "/tmp/.dd-qam-relay"
|
||||
INTERVAL = 0.5
|
||||
MAX_SECONDS = 6 * 3600
|
||||
IDLE_SECONDS = 30
|
||||
HEAD_SECONDS = 3
|
||||
UNVERIFIED = threading.BoundedSemaphore(8)
|
||||
ALLOWED = re.compile(r"^/(json|json/list|devtools/page/[A-Za-z0-9-]+)$")
|
||||
|
||||
|
||||
class Activity:
|
||||
def __init__(self):
|
||||
self.lock = threading.Lock()
|
||||
self.open = 0
|
||||
self.last = time.monotonic()
|
||||
|
||||
def change(self, delta):
|
||||
with self.lock:
|
||||
self.open += delta
|
||||
self.last = time.monotonic()
|
||||
|
||||
def idle(self):
|
||||
with self.lock:
|
||||
return self.open == 0 and time.monotonic() - self.last > IDLE_SECONDS
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def flag_lock():
|
||||
"""Serializes reading, removing and publishing the owner record, so a stop cannot remove a newer relay's record."""
|
||||
if fcntl is None:
|
||||
yield
|
||||
return
|
||||
fd = os.open(FLAG + ".lock", os.O_CREAT | os.O_RDWR, 0o600)
|
||||
try:
|
||||
fcntl.flock(fd, fcntl.LOCK_EX)
|
||||
yield
|
||||
finally:
|
||||
os.close(fd)
|
||||
|
||||
|
||||
def owner():
|
||||
try:
|
||||
with open(FLAG) as f:
|
||||
return f.read().split()
|
||||
except OSError:
|
||||
return []
|
||||
|
||||
|
||||
def pipe(src, dst):
|
||||
try:
|
||||
while True:
|
||||
data = src.recv(65536)
|
||||
if not data:
|
||||
break
|
||||
dst.sendall(data)
|
||||
except OSError:
|
||||
pass
|
||||
for s in (src, dst):
|
||||
try:
|
||||
s.shutdown(socket.SHUT_RDWR)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
def rewrite(head, token):
|
||||
"""Returns the request with the secret removed from its path, or None when it is not an allowed request."""
|
||||
line, sep, rest = head.partition(b"\r\n")
|
||||
parts = line.split(b" ")
|
||||
if not sep or len(parts) != 3 or parts[0] != b"GET" or not parts[2].startswith(b"HTTP/1."):
|
||||
return None
|
||||
prefix = b"/" + token.encode()
|
||||
path = parts[1]
|
||||
if not hmac.compare_digest(path[:len(prefix)], prefix) or not ALLOWED.match(path[len(prefix):].decode("ascii", "replace")):
|
||||
return None
|
||||
return b"GET " + path[len(prefix):] + b" " + parts[2] + sep + rest
|
||||
|
||||
|
||||
def handle(client, devtools_port, token, activity):
|
||||
activity.change(1)
|
||||
verifying = True
|
||||
try:
|
||||
deadline = time.monotonic() + HEAD_SECONDS
|
||||
head = b""
|
||||
while b"\r\n" not in head and len(head) < 4096:
|
||||
left = deadline - time.monotonic()
|
||||
if left <= 0:
|
||||
return
|
||||
client.settimeout(left)
|
||||
data = client.recv(4096)
|
||||
if not data:
|
||||
break
|
||||
head += data
|
||||
request = rewrite(head, token)
|
||||
UNVERIFIED.release()
|
||||
verifying = False
|
||||
if request is None:
|
||||
client.sendall(b"HTTP/1.1 403 Forbidden\r\nContent-Length: 0\r\nConnection: close\r\n\r\n")
|
||||
return
|
||||
client.settimeout(None)
|
||||
upstream = socket.create_connection(("127.0.0.1", devtools_port), 3)
|
||||
# The connect deadline must not end a quiet DevTools socket.
|
||||
upstream.settimeout(None)
|
||||
upstream.sendall(request)
|
||||
back = threading.Thread(target=pipe, args=(upstream, client), daemon=True)
|
||||
back.start()
|
||||
pipe(client, upstream)
|
||||
back.join()
|
||||
except OSError:
|
||||
pass
|
||||
finally:
|
||||
if verifying:
|
||||
UNVERIFIED.release()
|
||||
client.close()
|
||||
activity.change(-1)
|
||||
|
||||
|
||||
def relay(server, devtools_port, token, activity):
|
||||
while True:
|
||||
try:
|
||||
client, _ = server.accept()
|
||||
except OSError:
|
||||
return
|
||||
# Connections that have not shown the secret yet are capped, so they cannot use up threads.
|
||||
if not UNVERIFIED.acquire(blocking=False):
|
||||
client.close()
|
||||
continue
|
||||
threading.Thread(target=handle, args=(client, devtools_port, token, activity), daemon=True).start()
|
||||
|
||||
|
||||
def serve(server, devtools_port, me, token):
|
||||
activity = Activity()
|
||||
threading.Thread(target=relay, args=(server, devtools_port, token, activity), daemon=True).start()
|
||||
started = time.monotonic()
|
||||
while owner()[:1] == [me] and time.monotonic() - started < MAX_SECONDS and not activity.idle():
|
||||
time.sleep(INTERVAL)
|
||||
server.close()
|
||||
|
||||
|
||||
def main():
|
||||
command = sys.argv[1] if len(sys.argv) > 1 else ""
|
||||
if command == "stop" and len(sys.argv) in (2, 3):
|
||||
with flag_lock():
|
||||
if len(sys.argv) == 3 and owner()[1:] != [sys.argv[2]]:
|
||||
return 0
|
||||
try:
|
||||
os.unlink(FLAG)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
return 0
|
||||
if command != "start" or len(sys.argv) != 3:
|
||||
print("usage: droiddeck-qam-relay start <devtools port> | stop [<relay port>]", file=sys.stderr)
|
||||
return 2
|
||||
devtools_port = int(sys.argv[2])
|
||||
server = socket.socket()
|
||||
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
server.bind(("127.0.0.1", 0))
|
||||
server.listen(4)
|
||||
token = secrets.token_hex(16)
|
||||
print(server.getsockname()[1], token, flush=True)
|
||||
if os.fork():
|
||||
return 0
|
||||
os.setsid()
|
||||
me = str(os.getpid())
|
||||
with flag_lock(), open(FLAG, "w") as f:
|
||||
f.write("%s %d" % (me, server.getsockname()[1]))
|
||||
devnull = os.open(os.devnull, os.O_RDWR)
|
||||
for fd in (0, 1, 2):
|
||||
os.dup2(devnull, fd)
|
||||
serve(server, devtools_port, me, token)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||