mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
Deck mode made safe, a client-branch choice, and a battery the client can see
Deck mode passes -steamdeck alone: -steamos3 opted the install into the steamdeck_stable branch and started the restart loop Bannerlator hit on device (38996ea1). The SteamOS helpers the client calls in that mode - the two Armada found it needs under steamos-polkit-helpers and the three under /usr/bin - are staged from the apk as no-op stubs. The client branch on disk is kept in step with the one forced on the command line, and an update that cannot install stops the session after three restarts instead of looping for ever. The Steam cog gets a Client branch row: public beta (every session so far) or Steam Deck public beta, the channel Armada bootstraps from. The client reads /sys/class/power_supply/BAT<n>/; Android's supply is called battery and laid out differently, so the Quick Access Menu had no battery. BatteryComponent writes BAT0 and BAT1 from Android's battery API every five seconds - status, percentage, charge, energy, power and time to empty - into a directory bound over /sys/class/power_supply.
This commit is contained in:
1 parent
a4e59986a8
commit
2fb79735c3
14 files changed
+238
-10
No files matched your search
@@ -123,6 +123,7 @@ class MainActivity : ComponentActivity() {
|
||||
private var settingsMode by mutableStateOf<String?>(null)
|
||||
private var resolutionCap by mutableStateOf(1080)
|
||||
private var fexPreset by mutableStateOf("")
|
||||
private var steamChannel by mutableStateOf("publicbeta")
|
||||
private var theme by mutableStateOf("paper")
|
||||
private var shapeMode by mutableStateOf(SessionPrefs.SHAPE_AUTO)
|
||||
private var hdrOn by mutableStateOf(false)
|
||||
@@ -369,6 +370,7 @@ class MainActivity : ComponentActivity() {
|
||||
gameStorage = if (mode == SessionService.MODE_STEAM) gameStorage else null,
|
||||
storageOptions = storageOptions,
|
||||
fexPreset = if (mode == SessionService.MODE_STEAM) fexPreset else null,
|
||||
steamChannel = if (mode == SessionService.MODE_STEAM) steamChannel else null,
|
||||
),
|
||||
ModeSettingsActions(
|
||||
onResolution = { cap -> SessionPrefs.setResolutionCap(this, mode, cap); resolutionCap = cap },
|
||||
@@ -398,6 +400,7 @@ class MainActivity : ComponentActivity() {
|
||||
pickGameStorage.launch(InAppFilePicker.buildDirIntent(this, "Choose the game storage folder", gameStorage.ifEmpty { null }))
|
||||
},
|
||||
onFexPreset = { id -> SessionPrefs.setFexPreset(this, id); fexPreset = id },
|
||||
onSteamChannel = { id -> SessionPrefs.setSteamChannel(this, id); steamChannel = id },
|
||||
onDismiss = { settingsMode = null },
|
||||
),
|
||||
)
|
||||
@@ -435,6 +438,7 @@ class MainActivity : ComponentActivity() {
|
||||
refreshDrivers()
|
||||
resolutionCap = SessionPrefs.resolutionCap(this, mode)
|
||||
fexPreset = SessionPrefs.fexPreset(this)
|
||||
steamChannel = SessionPrefs.steamChannel(this)
|
||||
shapeMode = SessionPrefs.shapeMode(this)
|
||||
hdrOn = SessionPrefs.hdr(this, mode)
|
||||
hdrReason = com.steamdeck.launcher.wayland.HdrSupport.probe(this).reason
|
||||
|
||||
Reference in new issue
Block a user