mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
Rename the app SteamDeck → DroidDeck
App name, app ID and code package: DroidDeck, com.droiddeck.launcher (sources moved to com/droiddeck/launcher, the 68 JNI functions renamed with them). The new app ID installs beside SteamDeck rather than over it. Everywhere the name was the app's own: the sidebar title, the session report, share zips, the shell title, wake-lock and log tags, User-Agents, the Compose theme, the Download folder and switch files (droiddeck-env, -osc, -driver, -tu-debug, -no-pad, -pad-log, -no-hud, -wlr-renderer; the old names are not read), and inside the runtime (droiddeck-desktop, Firefox's droiddeck.js, the shortcuts tag, the rumble socket, debug and cache paths). Build scripts, CI artifact (droiddeck-apk), CMake project, README and the progress log follow. Kept on purpose: Valve's Steam Deck (the -steamdeck flag, steamdeck_publicbeta/stable, 'Steam Deck mode', the steamos.cloud package URLs) and names inside the hosted desktop package (steamdeck.png, steamdeck-steam, steamdeck-bigpicture). 'Desktop installed' now tests for labwc instead of the launcher the app stages itself. A committed __pycache__ .pyc is removed.
This commit is contained in:
1 parent
bd51571530
commit
ae6dcc9798
118 files changed
+498
-487
No files matched your search
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.steamdeck.launcher
|
||||
package com.droiddeck.launcher
|
||||
|
||||
import android.app.Application
|
||||
import com.steamdeck.launcher.session.CrashHandler
|
||||
import com.droiddeck.launcher.session.CrashHandler
|
||||
|
||||
/** Process-wide setup: the crash handler, so a session's folder is finished even when we die. */
|
||||
class App : Application() {
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
package com.steamdeck.launcher
|
||||
package com.droiddeck.launcher
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.steamdeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
|
||||
/** Receives the system Home launch and routes it without consuming KEYCODE_HOME. */
|
||||
class HomeActivity : Activity() {
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher
|
||||
package com.droiddeck.launcher
|
||||
|
||||
import android.app.role.RoleManager
|
||||
import android.graphics.Bitmap
|
||||
@@ -9,8 +9,8 @@ import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import android.provider.Settings
|
||||
import androidx.core.graphics.drawable.toBitmap
|
||||
import com.steamdeck.launcher.session.SessionService
|
||||
import com.steamdeck.launcher.session.SessionState
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
|
||||
/** Android Home role and the launchable Android apps shown by the in-session app drawer. */
|
||||
object HomeApp {
|
||||
+54
-54
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher
|
||||
package com.droiddeck.launcher
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Intent
|
||||
@@ -18,42 +18,42 @@ import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableIntStateOf
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import com.steamdeck.launcher.gpu.FrameGen
|
||||
import com.steamdeck.launcher.gpu.LinuxVulkanDriver
|
||||
import com.steamdeck.launcher.gpu.LinuxVulkanDriverManager
|
||||
import com.steamdeck.launcher.gpu.TurnipDriver
|
||||
import com.steamdeck.launcher.gpu.TurnipReleases
|
||||
import com.steamdeck.launcher.gpu.LsfgNative
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntime
|
||||
import com.steamdeck.launcher.runtime.DesktopCatalog
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntimeInstaller
|
||||
import com.steamdeck.launcher.session.SessionService
|
||||
import com.steamdeck.launcher.ui.PackageRow
|
||||
import com.steamdeck.launcher.session.OfflineMode
|
||||
import com.steamdeck.launcher.session.ProtonExtras
|
||||
import com.steamdeck.launcher.session.SessionLogShare
|
||||
import com.steamdeck.launcher.session.SessionPrefs
|
||||
import com.steamdeck.launcher.ui.ProtonPage
|
||||
import com.steamdeck.launcher.ui.ProtonRow
|
||||
import com.steamdeck.launcher.core.CpuCores
|
||||
import com.steamdeck.launcher.ui.CoreRow
|
||||
import com.steamdeck.launcher.ui.PerformancePage
|
||||
import com.steamdeck.launcher.ui.ModeSettingsPage
|
||||
import com.steamdeck.launcher.ui.ModeSettings
|
||||
import com.steamdeck.launcher.ui.ModeSettingsActions
|
||||
import com.steamdeck.launcher.ui.DriverRow
|
||||
import com.steamdeck.launcher.ui.ConfirmDialog
|
||||
import com.steamdeck.launcher.ui.CreditsDialog
|
||||
import com.steamdeck.launcher.ui.FrontEndScreen
|
||||
import com.steamdeck.launcher.ui.FrontEndState
|
||||
import com.steamdeck.launcher.ui.FrontEndActions
|
||||
import com.steamdeck.launcher.frontend.Library
|
||||
import com.steamdeck.launcher.ui.SteamDeckTheme
|
||||
import com.steamdeck.launcher.ui.RomsDialog
|
||||
import com.steamdeck.launcher.files.InAppFilePicker
|
||||
import com.steamdeck.launcher.session.SessionArtifacts
|
||||
import com.steamdeck.launcher.session.SessionState
|
||||
import com.steamdeck.launcher.session.GameStorage
|
||||
import com.droiddeck.launcher.gpu.FrameGen
|
||||
import com.droiddeck.launcher.gpu.LinuxVulkanDriver
|
||||
import com.droiddeck.launcher.gpu.LinuxVulkanDriverManager
|
||||
import com.droiddeck.launcher.gpu.TurnipDriver
|
||||
import com.droiddeck.launcher.gpu.TurnipReleases
|
||||
import com.droiddeck.launcher.gpu.LsfgNative
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.runtime.DesktopCatalog
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntimeInstaller
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.ui.PackageRow
|
||||
import com.droiddeck.launcher.session.OfflineMode
|
||||
import com.droiddeck.launcher.session.ProtonExtras
|
||||
import com.droiddeck.launcher.session.SessionLogShare
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.ui.ProtonPage
|
||||
import com.droiddeck.launcher.ui.ProtonRow
|
||||
import com.droiddeck.launcher.core.CpuCores
|
||||
import com.droiddeck.launcher.ui.CoreRow
|
||||
import com.droiddeck.launcher.ui.PerformancePage
|
||||
import com.droiddeck.launcher.ui.ModeSettingsPage
|
||||
import com.droiddeck.launcher.ui.ModeSettings
|
||||
import com.droiddeck.launcher.ui.ModeSettingsActions
|
||||
import com.droiddeck.launcher.ui.DriverRow
|
||||
import com.droiddeck.launcher.ui.ConfirmDialog
|
||||
import com.droiddeck.launcher.ui.CreditsDialog
|
||||
import com.droiddeck.launcher.ui.FrontEndScreen
|
||||
import com.droiddeck.launcher.ui.FrontEndState
|
||||
import com.droiddeck.launcher.ui.FrontEndActions
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import com.droiddeck.launcher.ui.DroidDeckTheme
|
||||
import com.droiddeck.launcher.ui.RomsDialog
|
||||
import com.droiddeck.launcher.files.InAppFilePicker
|
||||
import com.droiddeck.launcher.session.SessionArtifacts
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
import com.droiddeck.launcher.session.GameStorage
|
||||
|
||||
/**
|
||||
* The whole app outside a session: is the runtime installed, is there a newer one, frame
|
||||
@@ -107,8 +107,8 @@ class MainActivity : ComponentActivity() {
|
||||
private var mic by mutableStateOf(false)
|
||||
private var linuxRows by mutableStateOf<List<DriverRow>>(emptyList())
|
||||
/** The latest Banners-Turnip release as each driver menu offers it (see [refreshReleaseRows]). */
|
||||
private var linuxDownloads by mutableStateOf<List<com.steamdeck.launcher.ui.DownloadRow>>(emptyList())
|
||||
private var androidDownloads by mutableStateOf<List<com.steamdeck.launcher.ui.DownloadRow>>(emptyList())
|
||||
private var linuxDownloads by mutableStateOf<List<com.droiddeck.launcher.ui.DownloadRow>>(emptyList())
|
||||
private var androidDownloads by mutableStateOf<List<com.droiddeck.launcher.ui.DownloadRow>>(emptyList())
|
||||
private var releaseStatus by mutableStateOf("Not checked yet - tap refresh to look for new drivers")
|
||||
private var releaseChecking by mutableStateOf(false)
|
||||
private var canRestoreBundled by mutableStateOf(false)
|
||||
@@ -149,7 +149,7 @@ class MainActivity : ComponentActivity() {
|
||||
private var addedGamesDirs by mutableStateOf<List<String>>(emptyList())
|
||||
private var addedGamesArt by mutableStateOf(true)
|
||||
@Volatile private var artFetchRunning = false
|
||||
private var addedGames by mutableStateOf<List<com.steamdeck.launcher.ui.AddedGameRow>>(emptyList())
|
||||
private var addedGames by mutableStateOf<List<com.droiddeck.launcher.ui.AddedGameRow>>(emptyList())
|
||||
private val pickRomsDir = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { r ->
|
||||
if (r.resultCode == RESULT_OK) InAppFilePicker.pickedPath(r.data)?.let { path ->
|
||||
SessionPrefs.setRomsDir(this, path)
|
||||
@@ -211,7 +211,7 @@ class MainActivity : ComponentActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
theme = SessionPrefs.theme(this)
|
||||
setContent {
|
||||
SteamDeckTheme(theme) {
|
||||
DroidDeckTheme(theme) {
|
||||
val sm = settingsMode
|
||||
val page: (@Composable () -> Unit)? = when {
|
||||
sm != null -> { { ModeSettingsHost(sm) } }
|
||||
@@ -277,7 +277,7 @@ class MainActivity : ComponentActivity() {
|
||||
onProtons = { openProtons() },
|
||||
onPerformance = { refreshCores(); showProtons = false; showPerformance = true },
|
||||
onRoms = { showRoms = true },
|
||||
onFiles = { startActivity(Intent(this, com.steamdeck.launcher.files.FileManagerActivity::class.java)) },
|
||||
onFiles = { startActivity(Intent(this, com.droiddeck.launcher.files.FileManagerActivity::class.java)) },
|
||||
onLogs = {
|
||||
SessionPrefs.setLogsEnabled(this, !SessionPrefs.logsEnabled(this))
|
||||
logsEnabled = SessionPrefs.logsEnabled(this)
|
||||
@@ -315,7 +315,7 @@ class MainActivity : ComponentActivity() {
|
||||
showNonAdreno?.let { release ->
|
||||
ConfirmDialog(
|
||||
title = "Not an Adreno GPU",
|
||||
text = "Turnip supports Adreno GPUs. On ${com.steamdeck.launcher.core.DeviceSupport.gpuName()}, Steam may show a black screen. Download: ${"%.0f".format(release.size / 1e6)} MB.",
|
||||
text = "Turnip supports Adreno GPUs. On ${com.droiddeck.launcher.core.DeviceSupport.gpuName()}, Steam may show a black screen. Download: ${"%.0f".format(release.size / 1e6)} MB.",
|
||||
confirm = "Install anyway",
|
||||
onConfirm = { showNonAdreno = null; install(release) },
|
||||
onDismiss = { showNonAdreno = null },
|
||||
@@ -607,8 +607,8 @@ class MainActivity : ComponentActivity() {
|
||||
|
||||
/** The added games as the settings page lists them; a scan of the folder, on this thread (one level, small). */
|
||||
private fun refreshAddedGames() {
|
||||
addedGames = com.steamdeck.launcher.frontend.AddedGames.scan(this).map { g ->
|
||||
com.steamdeck.launcher.ui.AddedGameRow(g.folder.path, g.folderName(), g.exe.path, g.exe.name, g.candidates.map { c -> c.path to c.name }.distinctBy { it.first })
|
||||
addedGames = com.droiddeck.launcher.frontend.AddedGames.scan(this).map { g ->
|
||||
com.droiddeck.launcher.ui.AddedGameRow(g.folder.path, g.folderName(), g.exe.path, g.exe.name, g.candidates.map { c -> c.path to c.name }.distinctBy { it.first })
|
||||
}
|
||||
// Art the games do not have yet, from Steam's store, off the main thread; the rail
|
||||
// redraws when something arrives.
|
||||
@@ -616,8 +616,8 @@ class MainActivity : ComponentActivity() {
|
||||
artFetchRunning = true
|
||||
Thread({
|
||||
try {
|
||||
val games = com.steamdeck.launcher.frontend.AddedGames.scan(this)
|
||||
if (com.steamdeck.launcher.frontend.AddedGameArt.fetchMissing(this, games)) ui.post { refresh() }
|
||||
val games = com.droiddeck.launcher.frontend.AddedGames.scan(this)
|
||||
if (com.droiddeck.launcher.frontend.AddedGameArt.fetchMissing(this, games)) ui.post { refresh() }
|
||||
} finally {
|
||||
artFetchRunning = false
|
||||
}
|
||||
@@ -637,7 +637,7 @@ class MainActivity : ComponentActivity() {
|
||||
refreshAddedGames()
|
||||
shapeMode = SessionPrefs.shapeMode(this)
|
||||
hdrOn = SessionPrefs.hdr(this, mode)
|
||||
hdrReason = com.steamdeck.launcher.wayland.HdrSupport.probe(this).reason
|
||||
hdrReason = com.droiddeck.launcher.wayland.HdrSupport.probe(this).reason
|
||||
touchMode = SessionPrefs.touchMode(this)
|
||||
suspendPolicy = SessionPrefs.suspendPolicy(this, mode)
|
||||
oscMode = SessionPrefs.oscMode(this)
|
||||
@@ -753,7 +753,7 @@ class MainActivity : ComponentActivity() {
|
||||
.filter { a -> TurnipReleases.installedId(this, a) { id -> if (linux) lm.isInstalled(id) else td.isInstalled(id) } == null }
|
||||
.map { a ->
|
||||
val mb = "%.1f MB".format(a.size / 1_048_576.0)
|
||||
com.steamdeck.launcher.ui.DownloadRow(a.name, "${a.source} ${a.tag}", "${a.label} · $mb", releaseProgress[a.name])
|
||||
com.droiddeck.launcher.ui.DownloadRow(a.name, "${a.source} ${a.tag}", "${a.label} · $mb", releaseProgress[a.name])
|
||||
}
|
||||
linuxDownloads = rows(linux = true)
|
||||
androidDownloads = rows(linux = false)
|
||||
@@ -815,7 +815,7 @@ class MainActivity : ComponentActivity() {
|
||||
Log.w(TAG, "release driver download", e)
|
||||
"Download failed: ${e.message}"
|
||||
} finally {
|
||||
file?.let { com.steamdeck.launcher.core.FileUtils.delete(it) }
|
||||
file?.let { com.droiddeck.launcher.core.FileUtils.delete(it) }
|
||||
}
|
||||
ui.post {
|
||||
releaseProgress.remove(assetName)
|
||||
@@ -880,8 +880,8 @@ class MainActivity : ComponentActivity() {
|
||||
} else null
|
||||
// The libraries, off the main thread: manifests and a folder scan.
|
||||
Thread({
|
||||
val games = if (ready) Library.steamGames(this) + com.steamdeck.launcher.frontend.AddedGames.scan(this).map { g ->
|
||||
com.steamdeck.launcher.frontend.AddedGameArt.resolve(this, g).let { art -> Library.SteamGame(g.appId.toInt(), g.name, art.portrait ?: art.header, "added", g.gameId) }
|
||||
val games = if (ready) Library.steamGames(this) + com.droiddeck.launcher.frontend.AddedGames.scan(this).map { g ->
|
||||
com.droiddeck.launcher.frontend.AddedGameArt.resolve(this, g).let { art -> Library.SteamGame(g.appId.toInt(), g.name, art.portrait ?: art.header, "added", g.gameId) }
|
||||
} else emptyList()
|
||||
val emus = Library.emulators(this) { id -> DesktopCatalog.installed(this, id) != null }
|
||||
ui.post { steamGames = games; emulatorList = emus }
|
||||
@@ -903,13 +903,13 @@ class MainActivity : ComponentActivity() {
|
||||
// The runtime draws with Turnip, an Adreno driver: on Mali, Xclipse or PowerVR the
|
||||
// compositor gets no usable Vulkan device and a session is sound over a black screen.
|
||||
// Said before the download, not after it; the user may still go ahead.
|
||||
if (installed == null && !com.steamdeck.launcher.core.DeviceSupport.adreno()) { showNonAdreno = release; return }
|
||||
if (installed == null && !com.droiddeck.launcher.core.DeviceSupport.adreno()) { showNonAdreno = release; return }
|
||||
install(release)
|
||||
}
|
||||
|
||||
/** Starts a session; with no runtime on a non-Adreno, the same warning Setup gives comes first, before any download. */
|
||||
private fun startSession(intent: Intent) {
|
||||
val warn = installed == null && !com.steamdeck.launcher.core.DeviceSupport.adreno()
|
||||
val warn = installed == null && !com.droiddeck.launcher.core.DeviceSupport.adreno()
|
||||
if (warn && available != null) showNonAdreno = available
|
||||
else startActivity(intent)
|
||||
}
|
||||
+47
-47
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher
|
||||
package com.droiddeck.launcher
|
||||
|
||||
import android.hardware.input.InputManager
|
||||
import android.hardware.display.DisplayManager
|
||||
@@ -25,38 +25,38 @@ import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.ComposeView
|
||||
import com.steamdeck.launcher.core.FileUtils
|
||||
import com.steamdeck.launcher.gpu.FrameGen
|
||||
import com.steamdeck.launcher.gpu.LsfgNative
|
||||
import com.steamdeck.launcher.gpu.TurnipDriver
|
||||
import com.steamdeck.launcher.input.EvdevKeys
|
||||
import com.steamdeck.launcher.input.KeyboardHost
|
||||
import com.steamdeck.launcher.input.OnScreenControls
|
||||
import com.steamdeck.launcher.input.PadBridge
|
||||
import com.steamdeck.launcher.input.PointerGestures
|
||||
import com.steamdeck.launcher.input.SecondScreenDisplay
|
||||
import com.steamdeck.launcher.input.SecondScreenMode
|
||||
import com.steamdeck.launcher.input.TouchpadGestures
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntime
|
||||
import com.steamdeck.launcher.session.LoadingState
|
||||
import com.steamdeck.launcher.session.PerfHints
|
||||
import com.steamdeck.launcher.session.PerfHud
|
||||
import com.steamdeck.launcher.session.PerfMode
|
||||
import com.steamdeck.launcher.session.SessionPrefs
|
||||
import com.steamdeck.launcher.session.SessionPaths
|
||||
import com.steamdeck.launcher.wayland.HdrSupport
|
||||
import com.steamdeck.launcher.session.SessionService
|
||||
import com.steamdeck.launcher.session.SessionState
|
||||
import com.steamdeck.launcher.ui.CursorOverlay
|
||||
import com.steamdeck.launcher.ui.DrawerActions
|
||||
import com.steamdeck.launcher.ui.HudText
|
||||
import com.steamdeck.launcher.ui.LoadingOverlay
|
||||
import com.steamdeck.launcher.ui.SessionDrawer
|
||||
import com.steamdeck.launcher.ui.SessionPausedOverlay
|
||||
import com.steamdeck.launcher.ui.SecondScreenPresentation
|
||||
import com.steamdeck.launcher.ui.SteamDeckTheme
|
||||
import com.steamdeck.launcher.wayland.CompositorHost
|
||||
import com.steamdeck.launcher.wayland.WaylandCompositor
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.gpu.FrameGen
|
||||
import com.droiddeck.launcher.gpu.LsfgNative
|
||||
import com.droiddeck.launcher.gpu.TurnipDriver
|
||||
import com.droiddeck.launcher.input.EvdevKeys
|
||||
import com.droiddeck.launcher.input.KeyboardHost
|
||||
import com.droiddeck.launcher.input.OnScreenControls
|
||||
import com.droiddeck.launcher.input.PadBridge
|
||||
import com.droiddeck.launcher.input.PointerGestures
|
||||
import com.droiddeck.launcher.input.SecondScreenDisplay
|
||||
import com.droiddeck.launcher.input.SecondScreenMode
|
||||
import com.droiddeck.launcher.input.TouchpadGestures
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.session.LoadingState
|
||||
import com.droiddeck.launcher.session.PerfHints
|
||||
import com.droiddeck.launcher.session.PerfHud
|
||||
import com.droiddeck.launcher.session.PerfMode
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.session.SessionPaths
|
||||
import com.droiddeck.launcher.wayland.HdrSupport
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
import com.droiddeck.launcher.ui.CursorOverlay
|
||||
import com.droiddeck.launcher.ui.DrawerActions
|
||||
import com.droiddeck.launcher.ui.HudText
|
||||
import com.droiddeck.launcher.ui.LoadingOverlay
|
||||
import com.droiddeck.launcher.ui.SessionDrawer
|
||||
import com.droiddeck.launcher.ui.SessionPausedOverlay
|
||||
import com.droiddeck.launcher.ui.SecondScreenPresentation
|
||||
import com.droiddeck.launcher.ui.DroidDeckTheme
|
||||
import com.droiddeck.launcher.wayland.CompositorHost
|
||||
import com.droiddeck.launcher.wayland.WaylandCompositor
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
@@ -155,9 +155,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
|
||||
loading = LoadingState(this)
|
||||
if (!SessionState.running) {
|
||||
val needRuntime = com.steamdeck.launcher.runtime.LinuxRuntimeInstaller.installedVersion(this) == null
|
||||
val needRuntime = com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.installedVersion(this) == null
|
||||
val needDesktop = intent.getStringExtra(SessionService.EXTRA_MODE) == SessionService.MODE_DESKTOP &&
|
||||
!com.steamdeck.launcher.runtime.DesktopCatalog.desktopInstalled(this)
|
||||
!com.droiddeck.launcher.runtime.DesktopCatalog.desktopInstalled(this)
|
||||
if (needRuntime || needDesktop) installThenStart(needRuntime, needDesktop)
|
||||
}
|
||||
hud = PerfHud(this)
|
||||
@@ -175,7 +175,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
// through to the pad and the game underneath.
|
||||
root.addView(ComposeView(this).apply {
|
||||
setContent {
|
||||
SteamDeckTheme {
|
||||
DroidDeckTheme {
|
||||
CursorOverlay(cursorPos, cursorVisible, resources.displayMetrics.density)
|
||||
if (hud.text.isNotEmpty()) HudText(hud.text)
|
||||
if (loading.visible) LoadingOverlay(loading.step, loading.percent, loading.elapsed, loading.hint, loading.ended)
|
||||
@@ -258,9 +258,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
|
||||
private fun sendSteamGuide() {
|
||||
drawerOpen = false
|
||||
padBridge?.applyTouch { state -> state.press(com.steamdeck.launcher.input.PadState.GUIDE, true) }
|
||||
padBridge?.applyTouch { state -> state.press(com.droiddeck.launcher.input.PadState.GUIDE, true) }
|
||||
uiHandler.postDelayed({
|
||||
padBridge?.applyTouch { state -> state.press(com.steamdeck.launcher.input.PadState.GUIDE, false) }
|
||||
padBridge?.applyTouch { state -> state.press(com.droiddeck.launcher.input.PadState.GUIDE, false) }
|
||||
}, 90)
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
}
|
||||
|
||||
/** Reports one package's download on the loading screen: "<what> · 332 of 791 MB", checking, unpacking. */
|
||||
private fun progressFor(what: String, mb: Long) = com.steamdeck.launcher.runtime.LinuxRuntimeInstaller.ProgressListener { stage, p ->
|
||||
private fun progressFor(what: String, mb: Long) = com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.ProgressListener { stage, p ->
|
||||
uiHandler.post {
|
||||
loading.percent = p
|
||||
loading.step = when {
|
||||
@@ -323,9 +323,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
|
||||
/** Null when the runtime is in, else the loading screen's closing line. */
|
||||
private fun installRuntime(): String? {
|
||||
val release = com.steamdeck.launcher.runtime.LinuxRuntimeInstaller.fetchRelease()
|
||||
val release = com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.fetchRelease()
|
||||
?: return "Could not reach the runtime catalog. Check the connection and press Play again."
|
||||
val ok = com.steamdeck.launcher.runtime.LinuxRuntimeInstaller.install(this, release,
|
||||
val ok = com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.install(this, release,
|
||||
progressFor("the Linux runtime", release.size / 1_000_000))
|
||||
return if (ok) null else "The Linux runtime did not install. Check the connection and press Play again."
|
||||
}
|
||||
@@ -333,9 +333,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
/** Null when the desktop package is in, else the loading screen's closing line. */
|
||||
private fun installDesktop(): String? {
|
||||
uiHandler.post { loading.percent = -1; loading.step = "downloading the desktop" }
|
||||
val entry = com.steamdeck.launcher.runtime.DesktopCatalog.fetch()?.firstOrNull { it.id == "desktop" }
|
||||
val entry = com.droiddeck.launcher.runtime.DesktopCatalog.fetch()?.firstOrNull { it.id == "desktop" }
|
||||
?: return "Could not reach the desktop catalog. Check the connection and press Desktop again."
|
||||
val problem = com.steamdeck.launcher.runtime.DesktopCatalog.install(this, entry,
|
||||
val problem = com.droiddeck.launcher.runtime.DesktopCatalog.install(this, entry,
|
||||
progressFor("the desktop", entry.size / 1_000_000))
|
||||
return problem?.let { "The desktop did not install ($it). Check the connection and press Desktop again." }
|
||||
}
|
||||
@@ -757,9 +757,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
sendWheel = { steps -> WaylandCompositor.nativeSendSceneInput(4, steps, 0) },
|
||||
onSteamMenu = {
|
||||
if (SessionState.mode == SessionService.MODE_STEAM) {
|
||||
padBridge?.applyTouch { st -> st.press(com.steamdeck.launcher.input.PadState.GUIDE, true) }
|
||||
padBridge?.applyTouch { st -> st.press(com.droiddeck.launcher.input.PadState.GUIDE, true) }
|
||||
Handler(Looper.getMainLooper()).postDelayed({
|
||||
padBridge?.applyTouch { st -> st.press(com.steamdeck.launcher.input.PadState.GUIDE, false) }
|
||||
padBridge?.applyTouch { st -> st.press(com.droiddeck.launcher.input.PadState.GUIDE, false) }
|
||||
}, 90)
|
||||
}
|
||||
},
|
||||
@@ -854,9 +854,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
return true
|
||||
}
|
||||
|
||||
/** The mode decides which controls appear; `steamdeck-osc` in Downloads still overrides. */
|
||||
/** The mode decides which controls appear; `droiddeck-osc` in Downloads still overrides. */
|
||||
private fun updateOnScreenControls() {
|
||||
val forced = File(Environment.getExternalStorageDirectory(), "Download/steamdeck-osc")
|
||||
val forced = File(Environment.getExternalStorageDirectory(), "Download/droiddeck-osc")
|
||||
.takeIf { it.isFile }
|
||||
?.let { FileUtils.readString(it)?.trim()?.lowercase() }
|
||||
?: SessionPrefs.oscMode(this)
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
package com.steamdeck.launcher.audio;
|
||||
package com.droiddeck.launcher.audio;
|
||||
|
||||
import android.os.Process;
|
||||
import android.util.Log;
|
||||
|
||||
import com.steamdeck.launcher.core.SessionPart;
|
||||
import com.steamdeck.launcher.core.HostProcess;
|
||||
import com.droiddeck.launcher.core.SessionPart;
|
||||
import com.droiddeck.launcher.core.HostProcess;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
+5
-5
@@ -1,13 +1,13 @@
|
||||
package com.steamdeck.launcher.audio;
|
||||
package com.droiddeck.launcher.audio;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Process;
|
||||
import android.util.Log;
|
||||
|
||||
import com.steamdeck.launcher.core.FileUtils;
|
||||
import com.steamdeck.launcher.core.SessionPart;
|
||||
import com.steamdeck.launcher.core.HostProcess;
|
||||
import com.steamdeck.launcher.core.TarZst;
|
||||
import com.droiddeck.launcher.core.FileUtils;
|
||||
import com.droiddeck.launcher.core.SessionPart;
|
||||
import com.droiddeck.launcher.core.HostProcess;
|
||||
import com.droiddeck.launcher.core.TarZst;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.core
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
import java.io.File
|
||||
|
||||
+15
-15
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.core
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
import android.app.ActivityManager
|
||||
import android.content.Context
|
||||
@@ -7,15 +7,15 @@ import android.os.Environment
|
||||
import android.os.StatFs
|
||||
import android.provider.Settings
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.gpu.LinuxVulkanDriver
|
||||
import com.steamdeck.launcher.gpu.LinuxVulkanDriverManager
|
||||
import com.steamdeck.launcher.gpu.TurnipDriver
|
||||
import com.steamdeck.launcher.runtime.DesktopCatalog
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntime
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntimeInstaller
|
||||
import com.steamdeck.launcher.session.SessionPrefs
|
||||
import com.steamdeck.launcher.session.SessionService
|
||||
import com.steamdeck.launcher.session.SessionState
|
||||
import com.droiddeck.launcher.gpu.LinuxVulkanDriver
|
||||
import com.droiddeck.launcher.gpu.LinuxVulkanDriverManager
|
||||
import com.droiddeck.launcher.gpu.TurnipDriver
|
||||
import com.droiddeck.launcher.runtime.DesktopCatalog
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntimeInstaller
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
import java.io.File
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
@@ -50,7 +50,7 @@ object DeviceReport {
|
||||
b.append(key.padEnd(24)).append(value ?: "unknown").append('\n')
|
||||
}
|
||||
|
||||
b.append("SteamDeck session report\n")
|
||||
b.append("DroidDeck session report\n")
|
||||
b.append("========================\n")
|
||||
k("Written", SimpleDateFormat("yyyy-MM-dd HH:mm:ss zzz", Locale.US).format(Date()))
|
||||
k("Session mode", when (mode) { SessionService.MODE_DESKTOP -> "desktop (labwc/LXQt)"; SessionService.MODE_RUN -> "a program under gamescope"; else -> "Steam client (gamescope)" })
|
||||
@@ -155,7 +155,7 @@ object DeviceReport {
|
||||
k("Touch mode", SessionPrefs.touchMode(context))
|
||||
k("Performance HUD", SessionPrefs.hudEnabled(context))
|
||||
k("Game storage", when (val g = SessionPrefs.gameStorage(context)) {
|
||||
"" -> "automatic (" + (com.steamdeck.launcher.session.GameStorage.effective(context)?.path ?: "no card present") + ")"
|
||||
"" -> "automatic (" + (com.droiddeck.launcher.session.GameStorage.effective(context)?.path ?: "no card present") + ")"
|
||||
SessionPrefs.GAME_STORAGE_OFF -> "internal only"
|
||||
else -> g
|
||||
})
|
||||
@@ -178,9 +178,9 @@ object DeviceReport {
|
||||
})
|
||||
|
||||
h("Device switch files in Download")
|
||||
for (name in listOf("steamdeck-env", "steamdeck-tu-debug", "steamdeck-driver",
|
||||
"steamdeck-osc", "steamdeck-no-pad", "steamdeck-pad-log",
|
||||
"steamdeck-no-hud", "steamdeck-wlr-renderer")) {
|
||||
for (name in listOf("droiddeck-env", "droiddeck-tu-debug", "droiddeck-driver",
|
||||
"droiddeck-osc", "droiddeck-no-pad", "droiddeck-pad-log",
|
||||
"droiddeck-no-hud", "droiddeck-wlr-renderer")) {
|
||||
val f = File(Environment.getExternalStorageDirectory(), "Download/$name")
|
||||
if (f.isFile) k(name, FileUtils.readString(f)?.trim()?.replace('\n', ' ')?.ifEmpty { "(present, empty)" } ?: "(present)")
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.core
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
import android.os.Build
|
||||
import java.io.File
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.core;
|
||||
package com.droiddeck.launcher.core;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
@@ -106,7 +106,7 @@ public final class Downloader {
|
||||
connection.setConnectTimeout(TIMEOUT_MS);
|
||||
connection.setReadTimeout(TIMEOUT_MS);
|
||||
connection.setInstanceFollowRedirects(true);
|
||||
connection.setRequestProperty("User-Agent", "SteamDeck-Android");
|
||||
connection.setRequestProperty("User-Agent", "DroidDeck-Android");
|
||||
return connection;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.core
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
/**
|
||||
* FEXCore presets for the x86 games the Steam client launches, Bannerlator's table carried over
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.core;
|
||||
package com.droiddeck.launcher.core;
|
||||
|
||||
import android.content.Context;
|
||||
import android.system.ErrnoException;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.core
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
/** The variables a host process is started with, in the order they were set. */
|
||||
class HostEnvironment {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.core
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
import android.util.Log
|
||||
import java.io.File
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.core
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
/**
|
||||
* Scrubs credentials out of a log line before it is written somewhere a user will share.
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
package com.steamdeck.launcher.core
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
import android.content.Context
|
||||
import android.net.ConnectivityManager
|
||||
import android.net.NetworkCapabilities
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import java.io.File
|
||||
import java.net.Inet4Address
|
||||
import java.net.Inet6Address
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.core
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
import android.os.Process
|
||||
import android.util.Log
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.core;
|
||||
package com.droiddeck.launcher.core;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.core;
|
||||
package com.droiddeck.launcher.core;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
@@ -16,7 +16,7 @@ import java.io.OutputStream;
|
||||
/**
|
||||
* The small zstd tarballs that ship inside the apk (the Turnip driver, the PulseAudio modules).
|
||||
* The runtime rootfs is not one of these - it needs hard links and symlinks preserved, which
|
||||
* {@link com.steamdeck.launcher.runtime.LinuxRuntimeInstaller} handles itself.
|
||||
* {@link com.droiddeck.launcher.runtime.LinuxRuntimeInstaller} handles itself.
|
||||
*/
|
||||
public final class TarZst {
|
||||
private static final String TAG = "TarZst";
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.files
|
||||
package com.droiddeck.launcher.files
|
||||
|
||||
import android.content.res.Configuration
|
||||
import androidx.compose.animation.core.animateDpAsState
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.files
|
||||
package com.droiddeck.launcher.files
|
||||
|
||||
import android.content.Context
|
||||
import org.json.JSONArray
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.files
|
||||
package com.droiddeck.launcher.files
|
||||
|
||||
import android.Manifest
|
||||
import android.content.pm.PackageManager
|
||||
@@ -10,7 +10,7 @@ import androidx.compose.foundation.layout.systemBarsPadding
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.ui.Modifier
|
||||
import com.steamdeck.launcher.ui.SteamDeckTheme
|
||||
import com.droiddeck.launcher.ui.DroidDeckTheme
|
||||
|
||||
/** The File Manager as a screen of its own, from the Files tile on the main screen. */
|
||||
class FileManagerActivity : ComponentActivity() {
|
||||
@@ -20,7 +20,7 @@ class FileManagerActivity : ComponentActivity() {
|
||||
requestPermissions(arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE), 1)
|
||||
}
|
||||
setContent {
|
||||
SteamDeckTheme {
|
||||
DroidDeckTheme {
|
||||
Surface(modifier = Modifier.fillMaxSize().systemBarsPadding(), color = MaterialTheme.colorScheme.background) {
|
||||
FileManagerScreen()
|
||||
}
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.files
|
||||
package com.droiddeck.launcher.files
|
||||
|
||||
import android.widget.Toast
|
||||
import androidx.activity.compose.BackHandler
|
||||
@@ -114,8 +114,8 @@ import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.steamdeck.launcher.R
|
||||
import com.steamdeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
@@ -1217,7 +1217,7 @@ fun FileManagerScreen(
|
||||
// The ROMs folder chosen on the main screen: what the session shows as /root/ROMs.
|
||||
SessionPrefs.romsDir(context).takeIf { it.isNotEmpty() }?.let(::File)?.takeIf { it.isDirectory }
|
||||
?.let { add(locItem("ROMs", Icons.Filled.SportsEsports, it)) }
|
||||
File("/storage/emulated/0/Download/SteamDeck").takeIf { it.isDirectory }?.let { add(locItem("Session logs", Icons.Filled.Description, it)) }
|
||||
File("/storage/emulated/0/Download/DroidDeck").takeIf { it.isDirectory }?.let { add(locItem("Session logs", Icons.Filled.Description, it)) }
|
||||
File("/storage/emulated/0/Pictures").takeIf { it.isDirectory }?.let { add(locItem("Pictures", Icons.Filled.Image, it)) }
|
||||
}
|
||||
val favItems = remember(favTick) { FavoritesStore.list(context).map(::File).filter { it.exists() } }
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.files
|
||||
package com.droiddeck.launcher.files
|
||||
|
||||
import android.util.Log
|
||||
import java.io.File
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.files
|
||||
package com.droiddeck.launcher.files
|
||||
|
||||
import android.Manifest
|
||||
import android.app.Activity
|
||||
@@ -12,7 +12,7 @@ import androidx.compose.foundation.layout.systemBarsPadding
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.ui.Modifier
|
||||
import com.steamdeck.launcher.ui.SteamDeckTheme
|
||||
import com.droiddeck.launcher.ui.DroidDeckTheme
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
@@ -43,7 +43,7 @@ class FilePickerActivity : ComponentActivity() {
|
||||
?.let { File(it) }?.takeIf { it.isDirectory }
|
||||
|
||||
setContent {
|
||||
SteamDeckTheme {
|
||||
DroidDeckTheme {
|
||||
Surface(modifier = Modifier.fillMaxSize().systemBarsPadding(), color = MaterialTheme.colorScheme.background) {
|
||||
FileManagerScreen(
|
||||
pickMode = true,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.files
|
||||
package com.droiddeck.launcher.files
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.files
|
||||
package com.droiddeck.launcher.files
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.files
|
||||
package com.droiddeck.launcher.files
|
||||
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.material3.AlertDialog
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.files
|
||||
package com.droiddeck.launcher.files
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.BitmapFactory
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.files
|
||||
package com.droiddeck.launcher.files
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package com.steamdeck.launcher.frontend
|
||||
package com.droiddeck.launcher.frontend
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.files.PeIconExtractor
|
||||
import com.steamdeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.files.PeIconExtractor
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
import java.net.HttpURLConnection
|
||||
@@ -161,7 +161,7 @@ object AddedGameArt {
|
||||
val c = URL(url).openConnection() as HttpURLConnection
|
||||
c.connectTimeout = 10_000
|
||||
c.readTimeout = 15_000
|
||||
c.setRequestProperty("User-Agent", "SteamDeck-launcher")
|
||||
c.setRequestProperty("User-Agent", "DroidDeck-launcher")
|
||||
return try {
|
||||
if (c.responseCode != 200) null else c.inputStream.use { it.readBytes() }
|
||||
} catch (e: Exception) {
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
package com.steamdeck.launcher.frontend
|
||||
package com.droiddeck.launcher.frontend
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Environment
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.session.GameStorage
|
||||
import com.steamdeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.session.GameStorage
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import java.io.File
|
||||
import java.util.zip.CRC32
|
||||
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
package com.steamdeck.launcher.frontend
|
||||
package com.droiddeck.launcher.frontend
|
||||
|
||||
import android.content.Context
|
||||
import com.steamdeck.launcher.R
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntime
|
||||
import com.steamdeck.launcher.session.GameStorage
|
||||
import com.steamdeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.session.GameStorage
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
package com.steamdeck.launcher.gpu
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.wayland.WaylandCompositor
|
||||
import com.droiddeck.launcher.wayland.WaylandCompositor
|
||||
|
||||
/**
|
||||
* The frame-generation setting and how it reaches the compositor.
|
||||
@@ -110,7 +110,7 @@ object FrameGen {
|
||||
}
|
||||
}
|
||||
android.app.AlertDialog.Builder(activity)
|
||||
.setTitle(com.steamdeck.launcher.R.string.frame_gen_title)
|
||||
.setTitle(com.droiddeck.launcher.R.string.frame_gen_title)
|
||||
.setSingleChoiceItems(adapter, current) { dialog, which ->
|
||||
when (which) {
|
||||
0 -> set(activity, ENGINE_OFF, 2)
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.gpu;
|
||||
package com.droiddeck.launcher.gpu;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
package com.steamdeck.launcher.gpu;
|
||||
package com.droiddeck.launcher.gpu;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
|
||||
import com.steamdeck.launcher.core.FileUtils;
|
||||
import com.droiddeck.launcher.core.FileUtils;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
package com.steamdeck.launcher.gpu;
|
||||
package com.droiddeck.launcher.gpu;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntime;
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
+5
-5
@@ -1,13 +1,13 @@
|
||||
package com.steamdeck.launcher.gpu;
|
||||
package com.droiddeck.launcher.gpu;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
|
||||
import com.steamdeck.launcher.core.FileUtils;
|
||||
import com.steamdeck.launcher.core.TarZst;
|
||||
import com.steamdeck.launcher.session.SessionPrefs;
|
||||
import com.droiddeck.launcher.core.FileUtils;
|
||||
import com.droiddeck.launcher.core.TarZst;
|
||||
import com.droiddeck.launcher.session.SessionPrefs;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
@@ -51,7 +51,7 @@ public final class TurnipDriver {
|
||||
/** The two the apk carries; never removable, unpacked on demand. */
|
||||
public static final List<String> BUNDLED = Collections.unmodifiableList(Arrays.asList(DRIVER_A7XX, DRIVER_A8XX));
|
||||
/** Overrides the pick, for a device we cannot reach: a7xx, a8xx or system. */
|
||||
private static final String OVERRIDE_FILE = "Download/steamdeck-driver";
|
||||
private static final String OVERRIDE_FILE = "Download/droiddeck-driver";
|
||||
/** Bundled drivers the user deleted: hidden from the list, their unpacked copy removed. */
|
||||
private static final String PREFS = "graphics_driver";
|
||||
private static final String KEY_HIDDEN = "hiddenBundled";
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
package com.steamdeck.launcher.gpu
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import android.content.Context
|
||||
import com.steamdeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
@@ -114,7 +114,7 @@ object TurnipReleases {
|
||||
c.connectTimeout = 15_000
|
||||
c.readTimeout = 20_000
|
||||
c.setRequestProperty("Accept", "application/vnd.github+json")
|
||||
c.setRequestProperty("User-Agent", "SteamDeck-app")
|
||||
c.setRequestProperty("User-Agent", "DroidDeck-app")
|
||||
try {
|
||||
val code = c.responseCode
|
||||
if (code == 403 || code == 429) throw IOException("GitHub's rate limit was hit - try again later")
|
||||
@@ -171,7 +171,7 @@ object TurnipReleases {
|
||||
val c = URL(asset.url).openConnection() as HttpURLConnection
|
||||
c.connectTimeout = 15_000
|
||||
c.readTimeout = 60_000
|
||||
c.setRequestProperty("User-Agent", "SteamDeck-app")
|
||||
c.setRequestProperty("User-Agent", "DroidDeck-app")
|
||||
c.instanceFollowRedirects = true
|
||||
try {
|
||||
if (c.responseCode != 200) throw IOException("download answered HTTP ${c.responseCode}")
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.input;
|
||||
package com.droiddeck.launcher.input;
|
||||
|
||||
import android.view.KeyEvent;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.input;
|
||||
package com.droiddeck.launcher.input;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.input
|
||||
package com.droiddeck.launcher.input
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.input
|
||||
package com.droiddeck.launcher.input
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.input;
|
||||
package com.droiddeck.launcher.input;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.input
|
||||
package com.droiddeck.launcher.input
|
||||
|
||||
/**
|
||||
* What one Xbox-shaped pad is doing right now: two sticks and two triggers as -1..1 / 0..1, the
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.input
|
||||
package com.droiddeck.launcher.input
|
||||
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.input
|
||||
package com.droiddeck.launcher.input
|
||||
|
||||
/** The control surface shown on a secondary Android display during a Linux session. */
|
||||
enum class SecondScreenMode(val id: String, val label: String) {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.input
|
||||
package com.droiddeck.launcher.input
|
||||
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
+9
-7
@@ -1,9 +1,9 @@
|
||||
package com.steamdeck.launcher.runtime
|
||||
package com.droiddeck.launcher.runtime
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.core.Downloader
|
||||
import com.steamdeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.core.Downloader
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
|
||||
@@ -45,14 +45,16 @@ object DesktopCatalog {
|
||||
}
|
||||
}
|
||||
|
||||
private fun marker(context: Context, id: String) = File(LinuxRuntime.rootDir(context), ".steamdeck-pkg-$id")
|
||||
private fun marker(context: Context, id: String) = File(LinuxRuntime.rootDir(context), ".droiddeck-pkg-$id")
|
||||
|
||||
/** The installed version of a package, or null. */
|
||||
fun installed(context: Context, id: String): String? =
|
||||
FileUtils.readString(marker(context, id))?.trim()?.takeIf { it.isNotEmpty() }
|
||||
|
||||
// labwc comes with the hosted desktop package itself (its launcher is staged by the app at
|
||||
// every session, so it cannot tell whether the package is there); SessionFiles uses the same test.
|
||||
fun desktopInstalled(context: Context): Boolean =
|
||||
File(LinuxRuntime.rootDir(context), "usr/local/bin/steamdeck-desktop").isFile
|
||||
File(LinuxRuntime.rootDir(context), "usr/bin/labwc").isFile
|
||||
|
||||
/** Downloads, verifies and installs one package. Returns null on success, else a message. */
|
||||
fun install(context: Context, entry: Entry, listener: LinuxRuntimeInstaller.ProgressListener?): String? {
|
||||
@@ -80,7 +82,7 @@ object DesktopCatalog {
|
||||
else download.renameTo(target)
|
||||
if (!placed) return "Could not place the AppImage"
|
||||
target.setExecutable(true, false)
|
||||
FileUtils.writeString(File(root, "usr/share/applications/steamdeck-${entry.id}.desktop"),
|
||||
FileUtils.writeString(File(root, "usr/share/applications/droiddeck-${entry.id}.desktop"),
|
||||
"[Desktop Entry]\nType=Application\nName=${entry.name}\n" +
|
||||
"Exec=env APPIMAGE_EXTRACT_AND_RUN=1 /opt/appimages/${entry.id}.AppImage\n" +
|
||||
"Icon=${entry.icon}\nTerminal=false\nCategories=${entry.category};\n")
|
||||
@@ -123,7 +125,7 @@ object DesktopCatalog {
|
||||
val root = LinuxRuntime.rootDir(context)
|
||||
if (entry.kind == "appimage") {
|
||||
File(root, "opt/appimages/${entry.id}.AppImage").delete()
|
||||
File(root, "usr/share/applications/steamdeck-${entry.id}.desktop").delete()
|
||||
File(root, "usr/share/applications/droiddeck-${entry.id}.desktop").delete()
|
||||
}
|
||||
marker(context, entry.id).delete()
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.runtime
|
||||
package com.droiddeck.launcher.runtime
|
||||
|
||||
import android.content.Context
|
||||
import android.net.ConnectivityManager
|
||||
@@ -7,7 +7,7 @@ import android.net.Network
|
||||
import android.os.Build
|
||||
import android.provider.Settings
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.core.SessionPart
|
||||
import com.droiddeck.launcher.core.SessionPart
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import java.net.Inet4Address
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.runtime;
|
||||
package com.droiddeck.launcher.runtime;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Process;
|
||||
@@ -33,7 +33,7 @@ public final class LinuxRuntime {
|
||||
public static final String EXTRA_LINUX_MODE = "linux_mode";
|
||||
private static final String KGSL_DEVICE = "/dev/kgsl-3d0";
|
||||
/** Where every Linux session's debug log lands: public, so a user can just hand the folder over. */
|
||||
public static final String DEBUG_LOG_DIR = "SteamDeck";
|
||||
public static final String DEBUG_LOG_DIR = "DroidDeck";
|
||||
|
||||
public static File debugLogDir() {
|
||||
return new File(android.os.Environment.getExternalStoragePublicDirectory(
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
package com.steamdeck.launcher.runtime;
|
||||
package com.droiddeck.launcher.runtime;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
import com.steamdeck.launcher.core.Downloader;
|
||||
import com.steamdeck.launcher.core.FileUtils;
|
||||
import com.droiddeck.launcher.core.Downloader;
|
||||
import com.droiddeck.launcher.core.FileUtils;
|
||||
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.os.BatteryManager
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.core.SessionPart
|
||||
import com.droiddeck.launcher.core.SessionPart
|
||||
import java.io.File
|
||||
import kotlin.math.abs
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Environment
|
||||
import android.os.StatFs
|
||||
import android.os.storage.StorageManager
|
||||
import com.steamdeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import android.os.SystemClock
|
||||
@@ -25,7 +25,7 @@ class LoadingState(context: Context) {
|
||||
var hint by mutableStateOf("")
|
||||
var ended by mutableStateOf(false)
|
||||
|
||||
private val hints = context.resources.getStringArray(com.steamdeck.launcher.R.array.loading_hints)
|
||||
private val hints = context.resources.getStringArray(com.droiddeck.launcher.R.array.loading_hints)
|
||||
private val startedAt = SystemClock.elapsedRealtime()
|
||||
|
||||
/** Once a second: the clock and the hint. */
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.util.Log
|
||||
import java.io.File
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
@@ -7,7 +7,7 @@ import android.os.Looper
|
||||
import android.os.PerformanceHintManager
|
||||
import android.util.Log
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.steamdeck.launcher.wayland.WaylandCompositor
|
||||
import com.droiddeck.launcher.wayland.WaylandCompositor
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
/**
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Environment
|
||||
@@ -8,8 +8,8 @@ import android.os.SystemClock
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import com.steamdeck.launcher.gpu.FrameGen
|
||||
import com.steamdeck.launcher.wayland.WaylandCompositor
|
||||
import com.droiddeck.launcher.gpu.FrameGen
|
||||
import com.droiddeck.launcher.wayland.WaylandCompositor
|
||||
import java.io.File
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
@@ -36,7 +36,7 @@ class PerfHud(context: Context) {
|
||||
/** The session's own switch (drawer), with the Downloads file as a device-side override. */
|
||||
private val enabled: Boolean
|
||||
get() = SessionPrefs.hudEnabled(context)
|
||||
&& !File(Environment.getExternalStorageDirectory(), "Download/steamdeck-no-hud").exists()
|
||||
&& !File(Environment.getExternalStorageDirectory(), "Download/droiddeck-no-hud").exists()
|
||||
|
||||
/** Told, on the main thread, when the window presenting frames changes. */
|
||||
var onPresentingWindowChanged: (() -> Unit)? = null
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.GameManager
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import android.os.StatFs
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.core.Downloader
|
||||
import com.steamdeck.launcher.core.FileUtils
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.core.Downloader
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import java.io.File
|
||||
import java.security.MessageDigest
|
||||
import org.json.JSONArray
|
||||
@@ -114,7 +114,7 @@ object ProtonExtras {
|
||||
return try {
|
||||
val root = LinuxRuntime.rootDir(context)
|
||||
LinuxRuntime.writeAccounts(context)
|
||||
com.steamdeck.launcher.session.SessionFiles.stage(context, root)
|
||||
com.droiddeck.launcher.session.SessionFiles.stage(context, root)
|
||||
val runtimeDir = File(context.filesDir, ".proton-install-rt").apply { mkdirs() }
|
||||
val guest = listOf(
|
||||
"/usr/bin/env", "-i", "HOME=/root", "USER=root", "PATH=/usr/local/bin:/usr/bin:/bin",
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.app.ActivityManager
|
||||
import android.content.Context
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.net.LocalServerSocket
|
||||
import android.os.Build
|
||||
@@ -6,7 +6,7 @@ import android.os.VibrationEffect
|
||||
import android.os.Vibrator
|
||||
import android.os.VibratorManager
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.core.SessionPart
|
||||
import com.droiddeck.launcher.core.SessionPart
|
||||
import java.io.DataInputStream
|
||||
import kotlin.math.max
|
||||
|
||||
@@ -70,6 +70,6 @@ class RumbleComponent : SessionPart() {
|
||||
companion object {
|
||||
private const val TAG = "SessionService"
|
||||
/** Must match the fake evdev layer (fakeinput_steam.cpp). */
|
||||
const val NAME = "steamdeck-rumble"
|
||||
const val NAME = "droiddeck-rumble"
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.core.LogRedactor
|
||||
import com.steamdeck.launcher.core.SessionLogCapture
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntime
|
||||
import com.steamdeck.launcher.wayland.WaylandCompositor
|
||||
import com.droiddeck.launcher.core.LogRedactor
|
||||
import com.droiddeck.launcher.core.SessionLogCapture
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.wayland.WaylandCompositor
|
||||
import java.io.File
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
+6
-6
@@ -1,16 +1,16 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Environment
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.core.FileUtils
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import java.io.File
|
||||
|
||||
/** Everything the session needs written into the runtime before it starts. */
|
||||
object SessionFiles {
|
||||
private const val TAG = "SessionFiles"
|
||||
private const val NO_PAD_SWITCH = "Download/steamdeck-no-pad"
|
||||
private const val NO_PAD_SWITCH = "Download/droiddeck-no-pad"
|
||||
/** Where the DirectAudio driver lives inside the runtime; the wrappers get it as BL_DIRECTAUDIO. */
|
||||
const val DIRECTAUDIO_DIR = "usr/local/lib/directaudio"
|
||||
|
||||
@@ -55,11 +55,11 @@ object SessionFiles {
|
||||
// The desktop's launcher and labwc defaults, only where the desktop package is installed:
|
||||
// staging them into a runtime without it would make the desktop look present when it is not.
|
||||
val desktop = arrayOf(
|
||||
"usr/local/bin/steamdeck-desktop" to "usr/local/bin/steamdeck-desktop",
|
||||
"usr/local/bin/droiddeck-desktop" to "usr/local/bin/droiddeck-desktop",
|
||||
"etc/xdg/labwc/autostart" to "etc/xdg/labwc/autostart",
|
||||
"etc/xdg/labwc/rc.xml" to "etc/xdg/labwc/rc.xml",
|
||||
"etc/xdg/lxqt/panel.conf" to "etc/xdg/lxqt/panel.conf",
|
||||
"usr/lib/firefox/defaults/pref/steamdeck.js" to "usr/lib/firefox/defaults/pref/steamdeck.js",
|
||||
"usr/lib/firefox/defaults/pref/droiddeck.js" to "usr/lib/firefox/defaults/pref/droiddeck.js",
|
||||
)
|
||||
// The patched gamescope (tools/gamescope): the runtime's own version rebuilt with the ARM64
|
||||
// client fixes, over /usr/local/bin so it comes first in the session's PATH. Only when the
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.ClipData
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.core.content.FileProvider
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import java.io.File
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipOutputStream
|
||||
@@ -25,7 +25,7 @@ object SessionLogShare {
|
||||
fun zipLatest(context: Context): File? {
|
||||
val folder = latest(context) ?: return null
|
||||
val out = File(context.cacheDir, "shared-logs").apply { deleteRecursively(); mkdirs() }
|
||||
val zip = File(out, "SteamDeck-${folder.name}.zip")
|
||||
val zip = File(out, "DroidDeck-${folder.name}.zip")
|
||||
ZipOutputStream(zip.outputStream().buffered()).use { z ->
|
||||
folder.walkTopDown().filter { it.isFile }.forEach { f ->
|
||||
z.putNextEntry(ZipEntry(folder.name + "/" + f.relativeTo(folder).path))
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
@@ -8,10 +8,10 @@ import java.util.Date
|
||||
import java.util.Locale
|
||||
|
||||
/**
|
||||
* One folder per session under `Download/SteamDeck/`, holding everything that session recorded:
|
||||
* One folder per session under `Download/DroidDeck/`, holding everything that session recorded:
|
||||
*
|
||||
* ```
|
||||
* Download/SteamDeck/session-20260921-161256/
|
||||
* Download/DroidDeck/session-20260921-161256/
|
||||
* device.txt what this device is, and every setting the session ran with
|
||||
* session.log the guest session: proot, gamescope, the client's stdout
|
||||
* wayland.log the app's compositor
|
||||
@@ -74,7 +74,7 @@ object SessionPaths {
|
||||
if (dir == ended) dir = null
|
||||
// A folder kept in the cache was never meant to outlive its session.
|
||||
if (ended != null && ended.path.startsWith(context.cacheDir.path)) {
|
||||
com.steamdeck.launcher.core.FileUtils.delete(ended)
|
||||
com.droiddeck.launcher.core.FileUtils.delete(ended)
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
|
||||
@@ -220,7 +220,7 @@ object SessionPrefs {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a session writes its folder under Download/SteamDeck. Off, the same logs are kept in
|
||||
* Whether a session writes its folder under Download/DroidDeck. Off, the same logs are kept in
|
||||
* the app's cache for the session's lifetime (the scripts need somewhere to write) and thrown
|
||||
* away at the end, so nothing accumulates in Downloads.
|
||||
*/
|
||||
@@ -332,7 +332,7 @@ object SessionPrefs {
|
||||
/**
|
||||
* What the desktop shell composites with: pixman (software, the default - the Adreno stand-in
|
||||
* is not a DRM render node, so labwc's gbm allocator cannot use it), or gles2 / vulkan for a
|
||||
* device that has a real node. `Download/steamdeck-wlr-renderer` still overrides it.
|
||||
* device that has a real node. `Download/droiddeck-wlr-renderer` still overrides it.
|
||||
*/
|
||||
fun desktopRenderer(context: Context): String = prefs(context).getString("desktopRenderer", "pixman") ?: "pixman"
|
||||
|
||||
+41
-41
@@ -1,7 +1,7 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import com.steamdeck.launcher.gpu.LinuxVulkanDriver
|
||||
import com.steamdeck.launcher.gpu.LinuxVulkanDriverManager
|
||||
import com.droiddeck.launcher.gpu.LinuxVulkanDriver
|
||||
import com.droiddeck.launcher.gpu.LinuxVulkanDriverManager
|
||||
|
||||
import android.app.Notification
|
||||
import android.app.NotificationChannel
|
||||
@@ -21,21 +21,21 @@ import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.PowerManager
|
||||
import android.util.Log
|
||||
import com.steamdeck.launcher.R
|
||||
import com.steamdeck.launcher.SessionActivity
|
||||
import com.steamdeck.launcher.audio.DirectAudioRelayComponent
|
||||
import com.steamdeck.launcher.audio.PulseAudioComponent
|
||||
import com.steamdeck.launcher.core.CpuCores
|
||||
import com.steamdeck.launcher.core.DeviceReport
|
||||
import com.steamdeck.launcher.core.HostEnvironment
|
||||
import com.steamdeck.launcher.core.SessionLogCapture
|
||||
import com.steamdeck.launcher.core.NetworkReport
|
||||
import com.steamdeck.launcher.core.SessionPart
|
||||
import com.steamdeck.launcher.core.FileUtils
|
||||
import com.steamdeck.launcher.core.HostProcess
|
||||
import com.steamdeck.launcher.input.FakeInputWriter
|
||||
import com.steamdeck.launcher.runtime.LinuxNetworkLinkComponent
|
||||
import com.steamdeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.SessionActivity
|
||||
import com.droiddeck.launcher.audio.DirectAudioRelayComponent
|
||||
import com.droiddeck.launcher.audio.PulseAudioComponent
|
||||
import com.droiddeck.launcher.core.CpuCores
|
||||
import com.droiddeck.launcher.core.DeviceReport
|
||||
import com.droiddeck.launcher.core.HostEnvironment
|
||||
import com.droiddeck.launcher.core.SessionLogCapture
|
||||
import com.droiddeck.launcher.core.NetworkReport
|
||||
import com.droiddeck.launcher.core.SessionPart
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.core.HostProcess
|
||||
import com.droiddeck.launcher.input.FakeInputWriter
|
||||
import com.droiddeck.launcher.runtime.LinuxNetworkLinkComponent
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import java.io.File
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
@@ -53,7 +53,7 @@ import java.util.Locale
|
||||
* backgrounded download does not throttle to nothing. All three are Bannerlator's recipe, where
|
||||
* each was added to fix a failure seen on a device.
|
||||
*
|
||||
* The activity comes and goes on top of this; see [com.steamdeck.launcher.wayland.CompositorHost].
|
||||
* The activity comes and goes on top of this; see [com.droiddeck.launcher.wayland.CompositorHost].
|
||||
*/
|
||||
class SessionService : Service() {
|
||||
private val components = java.util.concurrent.CopyOnWriteArrayList<SessionPart>()
|
||||
@@ -308,11 +308,11 @@ class SessionService : Service() {
|
||||
// default preset sets nothing, which is what every session ran on before.
|
||||
if (SessionState.mode == MODE_STEAM) {
|
||||
val preset = SessionPrefs.fexPreset(this)
|
||||
val vars = com.steamdeck.launcher.core.FexPreset.env(preset)
|
||||
val vars = com.droiddeck.launcher.core.FexPreset.env(preset)
|
||||
vars.forEach { guest.add(it) }
|
||||
if (vars.isNotEmpty()) Log.i(TAG, "fex preset $preset: ${vars.joinToString(" ")}")
|
||||
}
|
||||
// Anything else, for a device that cannot be reached with a debugger: Downloads/steamdeck-env
|
||||
// Anything else, for a device that cannot be reached with a debugger: Downloads/droiddeck-env
|
||||
// holds KEY=VALUE lines that go into the session's environment as written, after ours, so a
|
||||
// line here wins. Zink and Turnip tunables (ZINK_DESCRIPTORS=lazy, MESA_*), gamescope's,
|
||||
// the client's - whatever the experiment needs, without a build per attempt.
|
||||
@@ -411,18 +411,18 @@ class SessionService : Service() {
|
||||
// DRM render node. Ours is a KGSL stand-in that gbm cannot use - labwc dies at "unable to
|
||||
// create allocator" - so the desktop shell is composited by pixman (software, a shm
|
||||
// allocator, no DRM). Accelerated clients on it pay a CPU copy; a 2D emulator does not
|
||||
// notice, a demanding one does. steamdeck-wlr-renderer in Downloads (pixman/vulkan/gles2)
|
||||
// notice, a demanding one does. droiddeck-wlr-renderer in Downloads (pixman/vulkan/gles2)
|
||||
// overrides it, for trying acceleration on a device that has a real node.
|
||||
if (SessionState.mode == MODE_DESKTOP) {
|
||||
val override = File(Environment.getExternalStorageDirectory(), "Download/steamdeck-wlr-renderer")
|
||||
val override = File(Environment.getExternalStorageDirectory(), "Download/droiddeck-wlr-renderer")
|
||||
.takeIf { it.isFile }?.let { FileUtils.readString(it)?.trim() }
|
||||
guest.add("BL_WLR_RENDERER=" + (override?.takeIf { it.isNotEmpty() } ?: SessionPrefs.desktopRenderer(this)))
|
||||
}
|
||||
// The user's own games, for the runtime's shortcuts writer to put in the client's library
|
||||
// before the client starts (see frontend/AddedGames and bannerlator-steam-shortcuts).
|
||||
if (SessionState.mode == MODE_STEAM) {
|
||||
val added = com.steamdeck.launcher.frontend.AddedGames.scan(this)
|
||||
val listing = com.steamdeck.launcher.frontend.AddedGames.writeListing(this, added)
|
||||
val added = com.droiddeck.launcher.frontend.AddedGames.scan(this)
|
||||
val listing = com.droiddeck.launcher.frontend.AddedGames.writeListing(this, added)
|
||||
guest.add("BL_ADDED_GAMES=" + listing.path)
|
||||
if (added.isNotEmpty()) Log.i(TAG, "added games: " + added.joinToString { "${it.name} (${it.exe.name})" })
|
||||
}
|
||||
@@ -505,7 +505,7 @@ class SessionService : Service() {
|
||||
}
|
||||
// The user's own games folder (the Steam cog's "Added games"), bound at a fixed place so
|
||||
// the shortcuts the app writes point somewhere whatever storage the folder is on.
|
||||
for (root in com.steamdeck.launcher.frontend.AddedGames.roots(this)) {
|
||||
for (root in com.droiddeck.launcher.frontend.AddedGames.roots(this)) {
|
||||
if (root.host.isDirectory && root.host.canRead()) {
|
||||
File(LinuxRuntime.rootDir(this), root.guest.removePrefix("/")).mkdirs()
|
||||
binds.add(root.host.path + ":" + root.guest)
|
||||
@@ -707,7 +707,7 @@ class SessionService : Service() {
|
||||
}
|
||||
}
|
||||
Log.i(TAG, "launch request from the session: Steam $ui" + (if (url.isNotEmpty()) " $url" else ""))
|
||||
val next = Intent(this@SessionService, com.steamdeck.launcher.SessionActivity::class.java)
|
||||
val next = Intent(this@SessionService, com.droiddeck.launcher.SessionActivity::class.java)
|
||||
.putExtra(EXTRA_MODE, MODE_STEAM)
|
||||
.putExtra(EXTRA_STEAM_UI, ui)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
@@ -857,7 +857,7 @@ class SessionService : Service() {
|
||||
try {
|
||||
if (wakeLock?.isHeld != true) {
|
||||
val power = getSystemService(Context.POWER_SERVICE) as? PowerManager
|
||||
wakeLock = power?.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "SteamDeck:session")?.apply {
|
||||
wakeLock = power?.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "DroidDeck:session")?.apply {
|
||||
setReferenceCounted(false)
|
||||
acquire(12L * 60L * 60L * 1000L)
|
||||
}
|
||||
@@ -870,7 +870,7 @@ class SessionService : Service() {
|
||||
val wifi = applicationContext.getSystemService(Context.WIFI_SERVICE) as? WifiManager
|
||||
@Suppress("DEPRECATION") // deprecated from API 29, still honoured; targetSdk is 28
|
||||
if (wifiLock?.isHeld != true) {
|
||||
wifiLock = wifi?.createWifiLock(WifiManager.WIFI_MODE_FULL_HIGH_PERF, "SteamDeck:session-wifi")
|
||||
wifiLock = wifi?.createWifiLock(WifiManager.WIFI_MODE_FULL_HIGH_PERF, "DroidDeck:session-wifi")
|
||||
?.apply {
|
||||
setReferenceCounted(false)
|
||||
acquire()
|
||||
@@ -954,27 +954,27 @@ class SessionService : Service() {
|
||||
companion object {
|
||||
private const val TAG = "SessionService"
|
||||
/** Downloads file whose contents become TU_DEBUG inside the session, e.g. "sysmem". */
|
||||
private const val TU_DEBUG_SWITCH = "Download/steamdeck-tu-debug"
|
||||
private const val TU_DEBUG_SWITCH = "Download/droiddeck-tu-debug"
|
||||
/** Downloads file of KEY=VALUE lines added to the session environment verbatim. */
|
||||
private const val ENV_SWITCH = "Download/steamdeck-env"
|
||||
private const val ENV_SWITCH = "Download/droiddeck-env"
|
||||
private const val CHANNEL_ID = "session"
|
||||
private const val NOTIFICATION_ID = 1001
|
||||
const val ACTION_STOP = "com.steamdeck.launcher.STOP_SESSION"
|
||||
const val ACTION_RESUME = "com.steamdeck.launcher.RESUME_SESSION"
|
||||
const val ACTION_HOME_GUIDE = "com.steamdeck.launcher.HOME_GUIDE"
|
||||
private const val ACTION_ACTIVITY_VISIBLE = "com.steamdeck.launcher.ACTIVITY_VISIBLE"
|
||||
private const val ACTION_ACTIVITY_HIDDEN = "com.steamdeck.launcher.ACTIVITY_HIDDEN"
|
||||
private const val ACTION_TRACK_AUXILIARY = "com.steamdeck.launcher.TRACK_AUXILIARY"
|
||||
private const val ACTION_STOP_AUXILIARY = "com.steamdeck.launcher.STOP_AUXILIARY"
|
||||
private const val ACTION_AUXILIARY_EXITED = "com.steamdeck.launcher.AUXILIARY_EXITED"
|
||||
const val ACTION_STOP = "com.droiddeck.launcher.STOP_SESSION"
|
||||
const val ACTION_RESUME = "com.droiddeck.launcher.RESUME_SESSION"
|
||||
const val ACTION_HOME_GUIDE = "com.droiddeck.launcher.HOME_GUIDE"
|
||||
private const val ACTION_ACTIVITY_VISIBLE = "com.droiddeck.launcher.ACTIVITY_VISIBLE"
|
||||
private const val ACTION_ACTIVITY_HIDDEN = "com.droiddeck.launcher.ACTIVITY_HIDDEN"
|
||||
private const val ACTION_TRACK_AUXILIARY = "com.droiddeck.launcher.TRACK_AUXILIARY"
|
||||
private const val ACTION_STOP_AUXILIARY = "com.droiddeck.launcher.STOP_AUXILIARY"
|
||||
private const val ACTION_AUXILIARY_EXITED = "com.droiddeck.launcher.AUXILIARY_EXITED"
|
||||
private const val EXTRA_AUXILIARY_PID = "auxiliaryPid"
|
||||
/** Command lines that can only belong to a session of ours. */
|
||||
private val STRAGGLERS = listOf("bannerlator-session", "gamescope", "Xwayland", "steamrtarm64",
|
||||
"steamwebhelper", "linuxfs/opt/android-host/proot", "pulseaudio/libpulseaudio.so")
|
||||
/** How long proot gets to run its own cleanup before it is killed outright. */
|
||||
private const val GRACE_MS = 1200L
|
||||
private const val NO_PAD_SWITCH = "Download/steamdeck-no-pad"
|
||||
private const val PAD_LOG_SWITCH = "Download/steamdeck-pad-log"
|
||||
private const val NO_PAD_SWITCH = "Download/droiddeck-no-pad"
|
||||
private const val PAD_LOG_SWITCH = "Download/droiddeck-pad-log"
|
||||
|
||||
const val EXTRA_MODE = "mode"
|
||||
const val MODE_STEAM = "steam"
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import java.io.File
|
||||
import androidx.compose.runtime.getValue
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.os.Process
|
||||
import java.io.File
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.session
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import com.termux.terminal.TerminalSession
|
||||
import com.termux.terminal.TerminalSessionClient
|
||||
@@ -30,7 +30,7 @@ object SessionTerminal {
|
||||
return TerminalSession(
|
||||
current.command.first(), current.workingDirectory, current.command,
|
||||
current.hostEnvironment, 3000, client,
|
||||
).also { it.mSessionName = "SteamDeck Linux shell" }
|
||||
).also { it.mSessionName = "DroidDeck Linux shell" }
|
||||
}
|
||||
|
||||
fun clear(generation: Int? = null) {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.Canvas
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.activity.compose.BackHandler
|
||||
import androidx.compose.foundation.background
|
||||
+7
-7
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import android.os.Build
|
||||
@@ -105,9 +105,9 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.compose.ui.zIndex
|
||||
import coil.compose.AsyncImage
|
||||
import com.steamdeck.launcher.R
|
||||
import com.steamdeck.launcher.frontend.Library
|
||||
import com.steamdeck.launcher.gpu.FrameGen
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import com.droiddeck.launcher.gpu.FrameGen
|
||||
import java.io.File
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@@ -134,7 +134,7 @@ class FrontEndState(
|
||||
val theme: String = Themes.PAPER,
|
||||
val isHomeApp: Boolean = false,
|
||||
val defaultHomeLabel: String? = null,
|
||||
val androidApps: List<com.steamdeck.launcher.HomeApp.LaunchableApp> = emptyList(),
|
||||
val androidApps: List<com.droiddeck.launcher.HomeApp.LaunchableApp> = emptyList(),
|
||||
val packages: List<PackageRow>? = null,
|
||||
val packageCatalogLoading: Boolean = false,
|
||||
val packageBusyId: String? = null,
|
||||
@@ -168,7 +168,7 @@ class FrontEndActions(
|
||||
val onPageBack: () -> Unit = {},
|
||||
val onTheme: (String) -> Unit = {},
|
||||
val onHomeApp: () -> Unit = {},
|
||||
val onAndroidApp: (com.steamdeck.launcher.HomeApp.LaunchableApp) -> Unit = {},
|
||||
val onAndroidApp: (com.droiddeck.launcher.HomeApp.LaunchableApp) -> Unit = {},
|
||||
)
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ private fun Rail(
|
||||
Image(painterResource(R.drawable.logo), null, modifier = Modifier.size(30.dp))
|
||||
Spacer(Modifier.width(10.dp))
|
||||
Column {
|
||||
Text("SteamDeck", fontSize = 18.sp, fontWeight = FontWeight.Bold, color = colors.onBackground)
|
||||
Text("DroidDeck", fontSize = 18.sp, fontWeight = FontWeight.Bold, color = colors.onBackground)
|
||||
val status = when {
|
||||
s.busy -> if (s.percent >= 0) "${s.stage} ${s.percent}%" else s.stage
|
||||
!s.ready -> "runtime not installed"
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.padding
|
||||
@@ -14,9 +14,9 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.steamdeck.launcher.core.FexPreset
|
||||
import com.steamdeck.launcher.session.SessionPrefs
|
||||
import com.steamdeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.core.FexPreset
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
|
||||
/** [tag] is shown beside the name: [BUNDLED], [DOWNLOADED], [IMPORTED], or "" for Auto / Runtime default. */
|
||||
class DriverRow(val id: String, val name: String, val detail: String, val removable: Boolean, val tag: String = "") {
|
||||
@@ -179,7 +179,7 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
ChoiceRow(
|
||||
host, "shape", "Shape",
|
||||
if (custom != null) "Set by the custom resolution." else "The panel's shape stays at 16:9 or wider; pick Exactly this panel for a 4:3 or 3:2 screen.",
|
||||
com.steamdeck.launcher.session.SessionPrefs.shapeChoices, s.shapeMode, enabled = custom == null, onPick = a.onShape,
|
||||
com.droiddeck.launcher.session.SessionPrefs.shapeChoices, s.shapeMode, enabled = custom == null, onPick = a.onShape,
|
||||
)
|
||||
if (editCustom) CustomResolutionDialog(
|
||||
initial = custom,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
/** Package metadata shown on an emulator's own detail page. */
|
||||
class PackageRow(
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
@@ -89,7 +89,7 @@ fun PerformancePage(
|
||||
)
|
||||
ToggleRow(
|
||||
host, "deck", "Steam Deck mode",
|
||||
"Runs the client with -steamdeck. SteamOS helpers and battery info are provided.",
|
||||
"Runs the client with -droiddeck. SteamOS helpers and battery info are provided.",
|
||||
steamDeckMode, onChange = onSteamDeckMode,
|
||||
)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.ui.Modifier
|
||||
+9
-9
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.app.Presentation
|
||||
import android.content.ClipboardManager
|
||||
@@ -21,14 +21,14 @@ import android.widget.FrameLayout
|
||||
import android.widget.HorizontalScrollView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import com.steamdeck.launcher.input.KeyboardHost
|
||||
import com.steamdeck.launcher.input.PointerGestures
|
||||
import com.steamdeck.launcher.input.SecondScreenMode
|
||||
import com.steamdeck.launcher.input.TouchpadGestures
|
||||
import com.steamdeck.launcher.SessionActivity
|
||||
import com.steamdeck.launcher.session.SessionService
|
||||
import com.steamdeck.launcher.session.SessionState
|
||||
import com.steamdeck.launcher.session.SessionTerminal
|
||||
import com.droiddeck.launcher.input.KeyboardHost
|
||||
import com.droiddeck.launcher.input.PointerGestures
|
||||
import com.droiddeck.launcher.input.SecondScreenMode
|
||||
import com.droiddeck.launcher.input.TouchpadGestures
|
||||
import com.droiddeck.launcher.SessionActivity
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
import com.droiddeck.launcher.session.SessionTerminal
|
||||
import com.termux.terminal.TerminalEmulator
|
||||
import com.termux.terminal.TerminalSession
|
||||
import com.termux.terminal.TerminalSessionClient
|
||||
+8
-8
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
@@ -35,8 +35,8 @@ import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.steamdeck.launcher.R
|
||||
import com.steamdeck.launcher.HomeApp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.HomeApp
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.animateColorAsState
|
||||
import androidx.compose.animation.core.Spring
|
||||
@@ -64,11 +64,11 @@ import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.semantics.contentDescription
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import com.steamdeck.launcher.core.FexPreset
|
||||
import com.steamdeck.launcher.gpu.FrameGen
|
||||
import com.steamdeck.launcher.session.SessionPrefs
|
||||
import com.steamdeck.launcher.input.SecondScreenDisplay
|
||||
import com.steamdeck.launcher.input.SecondScreenMode
|
||||
import com.droiddeck.launcher.core.FexPreset
|
||||
import com.droiddeck.launcher.gpu.FrameGen
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.input.SecondScreenDisplay
|
||||
import com.droiddeck.launcher.input.SecondScreenMode
|
||||
import kotlinx.coroutines.flow.collect
|
||||
|
||||
@Composable
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.animation.AnimatedContent
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.ui
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
@@ -7,7 +7,7 @@ import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.runtime.staticCompositionLocalOf
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import com.steamdeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
|
||||
class Palette(
|
||||
val id: String, val label: String, val detail: String,
|
||||
@@ -52,7 +52,7 @@ object Themes {
|
||||
val LocalPalette = staticCompositionLocalOf { Themes.byId(Themes.PAPER) }
|
||||
|
||||
@Composable
|
||||
fun SteamDeckTheme(theme: String? = null, content: @Composable () -> Unit) {
|
||||
fun DroidDeckTheme(theme: String? = null, content: @Composable () -> Unit) {
|
||||
val id = theme ?: SessionPrefs.theme(LocalContext.current)
|
||||
val p = Themes.byId(id)
|
||||
val scheme = darkColorScheme(
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.wayland
|
||||
package com.droiddeck.launcher.wayland
|
||||
|
||||
import android.view.Choreographer
|
||||
import android.view.Surface
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.wayland
|
||||
package com.droiddeck.launcher.wayland
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.steamdeck.launcher.wayland;
|
||||
package com.droiddeck.launcher.wayland;
|
||||
|
||||
import android.view.Surface;
|
||||
|
||||
@@ -62,7 +62,7 @@ public final class WaylandCompositor {
|
||||
/** Invoked from native (banner_on_game_frame) for every frame of the HUD's window. */
|
||||
@SuppressWarnings("unused")
|
||||
static void onGameFrame() {
|
||||
com.steamdeck.launcher.session.PerfHints.onFrame();
|
||||
com.droiddeck.launcher.session.PerfHints.onFrame();
|
||||
GameListener l = gameListener;
|
||||
if (l != null) l.onGameFrame();
|
||||
}
|
||||
Reference in new issue
Block a user