mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
Emulators run under gamescope (▶ in Desktop & apps); the device's volume keys reach Android
RPCS3 on the desktop died at its first frame with VK_ERROR_SURFACE_LOST: labwc composites in software (pixman) and initialises no dma-buf, so no Vulkan program on the desktop can get a swapchain. The GPU path that works is gamescope's, which Steam's games already render through. MODE_RUN starts a program inside the runtime as a session of its own under gamescope (the script's run mode: AppImage, script or binary), taking Steam's display/driver/HDR settings; the apps dialog offers ▶ for every installed emulator (AppImages, PPSSPP, RetroArch). Volume Up/Down/Mute were forwarded to the guest as keys and never reached Android, so the device's volume never changed during a session; they now fall through, on the media stream.
This commit is contained in:
1 parent
903c83718a
commit
785bf23087
7 files changed
+95
-8
No files matched your search
@@ -177,6 +177,12 @@ class MainActivity : ComponentActivity() {
|
||||
rows = packageRows, busyStage = pkgStage, busyPercent = pkgPercent,
|
||||
onInstall = { id -> installPackage(id) },
|
||||
onRemove = { id -> catalog?.firstOrNull { it.id == id }?.let { DesktopCatalog.remove(this, it) }; refreshPackages() },
|
||||
onLaunch = { path ->
|
||||
showApps = false
|
||||
startActivity(Intent(this, SessionActivity::class.java)
|
||||
.putExtra(SessionService.EXTRA_MODE, SessionService.MODE_RUN)
|
||||
.putExtra(SessionService.EXTRA_PROGRAM, path))
|
||||
},
|
||||
onDismiss = { showApps = false },
|
||||
)
|
||||
if (showProtons) ProtonDialog(
|
||||
@@ -296,11 +302,18 @@ class MainActivity : ComponentActivity() {
|
||||
private fun refreshPackages() {
|
||||
packageRows = catalog?.sortedBy { it.tier }?.map {
|
||||
PackageRow(it.id, it.name, it.tier, it.version, FileUtils.sizeToString(it.size), it.notes,
|
||||
DesktopCatalog.installed(this, it.id))
|
||||
DesktopCatalog.installed(this, it.id), launchersOf(it))
|
||||
}
|
||||
desktopInstalled = DesktopCatalog.desktopInstalled(this)
|
||||
}
|
||||
|
||||
/** What a package can start on its own under gamescope; paths inside the runtime. */
|
||||
private fun launchersOf(entry: DesktopCatalog.Entry): List<Pair<String, String>> = when {
|
||||
entry.kind == "appimage" -> listOf(entry.name.substringBefore(" (").trim() to "/opt/appimages/${entry.id}.AppImage")
|
||||
entry.id == "emulators" -> listOf("PPSSPP" to "/usr/bin/PPSSPPSDL", "RetroArch" to "/usr/bin/retroarch")
|
||||
else -> emptyList()
|
||||
}
|
||||
|
||||
private fun installPackage(id: String) {
|
||||
val entry = catalog?.firstOrNull { it.id == id } ?: return
|
||||
if (pkgStage != null) return
|
||||
|
||||
Reference in new issue
Block a user