mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 12:35:42 +00:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fba54f2fd2 | ||
|
|
9555cb9f65 | ||
|
|
70d8fc6559 | ||
|
|
70c512693a | ||
|
|
43266b2923 | ||
|
|
9d85af7558 | ||
|
|
d905f03bf7 | ||
|
|
f13916ee25 |
No files matched your search
@@ -61,7 +61,7 @@ Compatibility and performance vary by device; hardware validation is limited. De
|
||||
|
||||
## Credits and licence
|
||||
|
||||
GPL-3.0. Runtime, shim, input, and controller work build on WinNative and Bannerlator (maxjivi05). Epic Games and GOG support build on [Phobos’s](https://github.com/phobos665) adaptation of [Legendary](https://github.com/legendary-gl/legendary) and [gogdl](https://github.com/Heroic-Games-Launcher/heroic-gogdl), respectively. Battle.net support is [@kayakyakr](https://github.com/kayakyakr)'s: it runs Blizzard's own Battle.net client, downloaded from Blizzard and not included, in Proton, and shows the key art from each game's [Battle.net Shop](https://shop.battle.net) page; without the Steam client its games see DroidDeck's pad as an Xbox 360 controller through `PROTON_SPOOF_STEAMINPUT_VIDPID` in [Proton](https://github.com/ValveSoftware/wine)'s `dlls/winebus.sys`. Its games install from Stores through Blizzard's own Agent and the local HTTP API it serves, driven the way [@barncastle](https://github.com/barncastle)'s [Battle.Net-Installer](https://github.com/barncastle/Battle.Net-Installer) drives it, with the requests described on [wowdev.wiki](https://wowdev.wiki/Agent); how other launchers find, install and start Blizzard games was read in [@mubaraknumann](https://github.com/mubaraknumann)'s [unifideck](https://github.com/mubaraknumann/unifideck), [@djmittens](https://github.com/djmittens)'s [neo-mittens](https://github.com/djmittens/neo-mittens) `bnetswitch`, [@BCD1210](https://github.com/BCD1210)'s [soju](https://github.com/BCD1210/soju) and [Lutris](https://github.com/lutris/lutris)'s `product.db` reader, without taking their code. The registry entries a GOG game's install script (`goggame-<id>.script`) sets are read the way [Heroic Games Launcher](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher)'s GOG setup (GPL-3.0) reads them. LSFG frame generation is from the work of Camille LaVey and the [Eden](https://eden-emu.dev) emulator project, following [lsfg-vk](https://github.com/PancakeTAS/lsfg-vk), ported to WinNative and DroidDeck by [@maxjivi05](https://github.com/maxjivi05); it needs your own copy of [Lossless Scaling](https://store.steampowered.com/app/993090/) and ships none of its shaders. x86 AppImages, and any whose own runtime cannot unpack them, are unpacked with [uruntime](https://github.com/VHSgunzo/uruntime) by VHSgunzo (MIT), shipped unmodified with its licence, which also starts the arm64 emulator AppImages whose own runtime cannot run its extractor on Android. x86 AppImages packed with [sharun](https://github.com/VHSgunzo/sharun) by VHSgunzo (MIT) start because DroidDeck's own [FEX](https://github.com/FEX-Emu/FEX) build (MIT) puts the platform name under `AT_PLATFORM`, which sharun's [userland-execve](https://crates.io/crates/userland-execve) loader (MIT) requires; FEX filed it under `AT_BASE_PLATFORM`. The Steam client's audio goes through [@The412Banner](https://github.com/The412Banner)'s [DirectAudio](https://github.com/The412Banner/directaudio) PulseAudio sink (LGPL-2.1-or-later), built from `tools/directaudio/sink` with its request size kept to its ring so clients are not asked to queue 100 ms ahead. mmap ring-buffer controller input was developed by ribbit384 ([WinNative #345](https://github.com/WinNative-Emu/WinNative/pull/345)). Why the x86-64 Steam client refused the arm64 client's sign-in was checked by reading Steam's saved token with the `ConnectCache` format from [deadlock-api-ingest](https://github.com/deadlock-api/deadlock-api-ingest). x86 programs that link OpenSSL 3 under FEX use the copy in the [Steam Linux Runtime 4.0](https://gitlab.steamos.cloud/steamrt/steamrt) platform. Hooks written with `WriteProcessMemory` into code [FEX](https://github.com/FEX-Emu/FEX) has translated go through `/proc/<pid>/mem` again when the kernel refuses `process_vm_writev`, as [Wine](https://gitlab.winehq.org/wine/wine)'s `server/ptrace.c` wrote them before Wine 11. x86 Linux games under FEX get the same `/etc/asound.conf` that [pressure-vessel](https://gitlab.steamos.cloud/steamrt/steam-runtime-tools) writes into the Steam Linux Runtime, so ALSA plays through PulseAudio. Games render with [Mesa](https://gitlab.freedesktop.org/mesa/mesa) Turnip's own per-render-pass choice between tile memory and system memory, while the Steam client keeps `TU_DEBUG=sysmem`; [FEX](https://github.com/FEX-Emu/FEX)'s code disk cache was checked in its source and is already on through Proton. The proot fast path picks the guest name of a host file bound under several names in the order [PRoot](https://github.com/proot-me/proot)'s `path/binding.c` (GPL-2.0-or-later) sorts its bindings, so links and `/proc/self/fd` read back as they do through proot. The session's [PipeWire](https://gitlab.freedesktop.org/pipewire/pipewire) (MIT) opens its sockets with the per-socket access settings documented in its `module-access.c`, and [WirePlumber](https://gitlab.freedesktop.org/pipewire/wireplumber) (MIT) keeps those clients at full permissions through its `access.rules`. Wine write watches use the userfaultLine truncated
|
||||
GPL-3.0. Runtime, shim, input, and controller work build on WinNative and Bannerlator (maxjivi05). Epic Games and GOG support build on [Phobos’s](https://github.com/phobos665) adaptation of [Legendary](https://github.com/legendary-gl/legendary) and [gogdl](https://github.com/Heroic-Games-Launcher/heroic-gogdl), respectively. Battle.net support is [@kayakyakr](https://github.com/kayakyakr)'s: it runs Blizzard's own Battle.net client, downloaded from Blizzard and not included, in Proton, and shows the key art from each game's [Battle.net Shop](https://shop.battle.net) page; without the Steam client its games see DroidDeck's pad as an Xbox 360 controller through `PROTON_SPOOF_STEAMINPUT_VIDPID` in [Proton](https://github.com/ValveSoftware/wine)'s `dlls/winebus.sys`. Its games install from Stores through Blizzard's own Agent and the local HTTP API it serves, driven the way [@barncastle](https://github.com/barncastle)'s [Battle.Net-Installer](https://github.com/barncastle/Battle.Net-Installer) drives it, with the requests described on [wowdev.wiki](https://wowdev.wiki/Agent); how other launchers find, install and start Blizzard games was read in [@mubaraknumann](https://github.com/mubaraknumann)'s [unifideck](https://github.com/mubaraknumann/unifideck), [@djmittens](https://github.com/djmittens)'s [neo-mittens](https://github.com/djmittens/neo-mittens) `bnetswitch`, [@BCD1210](https://github.com/BCD1210)'s [soju](https://github.com/BCD1210/soju) and [Lutris](https://github.com/lutris/lutris)'s `product.db` reader, without taking their code. The registry entries a GOG game's install script (`goggame-<id>.script`) sets are read the way [Heroic Games Launcher](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher)'s GOG setup (GPL-3.0) reads them. LSFG frame generation is from the work of Camille LaVey and the [Eden](https://eden-emu.dev) emulator project, following [lsfg-vk](https://github.com/PancakeTAS/lsfg-vk), ported to WinNative and DroidDeck by [@maxjivi05](https://github.com/maxjivi05); it needs your own copy of [Lossless Scaling](https://store.steampowered.com/app/993090/) and ships none of its shaders. x86 AppImages, and any whose own runtime cannot unpack them, are unpacked with [uruntime](https://github.com/VHSgunzo/uruntime) by VHSgunzo (MIT), shipped unmodified with its licence, which also starts the arm64 emulator AppImages whose own runtime cannot run its extractor on Android. x86 AppImages packed with [sharun](https://github.com/VHSgunzo/sharun) by VHSgunzo (MIT) start because DroidDeck's own [FEX](https://github.com/FEX-Emu/FEX) build (MIT) puts the platform name under `AT_PLATFORM`, which sharun's [userland-execve](https://crates.io/crates/userland-execve) loader (MIT) requires; FEX filed it under `AT_BASE_PLATFORM`. The Steam client's audio goes through [@The412Banner](https://github.com/The412Banner)'s [DirectAudio](https://github.com/The412Banner/directaudio) PulseAudio sink (LGPL-2.1-or-later), built from `tools/directaudio/sink` with its request size kept to its ring so clients are not asked to queue 100 ms ahead. mmap ring-buffer controller input was developed by ribbit384 ([WinNative #345](https://github.com/WinNative-Emu/WinNative/pull/345)). Why the x86-64 Steam client refused the arm64 client's sign-in was checked by reading Steam's saved token with the `ConnectCache` format from [deadlock-api-ingest](https://github.com/deadlock-api/deadlock-api-ingest). x86 programs that link OpenSSL 3 under FEX use the copy in the [Steam Linux Runtime 4.0](https://gitlab.steamos.cloud/steamrt/steamrt) platform. Hooks written with `WriteProcessMemory` into code [FEX](https://github.com/FEX-Emu/FEX) has translated go through `/proc/<pid>/mem` again when the kernel refuses `process_vm_writev`, as [Wine](https://gitlab.winehq.org/wine/wine)'s `server/ptrace.c` wrote them before Wine 11. x86 Linux games under FEX get the same `/etc/asound.conf` that [pressure-vessel](https://gitlab.steamos.cloud/steamrt/steam-runtime-tools) writes into the Steam Linux Runtime, so ALSA plays through PulseAudio. Games render with [Mesa](https://gitlab.freedesktop.org/mesa/mesa) Turnip's own per-render-pass choice between tile memory and system memory, while the Steam client keeps `TU_DEBUG=sysmem`; [FEX](https://github.com/FEX-Emu/FEX)'s code disk cache was checked in its source and is already on through Proton. The proot fast path picks the guest name of a host file bound under several names in the order [PRoot](https://github.com/proot-me/proot)'s `path/binding.c` (GPL-2.0-or-later) sorts its bindings, so links and `/proc/self/fd` read back as they do through proot. The session's [PipeWire](https://gitlab.freedesktop.org/pipewire/pipewire) (MIT) opens its sockets with the per-socket access settings documented in its `module-access.c`, and [WirePlumber](https://gitlab.freedesktop.org/pipewire/wireplumber) (MIT) keeps those clients at full permissions through its `access.rules`. Wine write watches use the userfaultLine truncated
|
||||
|
||||
XR glasses support builds on WinNative's VITURE glasses work. VITURE protocol details were checked against [XRLinuxDriver](https://github.com/wheaney/XRLinuxDriver) by [@wheaney](https://github.com/wheaney), including the VITURE protocol header it ships, [ar-drivers-rs](https://github.com/badicsalex/ar-drivers-rs) by [@badicsalex](https://github.com/badicsalex) and the [go-macos/iokit VITURE package](https://pkg.go.dev/github.com/go-macos/iokit/viture); the optional VITURE SDK belongs to VITURE and is not included. RayNeo support adapts [@informalTechCode](https://github.com/informalTechCode)'s [RayNeo-Air-Series-3DoF-Scaffold](https://github.com/informalTechCode/RayNeo-Air-Series-3DoF-Scaffold) (Apache-2.0) and references [@verncat](https://github.com/verncat)'s [RayNeo-Air-3S-Pro-OpenVR](https://github.com/verncat/RayNeo-Air-3S-Pro-OpenVR) (MIT) and [Monado](https://gitlab.freedesktop.org/monado/monado) (BSL-1.0); see [docs/third-party/rayneo](docs/third-party/rayneo/README.md). XREAL 1S support references [XRLinuxDriver](https://github.com/wheaney/XRLinuxDriver) and [xrealOneDeviceKit](https://github.com/wheaney/xrealOneDeviceKit) by @wheaney, [xreal_one_driver](https://github.com/rohitsangwan01/xreal_one_driver) by [@rohitsangwan01](https://github.com/rohitsangwan01) (MIT) and [xr-tools](https://github.com/0xcaff/xr-tools) by [@0xcaff](https://github.com/0xcaff). Rokid support follows the Rokid protocol notes in [ar-drivers-rs](https://github.com/badicsalex/ar-drivers-rs) and @badicsalex's [Void Computing write-ups](https://voidcomputing.hu/blog/worse-better-prettier/), and [Monado](https://gitlab.freedesktop.org/monado/monado)'s Rokid driver. The REDMAGIC glasses-display findings draw on [@mekhontsev](https://github.com/mekhontsev)'s [MagicDesk investigation](https://github.com/mekhontsev/magicdesk/blob/main/docs/xr-resolution-fix.md) and [@Coding-BR](https://github.com/Coding-BR)'s [decompiled Nubia kernel](https://github.com/Coding-BR/android_kernel_nubia_sm8850_qwjujube). VITURE, RayNeo, XREAL, Rokid and REDMAGIC are trademarks of their owners; this project is not affiliated with them.
|
||||
|
||||
|
||||
@@ -58,6 +58,15 @@
|
||||
<meta-data android:name="android.game_mode_config" android:resource="@xml/game_mode_config" />
|
||||
<service android:name=".glasses.LumaRgbCaptureService" android:exported="false"
|
||||
android:process=":rgb_diagnostic" />
|
||||
<service android:name=".input.HomeButtonService"
|
||||
android:label="@string/integration_shortcuts_service"
|
||||
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.accessibilityservice.AccessibilityService" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.accessibilityservice" android:resource="@xml/home_button_service" />
|
||||
</service>
|
||||
<meta-data android:name="com.oculus.supportedDevices" android:value="quest2|quest3|quest3s" />
|
||||
<activity android:name=".QuestXrActivity" android:exported="true" android:launchMode="singleTask"
|
||||
android:permission="android.permission.DUMP"
|
||||
|
||||
@@ -268,7 +268,7 @@ static struct wl_event_source *g_fallback_timer;
|
||||
static int g_fallback_armed;
|
||||
|
||||
volatile int g_fps_limit;
|
||||
/* fps limit -1 (phone output, not mirrored): replaced buffers go back to the client at once instead of once per refresh. */
|
||||
/* fps limit -1 (Performance mode without a limit): replaced buffers go back to the client at once instead of once per refresh. */
|
||||
volatile int g_release_unpaced;
|
||||
|
||||
volatile int g_hide_shell;
|
||||
|
||||
@@ -52,6 +52,7 @@ import com.droiddeck.launcher.core.PhantomProcessLimit
|
||||
import com.droiddeck.launcher.core.PhantomProcessStatus
|
||||
import com.droiddeck.launcher.core.WirelessAdbFix
|
||||
import com.droiddeck.launcher.core.WifiDiscovery
|
||||
import com.droiddeck.launcher.core.SteamIntegration
|
||||
import com.droiddeck.launcher.core.WirelessAdbPairingService
|
||||
import com.droiddeck.launcher.ui.CoreRow
|
||||
import com.droiddeck.launcher.ui.PerformancePage
|
||||
@@ -197,6 +198,8 @@ class FrontEndActivity : ComponentActivity() {
|
||||
private var wifiDiscoveryLocation by mutableStateOf(false)
|
||||
private var wifiDiscoveryAsked by mutableStateOf(false)
|
||||
private var wifiDiscoveryBlocked by mutableStateOf(false)
|
||||
private var integrationState by mutableStateOf(SteamIntegration.State())
|
||||
private var integrationFocus by mutableStateOf<SteamIntegration.Feature?>(null)
|
||||
private val wifiLocationReceiver = object : android.content.BroadcastReceiver() {
|
||||
override fun onReceive(context: android.content.Context?, intent: Intent?) {
|
||||
refreshWifiDiscovery()
|
||||
@@ -265,8 +268,65 @@ class FrontEndActivity : ComponentActivity() {
|
||||
SessionPrefs.setWifiDiscoveryEnabled(this, false)
|
||||
}
|
||||
wifiDiscovery = SessionPrefs.wifiDiscoveryEnabled(this)
|
||||
integrationState = readIntegration()
|
||||
}
|
||||
|
||||
private var shortcutsTried = false
|
||||
|
||||
private fun readIntegration() = SteamIntegration.read(this)
|
||||
.copy(locationBlocked = wifiDiscoveryBlocked, shortcutsTried = shortcutsTried)
|
||||
|
||||
private fun openIntegration(feature: SteamIntegration.Feature? = null) {
|
||||
SteamIntegration.dismissSuggestion(this)
|
||||
refreshWifiDiscovery()
|
||||
integrationState = readIntegration()
|
||||
integrationFocus = feature
|
||||
navRequest = "setup:integration"
|
||||
}
|
||||
|
||||
private fun readIntegrationIntent(incoming: Intent) {
|
||||
if (incoming.action != SteamIntegration.ACTION_SETUP) return
|
||||
openIntegration(incoming.getStringExtra(SteamIntegration.EXTRA_FEATURE)?.let {
|
||||
runCatching { SteamIntegration.Feature.valueOf(it) }.getOrNull()
|
||||
})
|
||||
}
|
||||
|
||||
private fun integrationSettings(intent: Intent, fallback: String = android.provider.Settings.ACTION_SETTINGS) {
|
||||
try { startActivity(intent) }
|
||||
catch (_: android.content.ActivityNotFoundException) { startActivity(Intent(fallback)) }
|
||||
catch (_: SecurityException) { startActivity(Intent(fallback)) }
|
||||
}
|
||||
|
||||
private fun configureIntegration(feature: SteamIntegration.Feature) {
|
||||
when (feature) {
|
||||
SteamIntegration.Feature.WIFI -> {
|
||||
if (wifiDiscovery && wifiDiscoveryPermission) {
|
||||
SessionPrefs.setWifiDiscoveryEnabled(this, false)
|
||||
} else if (wifiDiscoveryPermission) {
|
||||
SessionPrefs.setWifiDiscoveryEnabled(this, true)
|
||||
} else {
|
||||
SessionPrefs.setWifiDiscoveryAsked(this)
|
||||
wifiLocationPermission.launch(WifiDiscovery.permissions)
|
||||
}
|
||||
refreshWifiDiscovery()
|
||||
}
|
||||
SteamIntegration.Feature.BRIGHTNESS -> integrationSettings(SteamIntegration.brightnessSettings(this))
|
||||
SteamIntegration.Feature.HOME -> if (HomeApp.isDefault(this)) HomeApp.openSystemHomeSettings(this) else {
|
||||
HomeApp.setHomeScreenEnabled(this, true)
|
||||
refreshHomeAppState()
|
||||
manageHomeApp()
|
||||
}
|
||||
SteamIntegration.Feature.SHORTCUTS -> {
|
||||
if (!integrationState.shortcuts) shortcutsTried = true
|
||||
if (!HomeApp.isDefault(this)) configureIntegration(SteamIntegration.Feature.HOME)
|
||||
else integrationSettings(SteamIntegration.shortcutSettings(this), android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun openAppInfo() =
|
||||
integrationSettings(Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.parse("package:$packageName")))
|
||||
|
||||
private fun openWifiDiscoverySettings() {
|
||||
if (!WifiDiscovery.permissionGranted(this)) {
|
||||
wifiPermissionSettings.launch(Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
|
||||
@@ -401,6 +461,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
private var theme by mutableStateOf("graphite")
|
||||
private var appScale by mutableStateOf(com.droiddeck.launcher.core.AppUiPrefs.DEFAULT_SCALE)
|
||||
private var hdrOn by mutableStateOf(false)
|
||||
private var performanceMode by mutableStateOf(false)
|
||||
private var upscaler by mutableStateOf(0)
|
||||
private var upscaleSharpness by mutableStateOf(75)
|
||||
private var hdrReason by mutableStateOf<String?>(null)
|
||||
@@ -838,6 +899,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
if (savedInstanceState == null) readIntegrationIntent(intent)
|
||||
readGameIntent(intent)
|
||||
gameSyncFolder = GameFileSync.folder(this)
|
||||
displayManager = getSystemService(DISPLAY_SERVICE) as DisplayManager
|
||||
@@ -904,6 +966,8 @@ class FrontEndActivity : ComponentActivity() {
|
||||
isHomeApp = homeAppSelected,
|
||||
homeScreenEnabled = homeScreenEnabled,
|
||||
defaultHomeLabel = defaultHomeLabel,
|
||||
integration = integrationState,
|
||||
integrationFocus = integrationFocus,
|
||||
androidApps = androidApps,
|
||||
secondScreenDisplays = secondScreenDisplays,
|
||||
packages = packageRows,
|
||||
@@ -1143,6 +1207,14 @@ class FrontEndActivity : ComponentActivity() {
|
||||
downloadProxy = DownloadSource.proxyHostPort(this)
|
||||
},
|
||||
onHomeApp = { manageHomeApp() },
|
||||
onSteamIntegration = ::openIntegration,
|
||||
onIntegration = { integrationFocus = null; configureIntegration(it) },
|
||||
onIntegrationAppInfo = ::openAppInfo,
|
||||
onIntegrationLocation = ::openWifiDiscoverySettings,
|
||||
onDismissIntegration = {
|
||||
SteamIntegration.dismissSuggestion(this)
|
||||
integrationState = readIntegration()
|
||||
},
|
||||
onHomeScreen = { on ->
|
||||
HomeApp.setHomeScreenEnabled(this, on)
|
||||
refreshHomeAppState()
|
||||
@@ -1335,6 +1407,10 @@ class FrontEndActivity : ComponentActivity() {
|
||||
override fun onNewIntent(intent: Intent) {
|
||||
super.onNewIntent(intent)
|
||||
setIntent(intent)
|
||||
if (intent.action == SteamIntegration.ACTION_SETUP) {
|
||||
readIntegrationIntent(intent)
|
||||
return
|
||||
}
|
||||
readGameIntent(intent)
|
||||
refresh()
|
||||
startSteamAtStartupIfEnabled()
|
||||
@@ -1520,6 +1596,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
homeAppSelected = homeScreenEnabled && HomeApp.isDefault(this)
|
||||
defaultHomeLabel = HomeApp.defaultLabel(this)
|
||||
androidApps = if (homeAppSelected) HomeApp.launchableApps(this) else emptyList()
|
||||
integrationState = readIntegration()
|
||||
}
|
||||
|
||||
private fun refreshSecondScreenDisplays() {
|
||||
@@ -1809,7 +1886,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
ModeSettings(
|
||||
mode = mode, resolution = resolution,
|
||||
panelSize = com.droiddeck.launcher.session.SessionDisplay.panelSize(this),
|
||||
hdr = hdrOn, hdrReason = hdrReason,
|
||||
hdr = hdrOn, hdrReason = hdrReason, performanceMode = performanceMode,
|
||||
upscaler = upscaler, upscaleSharpness = upscaleSharpness,
|
||||
gpuDrivers = drivers.summary(),
|
||||
touchMode = touchMode,
|
||||
@@ -1843,11 +1920,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
bootMovieCustomName = bootMovieCustomName,
|
||||
bootMovieImporting = bootMovieImporting,
|
||||
bootMovieProgress = bootMovieProgress,
|
||||
wifiDiscovery = if (mode == SessionService.MODE_STEAM) wifiDiscovery else null,
|
||||
wifiDiscoveryPermission = wifiDiscoveryPermission,
|
||||
wifiDiscoveryLocation = wifiDiscoveryLocation,
|
||||
wifiDiscoveryAsked = wifiDiscoveryAsked,
|
||||
wifiDiscoveryBlocked = wifiDiscoveryBlocked,
|
||||
integration = if (mode == SessionService.MODE_STEAM) integrationState else null,
|
||||
deckyInstalled = if (mode == SessionService.MODE_STEAM) decky.deckyInstalled else null,
|
||||
deckyLatestRelease = if (mode == SessionService.MODE_STEAM) decky.deckyLatest else null,
|
||||
deckyBranch = decky.deckyBranch,
|
||||
@@ -1856,24 +1929,13 @@ class FrontEndActivity : ComponentActivity() {
|
||||
deckyEnabled = decky.deckySupervisor, deckySessionRunning = SessionState.running,
|
||||
),
|
||||
ModeSettingsActions(
|
||||
onWifiDiscovery = { on ->
|
||||
if (!on) {
|
||||
SessionPrefs.setWifiDiscoveryEnabled(this, false)
|
||||
refreshWifiDiscovery()
|
||||
} else if (WifiDiscovery.permissionGranted(this)) {
|
||||
SessionPrefs.setWifiDiscoveryEnabled(this, true)
|
||||
refreshWifiDiscovery()
|
||||
} else if (wifiDiscoveryBlocked) {
|
||||
openWifiDiscoverySettings()
|
||||
} else {
|
||||
SessionPrefs.setWifiDiscoveryAsked(this)
|
||||
wifiLocationPermission.launch(WifiDiscovery.permissions)
|
||||
}
|
||||
},
|
||||
onWifiDiscoverySettings = { openWifiDiscoverySettings() },
|
||||
onIntegration = ::configureIntegration,
|
||||
onIntegrationAppInfo = ::openAppInfo,
|
||||
onIntegrationLocation = ::openWifiDiscoverySettings,
|
||||
onResolution = { value -> SessionPrefs.setResolutionChoice(this, mode, value); resolution = value },
|
||||
onHdr = { on -> SessionPrefs.setHdr(this, mode, on); hdrOn = on },
|
||||
onGpuDrivers = { openComponents(focusContent = true, tab = com.droiddeck.launcher.ui.GPU_TAB) },
|
||||
onPerformanceMode = { on -> SessionPrefs.setPerformanceMode(this, mode, on); performanceMode = on },
|
||||
onUpscaler = { m -> SessionPrefs.setUpscaler(this, m); upscaler = m },
|
||||
onUpscaleSharpness = { pct -> SessionPrefs.setUpscaleSharpness(this, pct); upscaleSharpness = pct },
|
||||
onTouch = { t -> SessionPrefs.setTouchMode(this, t); touchMode = t },
|
||||
@@ -2124,6 +2186,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
runSteamAtStartup = SessionPrefs.runSteamAtStartup(this)
|
||||
loadBootMovie()
|
||||
hdrOn = SessionPrefs.hdr(this, mode)
|
||||
performanceMode = SessionPrefs.performanceMode(this, mode)
|
||||
upscaler = SessionPrefs.upscaler(this)
|
||||
upscaleSharpness = SessionPrefs.upscaleSharpness(this)
|
||||
hdrReason = com.droiddeck.launcher.wayland.HdrSupport.probe(this).reason
|
||||
|
||||
@@ -498,6 +498,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
}
|
||||
com.droiddeck.launcher.gpu.SteamVrHealth.begin(this, SessionState.sessionId)
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||
if (!SessionState.running) {
|
||||
val prefMode = SessionPrefs.prefMode(intent.getStringExtra(SessionService.EXTRA_MODE) ?: SessionService.MODE_STEAM)
|
||||
SessionState.performanceMode = SessionPrefs.performanceMode(this, prefMode)
|
||||
}
|
||||
applyOutputPacing()
|
||||
if (!SessionState.running) SessionState.followScreen = followChoice()
|
||||
applyFollowOrientation(resources.configuration)
|
||||
@@ -784,6 +788,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
LaunchedEffect(drawerOpen, pcKeyboardOpen, achievementsOpen, gestureSettingsOpen, pipUi, SessionState.suspended) {
|
||||
if (drawerOpen || pcKeyboardOpen || achievementsOpen || gestureSettingsOpen || pipUi || SessionState.suspended) {
|
||||
backQamInput.cancel()
|
||||
com.droiddeck.launcher.input.HomeButtonShortcuts.cancel(this@SessionActivity)
|
||||
cancelTouchGestures()
|
||||
screenKeys?.stopEditing()
|
||||
}
|
||||
@@ -1994,7 +1999,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
private fun mirrorRefreshLimit(): Int =
|
||||
GlassesRendering.mirrorRefreshLimit(glassesSettings, glasses, glassesScreen != null)
|
||||
|
||||
private fun outputFpsLimit(): Int = SessionPrefs.compositorFpsLimit(mirrorRefreshLimit())
|
||||
private fun outputFpsLimit(): Int = SessionPrefs.compositorFpsLimit(
|
||||
mirrorRefreshLimit(), SessionState.performanceMode,
|
||||
)
|
||||
|
||||
private fun applyOutputPacing() {
|
||||
Log.i(TAG, "perf: " + PerfMode.apply(this, outputFpsLimit(), mirrorRefreshLimit()))
|
||||
@@ -2121,6 +2128,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
}
|
||||
|
||||
private fun releasePads() {
|
||||
com.droiddeck.launcher.input.HomeButtonShortcuts.cancel(this)
|
||||
backQamInput.cancel()
|
||||
padBridge?.releaseAll()
|
||||
joyConVr?.releaseButtons()
|
||||
@@ -3271,6 +3279,15 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
onScreenControls?.reload()
|
||||
controllerSettings = ControllerPrefs.read(this)
|
||||
resumed = true
|
||||
com.droiddeck.launcher.input.HomeButtonShortcuts.attach(this,
|
||||
enabled = {
|
||||
resumed && window.decorView.hasWindowFocus() && !ended && !drawerOpen && !pcKeyboardOpen &&
|
||||
!achievementsOpen && !gestureSettingsOpen && !pipUi && SessionState.running && !SessionState.suspended &&
|
||||
SessionState.mode == SessionService.MODE_STEAM && padBridge?.canHoldGuide() == true
|
||||
},
|
||||
setPressed = { padBridge?.setHomeGuidePressed(it) },
|
||||
onCancel = { padBridge?.cancelHomeGuide() },
|
||||
)
|
||||
updatePointerCapture()
|
||||
if (!pipUi) sessionClipboard.start()
|
||||
updatePadMotion()
|
||||
@@ -3282,6 +3299,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
com.droiddeck.launcher.input.HomeButtonShortcuts.detach(this)
|
||||
if (runtimeRemovalBlocked) { super.onPause(); return }
|
||||
backQamInput.cancel()
|
||||
capturePausedFrame()
|
||||
@@ -3667,6 +3685,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
|
||||
override fun onWindowFocusChanged(hasFocus: Boolean) {
|
||||
super.onWindowFocusChanged(hasFocus)
|
||||
if (!hasFocus) com.droiddeck.launcher.input.HomeButtonShortcuts.cancel(this)
|
||||
if (!hasFocus) backQamInput.cancel()
|
||||
if (!hasFocus && ::padMouse.isInitialized) padMouse.reset()
|
||||
if (runtimeRemovalBlocked) return
|
||||
@@ -3715,6 +3734,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
com.droiddeck.launcher.input.HomeButtonShortcuts.detach(this)
|
||||
backQamInput.cancel()
|
||||
steamVrRecovery.close()
|
||||
uiHandler.removeCallbacks(steamTouchRetry)
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
import android.accessibilityservice.AccessibilityServiceInfo
|
||||
import android.content.ComponentName
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.provider.Settings
|
||||
import android.view.accessibility.AccessibilityManager
|
||||
import com.droiddeck.launcher.HomeApp
|
||||
import com.droiddeck.launcher.input.HomeButtonService
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
|
||||
object SteamIntegration {
|
||||
const val ACTION_SETUP = "com.droiddeck.launcher.STEAM_INTEGRATION"
|
||||
const val EXTRA_FEATURE = "integration_feature"
|
||||
enum class Feature { WIFI, BRIGHTNESS, HOME, SHORTCUTS }
|
||||
|
||||
data class State(
|
||||
val wifi: Boolean = false,
|
||||
val locationPermission: Boolean = false,
|
||||
val locationOn: Boolean = false,
|
||||
val locationBlocked: Boolean = false,
|
||||
val brightness: Boolean = false,
|
||||
val home: Boolean = false,
|
||||
val shortcuts: Boolean = false,
|
||||
val shortcutsRestricted: Boolean = false,
|
||||
val shortcutsTried: Boolean = false,
|
||||
val suggested: Boolean = true,
|
||||
)
|
||||
|
||||
fun read(context: Context) = State(
|
||||
wifi = SessionPrefs.wifiDiscoveryEnabled(context),
|
||||
locationPermission = WifiDiscovery.permissionGranted(context),
|
||||
locationOn = WifiDiscovery.locationEnabled(context),
|
||||
brightness = Settings.System.canWrite(context),
|
||||
home = HomeApp.isDefault(context),
|
||||
shortcuts = context.getSystemService(AccessibilityManager::class.java)
|
||||
.getEnabledAccessibilityServiceList(AccessibilityServiceInfo.FEEDBACK_ALL_MASK).any {
|
||||
val service = it.resolveInfo.serviceInfo
|
||||
ComponentName(service.packageName, service.name) == ComponentName(context, HomeButtonService::class.java)
|
||||
},
|
||||
shortcutsRestricted = restrictedSettings(context),
|
||||
suggested = !SessionPrefs.sessionPrefs(context).getBoolean("steam_integration_seen", false),
|
||||
)
|
||||
|
||||
// Android 13+ blocks accessibility services for sideloaded APKs until the user allows restricted settings in App info.
|
||||
// MODE_DEFAULT is inconclusive on Android 15, so only an explicit denial counts here.
|
||||
private fun restrictedSettings(context: Context): Boolean {
|
||||
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.TIRAMISU) return false
|
||||
val mode = runCatching {
|
||||
context.getSystemService(android.app.AppOpsManager::class.java)
|
||||
.unsafeCheckOpNoThrow("android:access_restricted_settings", android.os.Process.myUid(), context.packageName)
|
||||
}.getOrDefault(android.app.AppOpsManager.MODE_ALLOWED)
|
||||
return mode == android.app.AppOpsManager.MODE_ERRORED || mode == android.app.AppOpsManager.MODE_IGNORED
|
||||
}
|
||||
|
||||
fun dismissSuggestion(context: Context) {
|
||||
SessionPrefs.sessionPrefs(context).edit().putBoolean("steam_integration_seen", true).apply()
|
||||
}
|
||||
|
||||
fun brightnessSettings(context: Context) = Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS,
|
||||
Uri.parse("package:${context.packageName}"))
|
||||
|
||||
// ACCESSIBILITY_DETAILS_SETTINGS is restricted to system apps; the fragment args key highlights our entry in the list.
|
||||
fun shortcutSettings(context: Context): Intent {
|
||||
val service = ComponentName(context, HomeButtonService::class.java).flattenToString()
|
||||
return Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS)
|
||||
.putExtra(":settings:fragment_args_key", service)
|
||||
.putExtra(":settings:show_fragment_args", android.os.Bundle().apply { putString(":settings:fragment_args_key", service) })
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.droiddeck.launcher.input
|
||||
|
||||
import android.accessibilityservice.AccessibilityService
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.hardware.input.InputManager
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.view.KeyEvent
|
||||
import android.view.accessibility.AccessibilityEvent
|
||||
import com.droiddeck.launcher.HomeApp
|
||||
|
||||
object HomeButtonShortcuts {
|
||||
private var owner: Any? = null
|
||||
private var enabled: () -> Boolean = { false }
|
||||
private var setPressed: (Boolean) -> Unit = {}
|
||||
private var onCancel: () -> Unit = {}
|
||||
private val input = HomeGuideInput({ setPressed(it) }, { onCancel() })
|
||||
|
||||
fun attach(owner: Any, enabled: () -> Boolean, setPressed: (Boolean) -> Unit, onCancel: () -> Unit) {
|
||||
input.cancel()
|
||||
this.owner = owner
|
||||
this.enabled = enabled
|
||||
this.setPressed = setPressed
|
||||
this.onCancel = onCancel
|
||||
}
|
||||
|
||||
fun cancel(owner: Any) { if (this.owner === owner) input.cancel() }
|
||||
|
||||
fun detach(owner: Any) {
|
||||
if (this.owner !== owner) return
|
||||
input.cancel()
|
||||
this.owner = null
|
||||
enabled = { false }
|
||||
setPressed = {}
|
||||
onCancel = {}
|
||||
}
|
||||
|
||||
fun onKeyEvent(context: Context, event: KeyEvent): Boolean {
|
||||
if (event.keyCode != KeyEvent.KEYCODE_HOME) return false
|
||||
return input.onKeyEvent(event, enabled() && HomeApp.isDefault(context))
|
||||
}
|
||||
|
||||
fun release() = input.cancel()
|
||||
fun onDeviceRemoved(device: Int) = input.onDeviceRemoved(device)
|
||||
}
|
||||
|
||||
class HomeButtonService : AccessibilityService(), InputManager.InputDeviceListener {
|
||||
override fun onServiceConnected() {
|
||||
getSystemService(InputManager::class.java).registerInputDeviceListener(this, Handler(Looper.getMainLooper()))
|
||||
}
|
||||
|
||||
override fun onKeyEvent(event: KeyEvent) = HomeButtonShortcuts.onKeyEvent(this, event)
|
||||
override fun onAccessibilityEvent(event: AccessibilityEvent?) {}
|
||||
override fun onInterrupt() { HomeButtonShortcuts.release() }
|
||||
override fun onInputDeviceAdded(deviceId: Int) {}
|
||||
override fun onInputDeviceChanged(deviceId: Int) {}
|
||||
override fun onInputDeviceRemoved(deviceId: Int) { HomeButtonShortcuts.onDeviceRemoved(deviceId) }
|
||||
|
||||
override fun onUnbind(intent: Intent?): Boolean {
|
||||
HomeButtonShortcuts.release()
|
||||
return super.onUnbind(intent)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
HomeButtonShortcuts.release()
|
||||
getSystemService(InputManager::class.java).unregisterInputDeviceListener(this)
|
||||
super.onDestroy()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.droiddeck.launcher.input
|
||||
|
||||
import android.view.KeyEvent
|
||||
|
||||
class HomeGuideInput(private val setPressed: (Boolean) -> Unit, private val onCancel: () -> Unit = {}) {
|
||||
private val presses = mutableSetOf<Int>()
|
||||
private val cancelled = mutableSetOf<Int>()
|
||||
|
||||
fun onKeyEvent(event: KeyEvent, enabled: Boolean): Boolean {
|
||||
if (event.keyCode != KeyEvent.KEYCODE_HOME) return false
|
||||
if (!enabled) cancel()
|
||||
val device = event.deviceId
|
||||
return when (event.action) {
|
||||
KeyEvent.ACTION_DOWN -> {
|
||||
if (event.repeatCount > 0) return device in presses || device in cancelled
|
||||
cancelled.remove(device)
|
||||
if (!enabled || event.isCanceled) return false
|
||||
if (presses.add(device) && presses.size == 1) setPressed(true)
|
||||
true
|
||||
}
|
||||
KeyEvent.ACTION_UP -> {
|
||||
val owned = presses.remove(device)
|
||||
val wasCancelled = cancelled.remove(device)
|
||||
if (owned && presses.isEmpty()) setPressed(false)
|
||||
owned || wasCancelled
|
||||
}
|
||||
else -> device in presses || device in cancelled
|
||||
}
|
||||
}
|
||||
|
||||
fun cancel() {
|
||||
val held = presses.isNotEmpty()
|
||||
cancelled.addAll(presses)
|
||||
presses.clear()
|
||||
if (held) { onCancel(); setPressed(false) }
|
||||
}
|
||||
|
||||
fun onDeviceRemoved(device: Int) {
|
||||
cancelled.remove(device)
|
||||
if (presses.remove(device) && presses.isEmpty()) { onCancel(); setPressed(false) }
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,7 @@ public final class PadBridge {
|
||||
private boolean systemGuidePressed;
|
||||
private boolean systemQamPressed;
|
||||
private boolean backQamPressed;
|
||||
private boolean homeGuidePressed;
|
||||
private final PadState lastBackQamReport = new PadState();
|
||||
private final PadState lastWrittenReport = new PadState();
|
||||
private boolean backQamAxesBlocked;
|
||||
@@ -136,6 +137,7 @@ public final class PadBridge {
|
||||
}
|
||||
|
||||
private void resetBuiltin() {
|
||||
homeGuidePressed = false;
|
||||
clearBackQamWrites();
|
||||
routedTouch.clear();
|
||||
systemGuidePressed = false;
|
||||
@@ -159,6 +161,7 @@ public final class PadBridge {
|
||||
}
|
||||
|
||||
public synchronized void stop() {
|
||||
homeGuidePressed = false;
|
||||
clearBackQamWrites();
|
||||
releaseBackPaddles();
|
||||
activeControllerId = NO_CONTROLLER;
|
||||
@@ -481,6 +484,7 @@ public final class PadBridge {
|
||||
}
|
||||
|
||||
public synchronized void releaseAll() {
|
||||
homeGuidePressed = false;
|
||||
clearBackQamWrites();
|
||||
routedTouch.clear();
|
||||
backQamPressed = false;
|
||||
@@ -508,10 +512,33 @@ public final class PadBridge {
|
||||
return builtinPad && nativeQam();
|
||||
}
|
||||
|
||||
public boolean canHoldGuide() {
|
||||
return builtinPad;
|
||||
}
|
||||
|
||||
public synchronized void setHomeGuidePressed(boolean pressed) {
|
||||
if (pressed && !canHoldGuide()) return;
|
||||
if (homeGuidePressed == pressed) return;
|
||||
homeGuidePressed = pressed;
|
||||
updateHeldModifier(PadState.GUIDE, pressed);
|
||||
}
|
||||
|
||||
public synchronized void cancelHomeGuide() {
|
||||
if (!homeGuidePressed) return;
|
||||
clearBackQamWrites();
|
||||
homeGuidePressed = false;
|
||||
state.clear();
|
||||
publish();
|
||||
}
|
||||
|
||||
public synchronized void setBackQamPressed(boolean pressed) {
|
||||
if (pressed && !canHoldQam()) return;
|
||||
if (backQamPressed == pressed) return;
|
||||
backQamPressed = pressed;
|
||||
updateHeldModifier(PadState.QAM, pressed);
|
||||
}
|
||||
|
||||
private void updateHeldModifier(int button, boolean pressed) {
|
||||
if (pressed && (open || start())) {
|
||||
backQamAxesBlocked = false;
|
||||
long now = android.os.SystemClock.uptimeMillis();
|
||||
@@ -519,10 +546,10 @@ public final class PadBridge {
|
||||
backQamDelayMs = modifierAt - now + QAM_GUIDE_LEAD_MIN_MS;
|
||||
PadState modifier = new PadState();
|
||||
modifier.copyFrom(lastBackQamReport);
|
||||
modifier.press(PadState.QAM, true);
|
||||
modifier.press(button, true);
|
||||
writeBackQamReport(modifier, modifierAt);
|
||||
}
|
||||
if (!pressed) {
|
||||
if (!pressed && !backQamPressed && !homeGuidePressed) {
|
||||
backQamAxesBlocked = hasAxes(state);
|
||||
if (!backQamWrites.isEmpty()) {
|
||||
PadState neutral = new PadState();
|
||||
@@ -578,7 +605,7 @@ public final class PadBridge {
|
||||
if (backQamAxesBlocked && !hasAxes(state)) backQamAxesBlocked = false;
|
||||
long at = android.os.SystemClock.uptimeMillis();
|
||||
// Steam must see the modifier before a partner; preserve quick press/release pairs in order.
|
||||
if (backQamPressed || !backQamWrites.isEmpty()) at += backQamDelayMs;
|
||||
if (backQamPressed || homeGuidePressed || !backQamWrites.isEmpty()) at += backQamDelayMs;
|
||||
writeBackQamReport(report, at);
|
||||
}
|
||||
|
||||
@@ -609,7 +636,8 @@ public final class PadBridge {
|
||||
live.rightX = state.rightX; live.rightY = state.rightY;
|
||||
live.leftTrigger = state.leftTrigger; live.rightTrigger = state.rightTrigger;
|
||||
}
|
||||
if ((queued && (!backQamPressed || !report.isDown(PadState.QAM))) || backQamAxesBlocked) clearAxes(live);
|
||||
boolean held = (backQamPressed && report.isDown(PadState.QAM)) || (homeGuidePressed && report.isDown(PadState.GUIDE));
|
||||
if ((queued && !held) || backQamAxesBlocked) clearAxes(live);
|
||||
lastWrittenReport.copyFrom(live);
|
||||
writer.writePad(live);
|
||||
}
|
||||
@@ -821,7 +849,7 @@ public final class PadBridge {
|
||||
statDropped++;
|
||||
return;
|
||||
}
|
||||
boolean guide = systemGuidePressed || qamChordActive;
|
||||
boolean guide = systemGuidePressed || qamChordActive || homeGuidePressed;
|
||||
boolean qam = nativeQam() && (systemQamPressed || qamTapPressed || backQamPressed);
|
||||
if (!guide && !qam) {
|
||||
writePad(state);
|
||||
|
||||
@@ -8,11 +8,9 @@ import android.app.NotificationManager
|
||||
import android.app.PendingIntent
|
||||
import android.database.ContentObserver
|
||||
import android.media.AudioManager
|
||||
import android.net.Uri
|
||||
import android.os.FileObserver
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.SystemClock
|
||||
import android.provider.Settings
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.core.SessionPart
|
||||
@@ -29,8 +27,7 @@ class DeviceControlsComponent(context: Context, root: File, private val activity
|
||||
private val directory = directory(root)
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
private var running = false
|
||||
private var pendingBrightness: Float? = null
|
||||
private var permissionRequestAt = -5_000L
|
||||
private var permissionNotified = false
|
||||
private var previous = ""
|
||||
private var revision = 0L
|
||||
init { prepareBacklight(context, root) }
|
||||
@@ -46,13 +43,8 @@ class DeviceControlsComponent(context: Context, root: File, private val activity
|
||||
override fun run() {
|
||||
if (!running) return
|
||||
consume()
|
||||
pendingBrightness?.let { value ->
|
||||
if (Settings.System.canWrite(context)) {
|
||||
pendingBrightness = null
|
||||
context.getSystemService(NotificationManager::class.java).cancel(PERMISSION_NOTIFICATION)
|
||||
brightness(value)
|
||||
}
|
||||
}
|
||||
if (permissionNotified && Settings.System.canWrite(context))
|
||||
context.getSystemService(NotificationManager::class.java).cancel(PERMISSION_NOTIFICATION)
|
||||
publish()
|
||||
handler.postDelayed(this, 250)
|
||||
}
|
||||
@@ -86,6 +78,7 @@ class DeviceControlsComponent(context: Context, root: File, private val activity
|
||||
File(directory, "$it.processing").delete()
|
||||
}
|
||||
running = true
|
||||
permissionNotified = false
|
||||
context.contentResolver.registerContentObserver(Settings.System.CONTENT_URI, true, observer)
|
||||
requests.startWatching()
|
||||
refresh.run()
|
||||
@@ -98,7 +91,6 @@ class DeviceControlsComponent(context: Context, root: File, private val activity
|
||||
handler.removeCallbacks(refresh)
|
||||
requests.stopWatching()
|
||||
context.contentResolver.unregisterContentObserver(observer)
|
||||
pendingBrightness = null
|
||||
context.getSystemService(NotificationManager::class.java).cancel(PERMISSION_NOTIFICATION)
|
||||
}
|
||||
}
|
||||
@@ -134,13 +126,13 @@ class DeviceControlsComponent(context: Context, root: File, private val activity
|
||||
|
||||
private fun brightness(value: Float) {
|
||||
if (!Settings.System.canWrite(context)) {
|
||||
pendingBrightness = value
|
||||
val now = SystemClock.elapsedRealtime()
|
||||
if (now - permissionRequestAt >= 5_000) {
|
||||
permissionRequestAt = now
|
||||
if (!permissionNotified) {
|
||||
permissionNotified = true
|
||||
try {
|
||||
val intent = Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS,
|
||||
Uri.parse("package:${context.packageName}")).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
val intent = Intent(context, com.droiddeck.launcher.FrontEndActivity::class.java)
|
||||
.setAction(com.droiddeck.launcher.core.SteamIntegration.ACTION_SETUP)
|
||||
.putExtra(com.droiddeck.launcher.core.SteamIntegration.EXTRA_FEATURE, "BRIGHTNESS")
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
|
||||
val manager = context.getSystemService(NotificationManager::class.java)
|
||||
manager.createNotificationChannel(NotificationChannel(PERMISSION_CHANNEL,
|
||||
context.getString(R.string.brightness_permission_title), NotificationManager.IMPORTANCE_DEFAULT))
|
||||
@@ -150,7 +142,8 @@ class DeviceControlsComponent(context: Context, root: File, private val activity
|
||||
.setContentTitle(context.getString(R.string.brightness_permission_title))
|
||||
.setContentText(context.getString(R.string.brightness_permission_text))
|
||||
.setContentIntent(action).setOnlyAlertOnce(true).setAutoCancel(true).build())
|
||||
if (activityVisible()) context.startActivity(intent)
|
||||
if (activityVisible()) android.widget.Toast.makeText(context, R.string.integration_brightness_needed,
|
||||
android.widget.Toast.LENGTH_LONG).show()
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Could not open brightness permission", e)
|
||||
}
|
||||
|
||||
@@ -938,15 +938,22 @@ object SessionPrefs {
|
||||
prefs(context).edit().putBoolean("hdr.$mode", on).apply()
|
||||
}
|
||||
|
||||
/**
|
||||
* Performance mode: buffers go back to the game as soon as they are replaced
|
||||
* instead of once per refresh, and gamescope's WSI layer and winex11 reuse their per-present window checks.
|
||||
*/
|
||||
fun performanceMode(context: Context, mode: String): Boolean = prefs(context).getBoolean("performanceMode.$mode", false)
|
||||
|
||||
fun setPerformanceMode(context: Context, mode: String, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("performanceMode.$mode", on).apply()
|
||||
}
|
||||
|
||||
/** Compositor frame limit that releases buffers to the game unpaced. */
|
||||
const val FPS_UNPACED = -1
|
||||
|
||||
/**
|
||||
* Buffers go back to the game as soon as they are replaced instead of once per refresh;
|
||||
* Steam's Frame Limit in the Quick Access menu caps games. Mirroring still follows the glasses' refresh rate.
|
||||
*/
|
||||
fun compositorFpsLimit(mirrorRefreshLimit: Int): Int =
|
||||
if (mirrorRefreshLimit <= 0) FPS_UNPACED else mirrorRefreshLimit
|
||||
/** Mirroring still follows the glasses' refresh rate when Performance mode is on. */
|
||||
fun compositorFpsLimit(mirrorRefreshLimit: Int, performanceMode: Boolean): Int =
|
||||
if (performanceMode && mirrorRefreshLimit <= 0) FPS_UNPACED else mirrorRefreshLimit
|
||||
|
||||
val upscalerChoices = listOf(
|
||||
0 to "Linear", 2 to "Nearest", 4 to "AMD FSR 1", 3 to "Snapdragon GSR",
|
||||
|
||||
@@ -507,13 +507,16 @@ class SessionService : Service() {
|
||||
guest.add("DXVK_HDR=1")
|
||||
Log.i(TAG, "hdr: gamescope --hdr-enabled, DXVK_HDR=1")
|
||||
}
|
||||
// gamescope's WSI layer and winex11 reuse their per-present window checks for this long.
|
||||
guest.add("DROIDDECK_WSI_BYPASS_CHECK_MS=100")
|
||||
guest.add("WINE_OFFSCREEN_CHECK_MS=100")
|
||||
// gamescope turns buffers around slower than an uncapped game draws; more images keep it drawing.
|
||||
// The WSI layer goes back to its default count while Steam's Frame Limit holds the game.
|
||||
guest.add("GAMESCOPE_WSI_MIN_IMAGE_COUNT=8")
|
||||
guest.add("GAMESCOPE_WSI_ENSURE_MIN_IMAGE_COUNT=1")
|
||||
// gamescope's WSI layer and winex11 reuse their per-present window checks for this long; 0 checks on every present.
|
||||
val windowCheckMs = if (SessionState.performanceMode) 100 else 0
|
||||
guest.add("DROIDDECK_WSI_BYPASS_CHECK_MS=$windowCheckMs")
|
||||
guest.add("WINE_OFFSCREEN_CHECK_MS=$windowCheckMs")
|
||||
if (SessionState.performanceMode) {
|
||||
// gamescope turns buffers around slower than an unpaced game draws; more images keep it drawing.
|
||||
guest.add("GAMESCOPE_WSI_MIN_IMAGE_COUNT=8")
|
||||
guest.add("GAMESCOPE_WSI_ENSURE_MIN_IMAGE_COUNT=1")
|
||||
}
|
||||
Log.i(TAG, "performance mode " + (if (SessionState.performanceMode) "on" else "off"))
|
||||
guest.add("BL_REFRESH=" + Math.round(SessionState.refreshHz))
|
||||
guest.add("BL_LOG=" + sessionLog.path)
|
||||
guest.add("BL_DEBUG_DIR=" + sessionDir.path)
|
||||
|
||||
@@ -103,6 +103,9 @@ object SessionState {
|
||||
@Volatile
|
||||
var upscaleRatio: Float = 0f
|
||||
|
||||
@Volatile
|
||||
var performanceMode = false
|
||||
|
||||
@Volatile
|
||||
var firstFrameSeen = false
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ object StoresState {
|
||||
|
||||
fun detailItem(store: Store, id: String): CatalogItem? = detailCatalogItem(
|
||||
store, id, library[store].orEmpty(),
|
||||
found[store].orEmpty() + if (store == Store.ITCH) com.droiddeck.launcher.stores.itch.ItchBrowseState.items else emptyList(),
|
||||
found[store].orEmpty() + if (store == Store.ITCH) com.droiddeck.launcher.stores.itch.ItchBrowseState.items + com.droiddeck.launcher.stores.itch.ItchCollections.items() else emptyList(),
|
||||
shelves[store],
|
||||
)
|
||||
|
||||
@@ -191,6 +191,7 @@ object StoresState {
|
||||
backend?.signOut(app)
|
||||
if (store == Store.GOG) com.droiddeck.launcher.stores.gog.GogComet.replaceAccount { StoreAccounts.clear(app, store) }
|
||||
else if (store != Store.XBOX || backend == null) StoreAccounts.clear(app, store)
|
||||
if (store == Store.ITCH) com.droiddeck.launcher.stores.itch.ItchCollections.clear()
|
||||
main.post {
|
||||
if (store == Store.XBOX && StoreAccounts.signedInAs(app, store) != null) return@post
|
||||
accounts.remove(store); library.remove(store); status.remove(store); problems.remove(store); libraryAsked.remove(store)
|
||||
|
||||
@@ -19,6 +19,11 @@ internal object ItchApi {
|
||||
|
||||
fun ownedKeys(key: String, page: Int): JSONObject? = get("/profile/owned-keys?page=$page&per_page=500", key)
|
||||
|
||||
fun collections(key: String): JSONArray? = get("/profile/collections", key)?.optJSONArray("collections")
|
||||
|
||||
fun collectionGames(key: String, collectionId: String, page: Int): JSONObject? =
|
||||
get("/collections/$collectionId/collection-games?page=$page", key)
|
||||
|
||||
fun uploads(key: String, gameId: String, downloadKeyId: String): JSONArray? =
|
||||
get("/games/$gameId/uploads" + keyQuery(downloadKeyId), key)?.optJSONArray("uploads")
|
||||
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.droiddeck.launcher.stores.itch
|
||||
|
||||
import android.content.Context
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateMapOf
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import com.droiddeck.launcher.stores.CatalogItem
|
||||
import com.droiddeck.launcher.stores.StoresState
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
internal class ItchCollection(val id: String, val title: String, val count: Int)
|
||||
|
||||
internal object ItchCollections {
|
||||
var list by mutableStateOf<List<ItchCollection>>(emptyList())
|
||||
private set
|
||||
var selected by mutableStateOf<String?>(null)
|
||||
private set
|
||||
private val games = mutableStateMapOf<String, List<CatalogItem>>()
|
||||
private val loading = ConcurrentHashMap.newKeySet<String>()
|
||||
@Volatile private var generation = 0
|
||||
|
||||
fun items(): List<CatalogItem> = games.values.flatten()
|
||||
|
||||
fun gamesOf(id: String): List<CatalogItem>? = games[id]
|
||||
|
||||
fun chosen(): ItchCollection? = list.firstOrNull { it.id == selected }
|
||||
|
||||
fun clear() {
|
||||
generation++
|
||||
StoresState.post {
|
||||
list = emptyList()
|
||||
selected = null
|
||||
games.clear()
|
||||
}
|
||||
}
|
||||
|
||||
fun load(context: Context) {
|
||||
val app = context.applicationContext
|
||||
val started = generation
|
||||
val guard = "$started:"
|
||||
if (!loading.add(guard)) return
|
||||
Thread({
|
||||
try {
|
||||
val key = ItchAuth.key(app)
|
||||
if (key.isBlank()) return@Thread
|
||||
val parsed = parseCollections(ItchApi.collections(key) ?: return@Thread)
|
||||
if (started != generation) return@Thread
|
||||
StoresState.post {
|
||||
if (started != generation) return@post
|
||||
list = parsed
|
||||
if (selected != null && parsed.none { it.id == selected }) selected = null
|
||||
}
|
||||
StoresState.logLine("itch.io: ${parsed.size} collections")
|
||||
selected?.let { fetchGames(key, it, started) }
|
||||
} finally {
|
||||
loading.remove(guard)
|
||||
}
|
||||
}, "itch-collections").start()
|
||||
}
|
||||
|
||||
fun select(context: Context, id: String?) {
|
||||
selected = id
|
||||
if (id == null) return
|
||||
val app = context.applicationContext
|
||||
val started = generation
|
||||
Thread({
|
||||
val key = ItchAuth.key(app)
|
||||
if (key.isNotBlank()) fetchGames(key, id, started)
|
||||
}, "itch-collection-games").start()
|
||||
}
|
||||
|
||||
private fun fetchGames(key: String, id: String, started: Int) {
|
||||
val guard = "$started:$id"
|
||||
if (!loading.add(guard)) return
|
||||
try {
|
||||
val out = ArrayList<CatalogItem>()
|
||||
val seen = HashSet<String>()
|
||||
var page = 1
|
||||
while (true) {
|
||||
val body = ItchApi.collectionGames(key, id, page)
|
||||
if (body == null) {
|
||||
StoresState.logLine("itch.io: collection $id page $page failed")
|
||||
return
|
||||
}
|
||||
val batch = parseGames(body)
|
||||
if (batch.isEmpty()) break
|
||||
val before = out.size
|
||||
out.addAll(batch.filter { seen.add(it.id) })
|
||||
if (out.size == before) break
|
||||
page++
|
||||
}
|
||||
val distinct = out.toList()
|
||||
StoresState.post { if (started == generation) games[id] = distinct }
|
||||
StoresState.logLine("itch.io: collection $id has ${distinct.size} games")
|
||||
} finally {
|
||||
loading.remove(guard)
|
||||
}
|
||||
}
|
||||
|
||||
internal fun parseCollections(array: JSONArray): List<ItchCollection> = (0 until array.length()).mapNotNull { i ->
|
||||
val c = array.optJSONObject(i) ?: return@mapNotNull null
|
||||
val id = c.opt("id")?.toString().orEmpty().takeIf { it.isNotBlank() && it != "null" } ?: return@mapNotNull null
|
||||
val title = c.optString("title").ifBlank { return@mapNotNull null }
|
||||
ItchCollection(id, title, c.optInt("games_count", c.optInt("gamesCount")))
|
||||
}
|
||||
|
||||
internal fun parseGames(body: JSONObject): List<CatalogItem> {
|
||||
val rows = body.optJSONArray("collection_games") ?: body.optJSONArray("collectionGames") ?: return emptyList()
|
||||
return (0 until rows.length()).mapNotNull { i ->
|
||||
rows.optJSONObject(i)?.optJSONObject("game")?.let { ItchLibrary.item(it, "") }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.SolidColor
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.graphics.vector.addPathNodes
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
internal val CollectionsIcon: ImageVector = ImageVector.Builder("Collections", 24.dp, 24.dp, 24f, 24f).apply {
|
||||
for (d in listOf(
|
||||
"M2.65,4.6H7.33V22H2.65Z",
|
||||
"M8.32,2H13V22H8.32Z",
|
||||
"M13.9,5.4H18.5L21.4,22H16.8Z",
|
||||
)) addPath(addPathNodes(d), fill = SolidColor(Color.Black))
|
||||
}.build()
|
||||
@@ -121,6 +121,8 @@ class FrontEndState(
|
||||
val isHomeApp: Boolean = false,
|
||||
val homeScreenEnabled: Boolean = false,
|
||||
val defaultHomeLabel: String? = null,
|
||||
val integration: com.droiddeck.launcher.core.SteamIntegration.State = com.droiddeck.launcher.core.SteamIntegration.State(suggested = false),
|
||||
val integrationFocus: com.droiddeck.launcher.core.SteamIntegration.Feature? = null,
|
||||
val androidApps: List<HomeApp.LaunchableApp> = emptyList(),
|
||||
val secondScreenDisplays: List<SecondScreenDisplay> = emptyList(),
|
||||
val packages: List<PackageRow>? = null,
|
||||
@@ -237,6 +239,11 @@ class FrontEndActions(
|
||||
val onLibraryChanged: () -> Unit = {},
|
||||
val onHomeApp: () -> Unit = {},
|
||||
val onHomeScreen: (Boolean) -> Unit = {},
|
||||
val onSteamIntegration: (com.droiddeck.launcher.core.SteamIntegration.Feature?) -> Unit = {},
|
||||
val onDismissIntegration: () -> Unit = {},
|
||||
val onIntegration: (com.droiddeck.launcher.core.SteamIntegration.Feature) -> Unit = {},
|
||||
val onIntegrationAppInfo: () -> Unit = {},
|
||||
val onIntegrationLocation: () -> Unit = {},
|
||||
val onAndroidApp: (HomeApp.LaunchableApp, Int?) -> Unit = { _, _ -> },
|
||||
val onBackActionsInverted: (Boolean) -> Unit = {},
|
||||
val onRefreshPhantomStatus: () -> Unit = {},
|
||||
@@ -408,6 +415,7 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com
|
||||
"stores:downloads" -> { com.droiddeck.launcher.stores.StoresState.openDownloads = true; selected = "stores" }
|
||||
"components" -> a.onComponents(true)
|
||||
"setup:launcher" -> { SetupTabs.openLauncher = true; selected = "setup" }
|
||||
"setup:integration" -> { SetupTabs.openOverview = true; selected = "setup" }
|
||||
else -> selected = target
|
||||
}
|
||||
a.onNavigated()
|
||||
|
||||
@@ -91,6 +91,7 @@ private const val LAUNCHER_TAB = 2
|
||||
|
||||
internal object SetupTabs {
|
||||
var openLauncher = false
|
||||
var openOverview = false
|
||||
}
|
||||
private const val GLASSES_TAB = 5
|
||||
|
||||
@@ -191,6 +192,7 @@ internal fun SetupPanel(
|
||||
val tabs = listOf(stringResource(R.string.setup_tab_overview), stringResource(R.string.setup_tab_controller), stringResource(R.string.setup_tab_launcher), stringResource(R.string.setup_tab_storage), stringResource(R.string.setup_tab_diagnostics), stringResource(R.string.setup_tab_glasses))
|
||||
var tab by rememberSaveable { mutableStateOf(if (SetupTabs.openLauncher) LAUNCHER_TAB else 0) }
|
||||
SetupTabs.openLauncher = false
|
||||
if (SetupTabs.openOverview) { tab = 0; SetupTabs.openOverview = false }
|
||||
val chipFocus = remember { List(tabs.size) { FocusRequester() } }
|
||||
var tabTurned by remember { mutableStateOf(false) }
|
||||
val pick: (Int) -> Unit = { i -> tab = i; tabTurned = true }
|
||||
@@ -341,6 +343,7 @@ internal fun SetupPanel(
|
||||
}
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.setup_runtime)) { runtimeCheck(false) }
|
||||
SteamIntegrationGroup(s.integration, s.integrationFocus, a.onIntegration, a.onIntegrationAppInfo, a.onIntegrationLocation)
|
||||
}
|
||||
1 -> {
|
||||
val controller = s.controller
|
||||
|
||||
@@ -89,6 +89,8 @@ import com.droiddeck.launcher.stores.StoresState
|
||||
import com.droiddeck.launcher.stores.arrangeStoreTabs
|
||||
import com.droiddeck.launcher.stores.download.DownloadEntry
|
||||
import com.droiddeck.launcher.stores.formatBytes
|
||||
import com.droiddeck.launcher.stores.itch.ItchCollection
|
||||
import com.droiddeck.launcher.stores.itch.ItchCollections
|
||||
import com.droiddeck.launcher.stores.retainOrder
|
||||
import com.droiddeck.launcher.stores.xbox.XboxLibraryFilter
|
||||
import com.droiddeck.launcher.stores.sortGames
|
||||
@@ -127,6 +129,14 @@ internal fun libraryEntries(
|
||||
return out.distinctBy { it.key }
|
||||
}
|
||||
|
||||
internal fun collectionEntries(all: List<LibraryEntry>, items: List<CatalogItem>): List<LibraryEntry> {
|
||||
val keys = items.map { it.key }.toSet()
|
||||
val itch = all.filter { it.source == Store.ITCH.id }
|
||||
val have = itch.mapNotNull { it.storeKey }.toSet()
|
||||
return itch.filter { it.storeKey in keys } +
|
||||
items.filter { it.key !in have }.map { LibraryEntry(GameRef.key(it), Store.ITCH.id, it.title, null, it, false) }
|
||||
}
|
||||
|
||||
internal fun installedFirst(entries: List<LibraryEntry>): List<LibraryEntry> = entries.partition { it.installed }.let { (on, off) -> on + off }
|
||||
|
||||
internal const val LIBRARY_ALL = "all"
|
||||
@@ -169,19 +179,30 @@ internal fun LibraryPage(s: FrontEndState, a: FrontEndActions, selected: String,
|
||||
val all = remember(s.steamGames, cloudRows, owned, installedStore) { libraryEntries(s.steamGames + cloudRows, owned, installedStore) }
|
||||
LaunchedEffect(Unit) { XboxLibraryFilter.load(ctx) }
|
||||
var showUninstalled by remember(LibraryView.ownedRequest) { mutableStateOf(SessionPrefs.libraryShowUninstalled(ctx)) }
|
||||
var collectionShows by remember { mutableStateOf<Pair<String, Boolean>?>(null) }
|
||||
val setShowUninstalled = { show: Boolean ->
|
||||
showUninstalled = show
|
||||
SessionPrefs.setLibraryShowUninstalled(ctx, show)
|
||||
val picked = ItchCollections.selected.takeIf { LibraryView.source == Store.ITCH.id }
|
||||
if (picked != null) collectionShows = picked to show
|
||||
else {
|
||||
showUninstalled = show
|
||||
SessionPrefs.setLibraryShowUninstalled(ctx, show)
|
||||
}
|
||||
}
|
||||
val sources = librarySources(all, SessionPrefs.storesTabOrder(ctx))
|
||||
val itchSignedIn = owned.containsKey(Store.ITCH)
|
||||
val listed = librarySources(all, SessionPrefs.storesTabOrder(ctx))
|
||||
val sources = if (itchSignedIn && Store.ITCH.id !in listed) listed + Store.ITCH.id else listed
|
||||
val source = LibraryView.source.takeIf { it == LIBRARY_ALL || it in sources } ?: LIBRARY_ALL
|
||||
val q = LibraryView.query.trim().lowercase()
|
||||
val xboxFilter = if (source == Store.XBOX.id) XboxLibraryFilter.current else XboxLibraryFilter.ALL
|
||||
val matching = all.filter {
|
||||
LaunchedEffect(source, itchSignedIn) { if (source == Store.ITCH.id && itchSignedIn) ItchCollections.load(ctx) }
|
||||
val collection = if (source == Store.ITCH.id) ItchCollections.chosen() else null
|
||||
val pool = if (collection == null) all else collectionEntries(all, ItchCollections.gamesOf(collection.id).orEmpty())
|
||||
val matching = pool.filter {
|
||||
(source == LIBRARY_ALL || it.source == source) && (q.isEmpty() || it.title.lowercase().contains(q)) && keepsXbox(xboxFilter, it)
|
||||
}
|
||||
val candidates = if (showUninstalled) matching else matching.filter { it.installed }
|
||||
val hiddenUninstalled = if (showUninstalled) 0 else matching.count { !it.installed }
|
||||
val listUninstalled = if (collection == null) showUninstalled else collectionShows?.takeIf { it.first == collection.id }?.second ?: true
|
||||
val candidates = if (listUninstalled) matching else matching.filter { it.installed }
|
||||
val hiddenUninstalled = if (listUninstalled) 0 else matching.count { !it.installed }
|
||||
val sort = s.storesSort
|
||||
val sizeSort = sort == "sizeAsc" || sort == "sizeDesc"
|
||||
val installedAt = StoresState.installed.associate { it.key to it.sidecar.installedAt }
|
||||
@@ -264,7 +285,7 @@ internal fun LibraryPage(s: FrontEndState, a: FrontEndActions, selected: String,
|
||||
kotlinx.coroutines.delay(Motion.ms(240).toLong())
|
||||
focusWithinFrames({ ff.last?.startsWith("card:") == true }) { if (ff.firstTileAttached > 0) ff.firstTile else FocusRequester.Default }
|
||||
}
|
||||
if (all.isEmpty() && open == null) {
|
||||
if (all.isEmpty() && open == null && !itchSignedIn) {
|
||||
LibraryEmpty(s, a, modifier)
|
||||
return
|
||||
}
|
||||
@@ -272,7 +293,7 @@ internal fun LibraryPage(s: FrontEndState, a: FrontEndActions, selected: String,
|
||||
val detailScroll = rememberScrollState()
|
||||
var cycled by remember { mutableIntStateOf(0) }
|
||||
var gridFocused by remember { mutableStateOf(false) }
|
||||
LaunchedEffect(source, sort, showUninstalled) { grid.scrollToItem(0) }
|
||||
LaunchedEffect(source, sort, listUninstalled) { grid.scrollToItem(0) }
|
||||
LaunchedEffect(cycled) {
|
||||
if (cycled == 0 || ff == null || inputMode.inputMode != androidx.compose.ui.input.InputMode.Keyboard) return@LaunchedEffect
|
||||
focusWithinFrames({ gridFocused }) {
|
||||
@@ -288,7 +309,7 @@ internal fun LibraryPage(s: FrontEndState, a: FrontEndActions, selected: String,
|
||||
grid = {
|
||||
LibraryGrid(
|
||||
s, a, grid, visible, split, visible.size, sources, source, sizesPending, syncing,
|
||||
showUninstalled = showUninstalled.takeIf { stores }, onShowUninstalled = setShowUninstalled,
|
||||
showUninstalled = listUninstalled.takeIf { stores }, onShowUninstalled = setShowUninstalled,
|
||||
hiddenUninstalled = hiddenUninstalled,
|
||||
onSource = { LibraryView.source = it },
|
||||
onCycle = { step ->
|
||||
@@ -383,7 +404,7 @@ private fun LibraryGrid(
|
||||
contentPadding = PaddingValues(top = 4.dp, bottom = 16.dp),
|
||||
) {
|
||||
item(key = "header", span = { GridItemSpan(maxLineSpan) }) {
|
||||
Rise(0) { LibraryHeader(s, a, total, searchCleared, source == Store.XBOX.id, showUninstalled, onShowUninstalled) }
|
||||
Rise(0) { LibraryHeader(s, a, total, searchCleared, source == Store.XBOX.id, showUninstalled, onShowUninstalled, collections = source == Store.ITCH.id) }
|
||||
}
|
||||
item(key = "filters", span = { GridItemSpan(maxLineSpan) }) {
|
||||
Rise(1) { LibraryFilters(sources, source, onSource) }
|
||||
@@ -430,7 +451,7 @@ private fun LazyGridScope.libraryGrid(entries: List<LibraryEntry>, empty: Int, t
|
||||
@Composable
|
||||
private fun LibraryHeader(
|
||||
s: FrontEndState, a: FrontEndActions, total: Int, searchCleared: Boolean, xbox: Boolean,
|
||||
showUninstalled: Boolean?, onShowUninstalled: (Boolean) -> Unit,
|
||||
showUninstalled: Boolean?, onShowUninstalled: (Boolean) -> Unit, collections: Boolean,
|
||||
) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val narrow = LocalNarrowPane.current
|
||||
@@ -447,6 +468,7 @@ private fun LibraryHeader(
|
||||
},
|
||||
) {
|
||||
if (showUninstalled != null || xbox) LibraryFilterButton(showUninstalled, onShowUninstalled, xbox)
|
||||
if (collections) CollectionsButton()
|
||||
SortButton(s, a)
|
||||
ViewButton(s, a)
|
||||
GameFileFolderActions(s, a)
|
||||
@@ -700,6 +722,39 @@ private fun LibraryFilterButton(showUninstalled: Boolean?, onShowUninstalled: (B
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun CollectionsButton() {
|
||||
val pal = LocalPalette.current
|
||||
val ctx = LocalContext.current
|
||||
val title = stringResource(R.string.itch_collections)
|
||||
val all = stringResource(R.string.stores_tab_all)
|
||||
var at by remember { mutableStateOf<Rect?>(null) }
|
||||
Box(Modifier.onGloballyPositioned { at = it.boundsInRoot() }) {
|
||||
HeaderIconButton(title + " · " + (ItchCollections.chosen()?.title ?: all), CollectionsIcon, "itch-collections") {
|
||||
val from = at ?: return@HeaderIconButton
|
||||
val choices = listOf<ItchCollection?>(null) + ItchCollections.list
|
||||
Steps.ask(StepAsk(
|
||||
anchor = from, side = StepSide.Left, accent = pal.signal, pillCorner = 8.dp, items = choices.size,
|
||||
handle = { Icon(CollectionsIcon, null, tint = pal.signal, modifier = Modifier.size(18.dp)) },
|
||||
) {
|
||||
StepTitle(title)
|
||||
StepList {
|
||||
choices.forEachIndexed { i, c ->
|
||||
val picked = c?.id == ItchCollections.selected
|
||||
StepChoice(
|
||||
c?.let { it.title + " (" + it.count + ")" } ?: all, selected = picked, enabled = open,
|
||||
modifier = Modifier.fillMaxWidth().stepItem(i).then(if (picked) Modifier.focusRequester(first) else Modifier),
|
||||
) {
|
||||
ItchCollections.select(ctx, c?.id)
|
||||
Steps.fold()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun SortButton(s: FrontEndState, a: FrontEndActions) {
|
||||
val pal = LocalPalette.current
|
||||
|
||||
@@ -60,6 +60,7 @@ class ModeSettings(
|
||||
val hdr: Boolean,
|
||||
val hdrReason: String?,
|
||||
val gpuDrivers: String? = null,
|
||||
val performanceMode: Boolean = false,
|
||||
val upscaler: Int = 0,
|
||||
val upscaleSharpness: Int = 75,
|
||||
val touchMode: String,
|
||||
@@ -95,11 +96,7 @@ class ModeSettings(
|
||||
val bootMovieCustomName: String? = null,
|
||||
val bootMovieImporting: Boolean = false,
|
||||
val bootMovieProgress: Int = -1,
|
||||
val wifiDiscovery: Boolean? = null,
|
||||
val wifiDiscoveryPermission: Boolean = false,
|
||||
val wifiDiscoveryLocation: Boolean = false,
|
||||
val wifiDiscoveryAsked: Boolean = false,
|
||||
val wifiDiscoveryBlocked: Boolean = false,
|
||||
val integration: com.droiddeck.launcher.core.SteamIntegration.State? = null,
|
||||
val deckyInstalled: String? = null,
|
||||
val deckyLatestRelease: DeckyManager.Release? = null,
|
||||
val deckyBranch: Int = DeckyManager.BRANCH_STABLE,
|
||||
@@ -115,6 +112,7 @@ class ModeSettingsActions(
|
||||
val onResolution: (String) -> Unit,
|
||||
val onHdr: (Boolean) -> Unit,
|
||||
val onGpuDrivers: () -> Unit = {},
|
||||
val onPerformanceMode: (Boolean) -> Unit = {},
|
||||
val onUpscaler: (Int) -> Unit = {},
|
||||
val onUpscaleSharpness: (Int) -> Unit = {},
|
||||
val onTouch: (String) -> Unit,
|
||||
@@ -146,8 +144,9 @@ class ModeSettingsActions(
|
||||
val onBootMovieSound: (Boolean) -> Unit = {},
|
||||
val onImportBootMovie: () -> Unit = {},
|
||||
val onBootMovieChanged: () -> Unit = {},
|
||||
val onWifiDiscovery: (Boolean) -> Unit = {},
|
||||
val onWifiDiscoverySettings: () -> Unit = {},
|
||||
val onIntegration: (com.droiddeck.launcher.core.SteamIntegration.Feature) -> Unit = {},
|
||||
val onIntegrationAppInfo: () -> Unit = {},
|
||||
val onIntegrationLocation: () -> Unit = {},
|
||||
val onDeckyInstall: (DeckyManager.Release) -> Unit = {},
|
||||
val onDeckyCheck: () -> Unit = {},
|
||||
val onDeckyBranch: (Int) -> Unit = {},
|
||||
@@ -206,7 +205,6 @@ class SheetExtras(
|
||||
fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras: SheetExtras = SheetExtras()) {
|
||||
val steam = s.mode == SessionService.MODE_STEAM
|
||||
val host = rememberMenuHost()
|
||||
var explainWifiDiscovery by remember { mutableStateOf(false) }
|
||||
if (tab == SheetTab.DISPLAY) {
|
||||
val context = LocalContext.current
|
||||
val portraitWindow = SessionPrefs.portrait(context)
|
||||
@@ -246,6 +244,10 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras:
|
||||
format = { "$it%" }, onChange = a.onUpscaleSharpness,
|
||||
)
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.display_frame_rate)) {
|
||||
ToggleRow(host, "performance", stringResource(R.string.mode_performance), stringResource(R.string.mode_performance_hint),
|
||||
s.performanceMode, onChange = a.onPerformanceMode)
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.mode_hdr)) {
|
||||
ToggleRow(
|
||||
host, "hdr", stringResource(R.string.mode_hdr10),
|
||||
@@ -506,39 +508,9 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras:
|
||||
)
|
||||
}
|
||||
if (s.bootMovie != null) BootMovieGroup(s, a, host)
|
||||
if (s.wifiDiscovery != null) SettingsGroup(stringResource(R.string.mode_network)) {
|
||||
val hint = when {
|
||||
s.wifiDiscovery && !s.wifiDiscoveryLocation -> stringResource(R.string.mode_wifi_location_off)
|
||||
!s.wifiDiscoveryPermission && s.wifiDiscoveryAsked -> stringResource(R.string.mode_wifi_permission_denied)
|
||||
else -> stringResource(R.string.mode_wifi_discovery_hint)
|
||||
}
|
||||
SettingsRow(stringResource(R.string.mode_wifi_discovery), hint) {
|
||||
Row(verticalAlignment = androidx.compose.ui.Alignment.CenterVertically,
|
||||
horizontalArrangement = androidx.compose.foundation.layout.Arrangement.spacedBy(8.dp)) {
|
||||
if (s.wifiDiscoveryBlocked || (s.wifiDiscovery && !s.wifiDiscoveryLocation)) {
|
||||
SecondaryButton(stringResource(R.string.mode_wifi_open_settings), onClick = a.onWifiDiscoverySettings)
|
||||
}
|
||||
ToggleSwitch(s.wifiDiscovery, label = stringResource(R.string.mode_wifi_discovery)) { on ->
|
||||
host.open = null
|
||||
if (on) explainWifiDiscovery = true else a.onWifiDiscovery(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (s.integration != null) SteamIntegrationGroup(s.integration,
|
||||
onFeature = a.onIntegration, onAppInfo = a.onIntegrationAppInfo, onLocation = a.onIntegrationLocation)
|
||||
}
|
||||
if (explainWifiDiscovery) AlertDialog(
|
||||
onDismissRequest = { explainWifiDiscovery = false },
|
||||
title = { Text(stringResource(R.string.mode_wifi_explain_title)) },
|
||||
text = { Text(stringResource(R.string.mode_wifi_explain_text)) },
|
||||
confirmButton = {
|
||||
TextButton(onClick = { explainWifiDiscovery = false; a.onWifiDiscovery(true) }, modifier = Modifier.focusGlide(CircleShape)) {
|
||||
Text(stringResource(if (s.wifiDiscoveryBlocked) R.string.mode_wifi_open_settings else R.string.mode_wifi_continue))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
TextButton(onClick = { explainWifiDiscovery = false }, modifier = Modifier.focusGlide(CircleShape)) { Text(stringResource(R.string.common_cancel)) }
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
||||
@@ -422,7 +422,7 @@ fun ValueChip(text: String, open: Boolean, enabled: Boolean = true, modifier: Mo
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun SettingsGroup(title: String, compact: Boolean = false, content: @Composable ColumnScope.() -> Unit) {
|
||||
fun SettingsGroup(title: String, compact: Boolean = false, detail: String? = null, content: @Composable ColumnScope.() -> Unit) {
|
||||
val tight = compact || LocalCompactSettings.current
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
@@ -434,6 +434,7 @@ fun SettingsGroup(title: String, compact: Boolean = false, content: @Composable
|
||||
) {
|
||||
Text(title.uppercase(), fontSize = if (tight) 11.sp else 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.5.sp, color = colors.onSurfaceVariant)
|
||||
Box(modifier = Modifier.weight(1f).height(1.dp).background(pal.line))
|
||||
if (detail != null) Text(detail, fontSize = if (tight) 11.sp else 12.sp, fontWeight = FontWeight.SemiBold, color = colors.onSurfaceVariant)
|
||||
}
|
||||
Column(modifier = Modifier.fillMaxWidth().clip(GroupShape).background(colors.surface).border(1.dp, pal.line, GroupShape)) { content() }
|
||||
}
|
||||
|
||||
@@ -143,6 +143,8 @@ internal fun SteamHome(s: FrontEndState, a: FrontEndActions, modifier: Modifier)
|
||||
words = {
|
||||
val runtimeStatus: @Composable () -> Unit = {
|
||||
if (s.busy || !s.ready || (s.available != null && s.available != s.installed)) RuntimeChip(s)
|
||||
else if (s.integration.suggested && signedIn && !com.droiddeck.launcher.core.PhantomProcessLimit.blocksSteam(s.phantomProcessStatus))
|
||||
IntegrationSuggestion(s.integration, { a.onSteamIntegration(null) }, a.onDismissIntegration)
|
||||
}
|
||||
if (narrow) Column(
|
||||
verticalArrangement = Arrangement.spacedBy(12.dp), modifier = Modifier.onPlaced { words = it.boundsInParent() },
|
||||
|
||||
@@ -0,0 +1,215 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.animation.animateColorAsState
|
||||
import androidx.compose.foundation.LocalIndication
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.hoverable
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.heightIn
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.relocation.BringIntoViewRequester
|
||||
import androidx.compose.foundation.relocation.bringIntoViewRequester
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.AutoAwesome
|
||||
import androidx.compose.material.icons.outlined.Close
|
||||
import androidx.compose.material.icons.outlined.Home
|
||||
import androidx.compose.material.icons.outlined.KeyboardCommandKey
|
||||
import androidx.compose.material.icons.outlined.LightMode
|
||||
import androidx.compose.material.icons.outlined.Wifi
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.semantics.contentDescription
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.core.SteamIntegration
|
||||
import com.droiddeck.launcher.core.SteamIntegration.Feature
|
||||
|
||||
private val BadgeShape = RoundedCornerShape(10.dp)
|
||||
|
||||
internal fun SteamIntegration.State.enabled(feature: Feature) = when (feature) {
|
||||
Feature.WIFI -> wifi && locationPermission && locationOn
|
||||
Feature.BRIGHTNESS -> brightness
|
||||
Feature.HOME -> home
|
||||
Feature.SHORTCUTS -> home && shortcuts
|
||||
}
|
||||
|
||||
internal fun SteamIntegration.State.enabledCount() = Feature.entries.count { enabled(it) }
|
||||
|
||||
@Composable
|
||||
internal fun SteamIntegrationGroup(
|
||||
state: SteamIntegration.State,
|
||||
focus: Feature? = null,
|
||||
onFeature: (Feature) -> Unit,
|
||||
onAppInfo: () -> Unit,
|
||||
onLocation: () -> Unit = {},
|
||||
) {
|
||||
SettingsGroup(
|
||||
stringResource(R.string.integration_title),
|
||||
detail = stringResource(R.string.integration_count, state.enabledCount(), Feature.entries.size),
|
||||
) {
|
||||
Feature.entries.forEachIndexed { i, feature ->
|
||||
IntegrationRow(state, feature, focus == feature, i < Feature.entries.lastIndex, onFeature, onAppInfo, onLocation)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(androidx.compose.foundation.ExperimentalFoundationApi::class)
|
||||
@Composable
|
||||
private fun IntegrationRow(
|
||||
state: SteamIntegration.State,
|
||||
feature: Feature,
|
||||
focused: Boolean,
|
||||
divider: Boolean,
|
||||
onFeature: (Feature) -> Unit,
|
||||
onAppInfo: () -> Unit,
|
||||
onLocation: () -> Unit,
|
||||
) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
val on = state.enabled(feature)
|
||||
var flash by remember { mutableStateOf(false) }
|
||||
val reveal = remember { BringIntoViewRequester() }
|
||||
LaunchedEffect(focused) {
|
||||
if (focused) try { flash = true; reveal.bringIntoView(); kotlinx.coroutines.delay(1600) } finally { flash = false }
|
||||
}
|
||||
val bg by animateColorAsState(if (flash) pal.signal.copy(alpha = 0.12f) else Color.Transparent, Motion.tw(400), label = "integrationFlash")
|
||||
val wifiLocationOff = feature == Feature.WIFI && state.wifi && state.locationPermission && !state.locationOn
|
||||
val wifiDenied = feature == Feature.WIFI && !state.locationPermission && state.locationBlocked
|
||||
val needsHome = feature == Feature.SHORTCUTS && !state.home
|
||||
val restricted = feature == Feature.SHORTCUTS && !needsHome && !state.shortcuts && state.shortcutsRestricted
|
||||
val maybeRestricted = feature == Feature.SHORTCUTS && !needsHome && !state.shortcuts && !restricted && state.shortcutsTried &&
|
||||
android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.TIRAMISU
|
||||
val hint = stringResource(when {
|
||||
wifiLocationOff -> R.string.integration_wifi_location_off
|
||||
wifiDenied -> R.string.integration_wifi_denied
|
||||
needsHome -> R.string.integration_shortcuts_needs_home
|
||||
restricted -> R.string.integration_shortcuts_restricted
|
||||
maybeRestricted -> R.string.integration_shortcuts_maybe_restricted
|
||||
feature == Feature.WIFI -> if (on) R.string.integration_wifi_on else R.string.integration_wifi_hint
|
||||
feature == Feature.BRIGHTNESS -> R.string.integration_brightness_hint
|
||||
feature == Feature.HOME -> R.string.integration_home_hint
|
||||
else -> R.string.integration_shortcuts_hint
|
||||
})
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(14.dp),
|
||||
modifier = Modifier.fillMaxWidth().bringIntoViewRequester(reveal).background(bg).heightIn(min = 64.dp)
|
||||
.padding(horizontal = 14.dp, vertical = 10.dp)
|
||||
.testTag("integration-${feature.name.lowercase()}"),
|
||||
) {
|
||||
FeatureBadge(featureIcon(feature), on)
|
||||
Column(Modifier.weight(1f)) {
|
||||
Text(stringResource(featureTitle(feature)), fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground,
|
||||
maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
Text(hint, fontSize = 13.sp, color = if (wifiLocationOff || wifiDenied || restricted) AttentionAmber else colors.onSurfaceVariant,
|
||||
maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
}
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
when {
|
||||
wifiLocationOff -> SecondaryButton(stringResource(R.string.integration_location), compact = true, onClick = onLocation)
|
||||
wifiDenied -> SecondaryButton(stringResource(R.string.integration_app_info), compact = true, onClick = onLocation)
|
||||
restricted || maybeRestricted -> SecondaryButton(stringResource(R.string.integration_app_info), compact = true, onClick = onAppInfo)
|
||||
}
|
||||
val checked = if (feature == Feature.WIFI) state.wifi && state.locationPermission else on
|
||||
ToggleSwitch(checked, enabled = !needsHome && !restricted, label = stringResource(featureTitle(feature)),
|
||||
modifier = Modifier.testTag("integration-action-${feature.name.lowercase()}")) { onFeature(feature) }
|
||||
}
|
||||
}
|
||||
if (divider) Box(Modifier.fillMaxWidth().height(1.dp).background(pal.line))
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun FeatureBadge(icon: ImageVector, on: Boolean) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
val tint by animateColorAsState(if (on) pal.good else colors.onSurfaceVariant, Motion.tw(250), label = "badgeTint")
|
||||
Box(
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = Modifier.size(36.dp).clip(BadgeShape)
|
||||
.background(if (on) pal.good.copy(alpha = 0.14f) else colors.surfaceVariant)
|
||||
.border(1.dp, if (on) pal.good.copy(alpha = 0.3f) else pal.line2, BadgeShape),
|
||||
) { Icon(icon, contentDescription = null, tint = tint, modifier = Modifier.size(19.dp)) }
|
||||
}
|
||||
|
||||
private fun featureIcon(feature: Feature) = when (feature) {
|
||||
Feature.WIFI -> Icons.Outlined.Wifi
|
||||
Feature.BRIGHTNESS -> Icons.Outlined.LightMode
|
||||
Feature.HOME -> Icons.Outlined.Home
|
||||
Feature.SHORTCUTS -> Icons.Outlined.KeyboardCommandKey
|
||||
}
|
||||
|
||||
private fun featureTitle(feature: Feature) = when (feature) {
|
||||
Feature.WIFI -> R.string.integration_wifi
|
||||
Feature.BRIGHTNESS -> R.string.integration_brightness
|
||||
Feature.HOME -> R.string.integration_home
|
||||
Feature.SHORTCUTS -> R.string.integration_shortcuts
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun IntegrationSuggestion(state: SteamIntegration.State, onOpen: () -> Unit, onLater: () -> Unit) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
val pill = RoundedCornerShape(99.dp)
|
||||
val src = remember { MutableInteractionSource() }
|
||||
val hot = rememberHot(src)
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.clip(pill).background(colors.surfaceVariant.copy(alpha = 0.85f))
|
||||
.border(1.dp, pal.signal.copy(alpha = 0.3f), pill).testTag("integration-suggestion"),
|
||||
) {
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
modifier = Modifier.heightIn(min = 40.dp).clip(pill).glideBorder(hot, pill, pal.signal, Color.Transparent)
|
||||
.hoverable(src).clickable(role = Role.Button, interactionSource = src, indication = LocalIndication.current, onClick = onOpen)
|
||||
.controllerConfirm(onClick = onOpen)
|
||||
.padding(start = 12.dp, end = 10.dp, top = 6.dp, bottom = 6.dp),
|
||||
) {
|
||||
Icon(Icons.Outlined.AutoAwesome, contentDescription = null, tint = pal.signal, modifier = Modifier.size(16.dp))
|
||||
Text(stringResource(R.string.integration_title), fontSize = 13.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground, maxLines = 1)
|
||||
Text(stringResource(R.string.integration_count, state.enabledCount(), Feature.entries.size), fontSize = 12.sp,
|
||||
color = colors.onSurfaceVariant, maxLines = 1)
|
||||
}
|
||||
val closeSrc = remember { MutableInteractionSource() }
|
||||
val closeHot = rememberHot(closeSrc)
|
||||
val later = stringResource(R.string.integration_later)
|
||||
Box(
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = Modifier.padding(end = 4.dp).size(32.dp).clip(CircleShape)
|
||||
.background(if (closeHot) pal.signal.copy(alpha = 0.16f) else Color.Transparent)
|
||||
.glideBorder(closeHot, CircleShape, pal.signal, Color.Transparent)
|
||||
.hoverable(closeSrc).clickable(role = Role.Button, interactionSource = closeSrc, indication = LocalIndication.current, onClick = onLater)
|
||||
.controllerConfirm(onClick = onLater)
|
||||
.semantics { contentDescription = later },
|
||||
) { Icon(Icons.Outlined.Close, contentDescription = null, tint = colors.onSurfaceVariant, modifier = Modifier.size(16.dp)) }
|
||||
}
|
||||
}
|
||||
@@ -2025,6 +2025,7 @@
|
||||
<string name="display_filter_live">يُطبَّق فوريًا. مشترك بين Steam وسطح المكتب.</string>
|
||||
<string name="display_filter_note">تُطبَّق FSR و GSR و NIS عند تكبير صورة الجلسة. ويعمل خيار «زيادة الحدة فقط» أيضًا دون تكبير.</string>
|
||||
<string name="display_sharpness">حدّة المرشِّح</string>
|
||||
<string name="display_frame_rate">معدّل الإطارات</string>
|
||||
<string name="display_look_filter">%1$s يضبط أسلوب التكبير على %2$s.</string>
|
||||
<string name="display_match_screen">مطابقة الشاشة (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">اتباع الشاشة (يُغيَّر الحجم عند الطي أو الفتح)</string>
|
||||
@@ -3218,6 +3219,7 @@
|
||||
<string name="library_remove">إزالة من المكتبة</string>
|
||||
<string name="library_in">في المكتبة</string>
|
||||
<string name="xbox_filter_show">عرض</string>
|
||||
<string name="itch_collections">المجموعات</string>
|
||||
<string name="xbox_filter_cloud">سحابية</string>
|
||||
<string name="stores_xbox_cloud_settings">إعدادات السحابة</string>
|
||||
</resources>
|
||||
@@ -1994,6 +1994,7 @@
|
||||
<string name="display_filter_live">Se aplica al instante. Compartido por Steam y Escritorio.</string>
|
||||
<string name="display_filter_note">FSR, GSR y NIS se aplican al ampliar la imagen de la sesión. Solo nitidez también funciona sin ampliar.</string>
|
||||
<string name="display_sharpness">Nitidez del filtro</string>
|
||||
<string name="display_frame_rate">Velocidad de fotogramas</string>
|
||||
<string name="display_look_filter">%1$s Cambia el escalado a %2$s.</string>
|
||||
<string name="display_match_screen">Igual a la pantalla (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Seguir la pantalla (cambia de tamaño al plegar o desplegar)</string>
|
||||
@@ -3068,6 +3069,7 @@
|
||||
<string name="library_remove">Quitar de Biblioteca</string>
|
||||
<string name="library_in">En Biblioteca</string>
|
||||
<string name="xbox_filter_show">Mostrar</string>
|
||||
<string name="itch_collections">Colecciones</string>
|
||||
<string name="xbox_filter_cloud">Nube</string>
|
||||
<string name="stores_xbox_cloud_settings">Configuración de nube</string>
|
||||
</resources>
|
||||
@@ -1941,6 +1941,7 @@
|
||||
<string name="display_filter_live">Прилага се веднага. Общ за Steam и Desktop.</string>
|
||||
<string name="display_filter_note">FSR, GSR и NIS се прилагат при уголемяване на изображението на сесията. „Само изостряне“ работи и без уголемяване.</string>
|
||||
<string name="display_sharpness">Острота на филтъра</string>
|
||||
<string name="display_frame_rate">Честота на кадрите</string>
|
||||
<string name="display_look_filter">%1$s Задава мащабиране на %2$s.</string>
|
||||
<string name="display_match_screen">Напасване на екрана (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Следване на екрана (преоразмерява при сгъване или разгъване)</string>
|
||||
@@ -3082,6 +3083,7 @@
|
||||
<string name="library_remove">Премахни от Библиотека</string>
|
||||
<string name="library_in">В Библиотека</string>
|
||||
<string name="xbox_filter_show">Показване</string>
|
||||
<string name="itch_collections">Колекции</string>
|
||||
<string name="xbox_filter_cloud">Облак</string>
|
||||
<string name="stores_xbox_cloud_settings">Настройки на облака</string>
|
||||
</resources>
|
||||
@@ -1983,6 +1983,7 @@
|
||||
<string name="display_filter_live">Použije se okamžitě. Sdíleno Steamem a Plochou.</string>
|
||||
<string name="display_filter_note">FSR, GSR a NIS se použijí při zvětšování obrazu relace. Jen zaostření funguje i bez zvětšení.</string>
|
||||
<string name="display_sharpness">Ostrost filtru</string>
|
||||
<string name="display_frame_rate">Snímková frekvence</string>
|
||||
<string name="display_look_filter">%1$s Nastaví škálování na %2$s.</string>
|
||||
<string name="display_match_screen">Podle obrazovky (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Sledovat obrazovku (změní velikost při složení nebo rozložení)</string>
|
||||
@@ -3150,6 +3151,7 @@
|
||||
<string name="library_remove">Odebrat z knihovny</string>
|
||||
<string name="library_in">V knihovně</string>
|
||||
<string name="xbox_filter_show">Zobrazit</string>
|
||||
<string name="itch_collections">Kolekce</string>
|
||||
<string name="xbox_filter_cloud">Cloud</string>
|
||||
<string name="stores_xbox_cloud_settings">Nastavení cloudu</string>
|
||||
</resources>
|
||||
@@ -1941,6 +1941,7 @@
|
||||
<string name="display_filter_live">Træder i kraft øjeblikkeligt. Deles af Steam og Desktop.</string>
|
||||
<string name="display_filter_note">FSR, GSR og NIS anvendes ved forstørrelse af sessionsbilledet. Kun skærpning virker også uden forstørrelse.</string>
|
||||
<string name="display_sharpness">Filterskarphed</string>
|
||||
<string name="display_frame_rate">Billedfrekvens</string>
|
||||
<string name="display_look_filter">%1$s Indstiller skalering til %2$s.</string>
|
||||
<string name="display_match_screen">Match skærm (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Følg skærm (ændrer størrelse ved fold/udfold)</string>
|
||||
@@ -3082,6 +3083,7 @@
|
||||
<string name="library_remove">Fjern fra Bibliotek</string>
|
||||
<string name="library_in">I Bibliotek</string>
|
||||
<string name="xbox_filter_show">Vis</string>
|
||||
<string name="itch_collections">Samlinger</string>
|
||||
<string name="xbox_filter_cloud">Sky</string>
|
||||
<string name="stores_xbox_cloud_settings">Skyindstillinger</string>
|
||||
</resources>
|
||||
@@ -1933,6 +1933,7 @@
|
||||
<string name="display_filter_live">Wirkt sofort. Gemeinsam für Steam und Desktop.</string>
|
||||
<string name="display_filter_note">FSR, GSR und NIS wirken beim Vergrößern des Sitzungsbilds. „Nur schärfen“ funktioniert auch ohne Vergrößerung.</string>
|
||||
<string name="display_sharpness">Filterschärfe</string>
|
||||
<string name="display_frame_rate">Bildrate</string>
|
||||
<string name="display_look_filter">%1$s Stellt die Skalierung auf %2$s.</string>
|
||||
<string name="display_match_screen">An Bildschirm anpassen (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Bildschirm folgen (passt sich beim Auf- und Zuklappen an)</string>
|
||||
@@ -3082,6 +3083,7 @@
|
||||
<string name="library_remove">Aus der Bibliothek entfernen</string>
|
||||
<string name="library_in">In der Bibliothek</string>
|
||||
<string name="xbox_filter_show">Anzeigen</string>
|
||||
<string name="itch_collections">Sammlungen</string>
|
||||
<string name="xbox_filter_cloud">Cloud</string>
|
||||
<string name="stores_xbox_cloud_settings">Cloud-Einstellungen</string>
|
||||
</resources>
|
||||
@@ -1941,6 +1941,7 @@
|
||||
<string name="display_filter_live">Εφαρμόζεται σε πραγματικό χρόνο. Κοινό για το Steam και την Επιφάνεια εργασίας.</string>
|
||||
<string name="display_filter_note">Τα FSR, GSR και NIS εφαρμόζονται κατά τη μεγέθυνση της εικόνας συνεδρίας. Το Μόνο όξυνση λειτουργεί και χωρίς μεγέθυνση.</string>
|
||||
<string name="display_sharpness">Οξύτητα φίλτρου</string>
|
||||
<string name="display_frame_rate">Καρέ ανά δευτερόλεπτο</string>
|
||||
<string name="display_look_filter">%1$s Ορίζει την κλιμάκωση σε %2$s.</string>
|
||||
<string name="display_match_screen">Αντιστοίχιση οθόνης (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Ακολούθηση οθόνης (αλλάζει μέγεθος όταν διπλώνει ή ξεδιπλώνει)</string>
|
||||
@@ -3082,6 +3083,7 @@
|
||||
<string name="library_remove">Αφαίρεση από τη Βιβλιοθήκη</string>
|
||||
<string name="library_in">Στη Βιβλιοθήκη</string>
|
||||
<string name="xbox_filter_show">Εμφάνιση</string>
|
||||
<string name="itch_collections">Συλλογές</string>
|
||||
<string name="xbox_filter_cloud">Cloud</string>
|
||||
<string name="stores_xbox_cloud_settings">Ρυθμίσεις cloud</string>
|
||||
</resources>
|
||||
@@ -1964,6 +1964,7 @@
|
||||
<string name="display_filter_live">Se aplica al instante. Compartido por Steam y Escritorio.</string>
|
||||
<string name="display_filter_note">FSR, GSR y NIS se aplican al ampliar la imagen de la sesión. Solo nitidez también funciona sin ampliar.</string>
|
||||
<string name="display_sharpness">Nitidez del filtro</string>
|
||||
<string name="display_frame_rate">Velocidad de fotogramas</string>
|
||||
<string name="display_look_filter">%1$s Cambia el escalado a %2$s.</string>
|
||||
<string name="display_match_screen">Igual a la pantalla (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Seguir la pantalla (cambia de tamaño al plegar o desplegar)</string>
|
||||
@@ -3118,6 +3119,7 @@
|
||||
<string name="library_remove">Quitar de la Biblioteca</string>
|
||||
<string name="library_in">En la Biblioteca</string>
|
||||
<string name="xbox_filter_show">Mostrar</string>
|
||||
<string name="itch_collections">Colecciones</string>
|
||||
<string name="xbox_filter_cloud">Nube</string>
|
||||
<string name="stores_xbox_cloud_settings">Ajustes de nube</string>
|
||||
</resources>
|
||||
@@ -1941,6 +1941,7 @@
|
||||
<string name="display_filter_live">Vaikuttaa välittömästi. Yhteinen Steamille ja Työpöydälle.</string>
|
||||
<string name="display_filter_note">FSR, GSR ja NIS vaikuttavat, kun istunnon kuvaa suurennetaan. Vain terävöinti toimii myös suurentamatta.</string>
|
||||
<string name="display_sharpness">Suodattimen terävyys</string>
|
||||
<string name="display_frame_rate">Kuvanopeus</string>
|
||||
<string name="display_look_filter">%1$s Asettaa skaalauksen tilaan %2$s.</string>
|
||||
<string name="display_match_screen">Sovita näyttöön (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Seuraa näyttöä (koko muuttuu taitettuna tai avattuna)</string>
|
||||
@@ -3082,6 +3083,7 @@
|
||||
<string name="library_remove">Poista kirjastosta</string>
|
||||
<string name="library_in">Kirjastossa</string>
|
||||
<string name="xbox_filter_show">Näytä</string>
|
||||
<string name="itch_collections">Kokoelmat</string>
|
||||
<string name="xbox_filter_cloud">Pilvi</string>
|
||||
<string name="stores_xbox_cloud_settings">Pilviasetukset</string>
|
||||
</resources>
|
||||
@@ -1964,6 +1964,7 @@
|
||||
<string name="display_filter_live">S\'applique en direct. Partagé entre Steam et le bureau.</string>
|
||||
<string name="display_filter_note">FSR, GSR et NIS s\'appliquent lors de l\'agrandissement de l\'image de la session. « Netteté seule » fonctionne aussi sans agrandissement.</string>
|
||||
<string name="display_sharpness">Netteté du filtre</string>
|
||||
<string name="display_frame_rate">Fréquence d\'images</string>
|
||||
<string name="display_look_filter">%1$s Règle la mise à l\'échelle sur %2$s.</string>
|
||||
<string name="display_match_screen">Adapter à l\'écran (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Suivre l\'écran (s\'adapte au pliage et au dépliage)</string>
|
||||
@@ -3118,6 +3119,7 @@
|
||||
<string name="library_remove">Retirer de la Bibliothèque</string>
|
||||
<string name="library_in">Dans la Bibliothèque</string>
|
||||
<string name="xbox_filter_show">Afficher</string>
|
||||
<string name="itch_collections">Collections</string>
|
||||
<string name="xbox_filter_cloud">Cloud</string>
|
||||
<string name="stores_xbox_cloud_settings">Paramètres cloud</string>
|
||||
</resources>
|
||||
@@ -1941,6 +1941,7 @@
|
||||
<string name="display_filter_live">लाइव लागू होता है। Steam और डेस्कटॉप में साझा।</string>
|
||||
<string name="display_filter_note">FSR, GSR और NIS सेशन इमेज को बड़ा करने पर लागू होते हैं। सिर्फ़ शार्पन बिना बड़ा किए भी काम करता है।</string>
|
||||
<string name="display_sharpness">फ़िल्टर शार्पनेस</string>
|
||||
<string name="display_frame_rate">फ़्रेम रेट</string>
|
||||
<string name="display_look_filter">%1$s स्केलिंग को %2$s पर सेट करता है।</string>
|
||||
<string name="display_match_screen">स्क्रीन से मिलाएँ (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Follow screen (खुलने या बंद होने पर आकार बदलता है)</string>
|
||||
@@ -3082,6 +3083,7 @@
|
||||
<string name="library_remove">लाइब्रेरी से हटाएँ</string>
|
||||
<string name="library_in">लाइब्रेरी में</string>
|
||||
<string name="xbox_filter_show">दिखाएँ</string>
|
||||
<string name="itch_collections">संग्रह</string>
|
||||
<string name="xbox_filter_cloud">क्लाउड</string>
|
||||
<string name="stores_xbox_cloud_settings">क्लाउड सेटिंग्स</string>
|
||||
</resources>
|
||||
@@ -1941,6 +1941,7 @@
|
||||
<string name="display_filter_live">Élőben érvénybe lép. A Steam és az Asztal közösen használja.</string>
|
||||
<string name="display_filter_note">Az FSR, a GSR és a NIS a munkamenet képének felnagyításakor lép érvénybe. A Csak élesítés nagyítás nélkül is működik.</string>
|
||||
<string name="display_sharpness">Szűrőélesség</string>
|
||||
<string name="display_frame_rate">Képkockasebesség</string>
|
||||
<string name="display_look_filter">%1$s A méretezést erre állítja: %2$s.</string>
|
||||
<string name="display_match_screen">Képernyőhöz illesztés (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Képernyő követése (átméreteződik össze- vagy kinyitáskor)</string>
|
||||
@@ -3082,6 +3083,7 @@
|
||||
<string name="library_remove">Eltávolítás a könyvtárból</string>
|
||||
<string name="library_in">A könyvtárban</string>
|
||||
<string name="xbox_filter_show">Megjelenítés</string>
|
||||
<string name="itch_collections">Gyűjtemények</string>
|
||||
<string name="xbox_filter_cloud">Felhő</string>
|
||||
<string name="stores_xbox_cloud_settings">Felhőbeállítások</string>
|
||||
</resources>
|
||||
@@ -1920,6 +1920,7 @@
|
||||
<string name="display_filter_live">Berlaku langsung. Digunakan bersama oleh Steam dan Desktop.</string>
|
||||
<string name="display_filter_note">FSR, GSR, dan NIS berlaku saat memperbesar gambar sesi. Hanya penajaman juga berfungsi tanpa pembesaran.</string>
|
||||
<string name="display_sharpness">Ketajaman filter</string>
|
||||
<string name="display_frame_rate">Frame rate</string>
|
||||
<string name="display_look_filter">%1$s Mengatur skala ke %2$s.</string>
|
||||
<string name="display_match_screen">Sesuaikan layar (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Ikuti layar (ukuran berubah saat dilipat atau dibuka)</string>
|
||||
@@ -3072,6 +3073,7 @@
|
||||
<string name="library_remove">Hapus dari Pustaka</string>
|
||||
<string name="library_in">Di Pustaka</string>
|
||||
<string name="xbox_filter_show">Tampilkan</string>
|
||||
<string name="itch_collections">Koleksi</string>
|
||||
<string name="xbox_filter_cloud">Cloud</string>
|
||||
<string name="stores_xbox_cloud_settings">Pengaturan cloud</string>
|
||||
</resources>
|
||||
@@ -1954,6 +1954,7 @@
|
||||
<string name="display_filter_live">Si applica subito. Condiviso da Steam e Desktop.</string>
|
||||
<string name="display_filter_note">FSR, GSR e NIS si applicano quando l\'immagine della sessione viene ingrandita. Solo nitidezza funziona anche senza ingrandimento.</string>
|
||||
<string name="display_sharpness">Nitidezza del filtro</string>
|
||||
<string name="display_frame_rate">Frequenza fotogrammi</string>
|
||||
<string name="display_look_filter">%1$s Imposta il ridimensionamento su %2$s.</string>
|
||||
<string name="display_match_screen">Adatta allo schermo (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Segui lo schermo (si ridimensiona quando lo pieghi o lo apri)</string>
|
||||
@@ -3116,6 +3117,7 @@
|
||||
<string name="library_remove">Rimuovi dalla Libreria</string>
|
||||
<string name="library_in">Nella Libreria</string>
|
||||
<string name="xbox_filter_show">Mostra</string>
|
||||
<string name="itch_collections">Raccolte</string>
|
||||
<string name="xbox_filter_cloud">Cloud</string>
|
||||
<string name="stores_xbox_cloud_settings">Impostazioni cloud</string>
|
||||
</resources>
|
||||
@@ -1922,6 +1922,7 @@
|
||||
<string name="display_filter_live">すぐに反映されます。Steamとデスクトップで共有されます。</string>
|
||||
<string name="display_filter_note">FSR、GSR、NISはセッションの映像を拡大するときに機能します。「シャープのみ」は拡大しなくても機能します。</string>
|
||||
<string name="display_sharpness">フィルターのシャープネス</string>
|
||||
<string name="display_frame_rate">フレームレート</string>
|
||||
<string name="display_look_filter">%1$s スケーリングを%2$sに設定します。</string>
|
||||
<string name="display_match_screen">画面に合わせる(%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">画面に追従(開閉時にサイズを変更)</string>
|
||||
@@ -3059,6 +3060,7 @@
|
||||
<string name="library_remove">ライブラリから削除</string>
|
||||
<string name="library_in">ライブラリにあります</string>
|
||||
<string name="xbox_filter_show">表示</string>
|
||||
<string name="itch_collections">コレクション</string>
|
||||
<string name="xbox_filter_cloud">クラウド</string>
|
||||
<string name="stores_xbox_cloud_settings">クラウド設定</string>
|
||||
</resources>
|
||||
@@ -1922,6 +1922,7 @@
|
||||
<string name="display_filter_live">즉시 적용됩니다. Steam과 데스크톱에서 공유됩니다.</string>
|
||||
<string name="display_filter_note">FSR, GSR, NIS는 세션 이미지를 확대할 때 적용됩니다. 샤프닝 전용은 확대하지 않아도 작동합니다.</string>
|
||||
<string name="display_sharpness">필터 선명도</string>
|
||||
<string name="display_frame_rate">프레임 속도</string>
|
||||
<string name="display_look_filter">%1$s 스케일링을 %2$s(으)로 설정합니다.</string>
|
||||
<string name="display_match_screen">화면에 맞춤(%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">화면 따라가기(접거나 펼치면 크기 변경)</string>
|
||||
@@ -3059,6 +3060,7 @@
|
||||
<string name="library_remove">라이브러리에서 제거</string>
|
||||
<string name="library_in">라이브러리에 있음</string>
|
||||
<string name="xbox_filter_show">표시</string>
|
||||
<string name="itch_collections">컬렉션</string>
|
||||
<string name="xbox_filter_cloud">클라우드</string>
|
||||
<string name="stores_xbox_cloud_settings">클라우드 설정</string>
|
||||
</resources>
|
||||
@@ -1920,6 +1920,7 @@
|
||||
<string name="display_filter_live">Berkuat kuasa secara langsung. Dikongsi oleh Steam dan Desktop.</string>
|
||||
<string name="display_filter_note">FSR, GSR dan NIS berkuat kuasa semasa membesarkan imej sesi. Ketajaman sahaja juga berfungsi tanpa pembesaran.</string>
|
||||
<string name="display_sharpness">Ketajaman penapis</string>
|
||||
<string name="display_frame_rate">Kadar bingkai</string>
|
||||
<string name="display_look_filter">%1$s Menetapkan penskalaan ke %2$s.</string>
|
||||
<string name="display_match_screen">Sepadan skrin (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Ikut skrin (mengubah saiz apabila dilipat atau dibuka)</string>
|
||||
@@ -3057,6 +3058,7 @@
|
||||
<string name="library_remove">Alih keluar dari Pustaka</string>
|
||||
<string name="library_in">Dalam Pustaka</string>
|
||||
<string name="xbox_filter_show">Tunjukkan</string>
|
||||
<string name="itch_collections">Koleksi</string>
|
||||
<string name="xbox_filter_cloud">Awan</string>
|
||||
<string name="stores_xbox_cloud_settings">Tetapan awan</string>
|
||||
</resources>
|
||||
@@ -1941,6 +1941,7 @@
|
||||
<string name="display_filter_live">Gjelder live. Delt av Steam og Skrivebord.</string>
|
||||
<string name="display_filter_note">FSR, GSR og NIS gjelder ved forstørring av sesjonsbildet. Bare skarphet fungerer også uten forstørring.</string>
|
||||
<string name="display_sharpness">Filterskarphet</string>
|
||||
<string name="display_frame_rate">Bildefrekvens</string>
|
||||
<string name="display_look_filter">%1$s Setter skalering til %2$s.</string>
|
||||
<string name="display_match_screen">Tilpass skjerm (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Følg skjermen (endrer størrelse ved sammenslåing eller utbretting)</string>
|
||||
@@ -3082,6 +3083,7 @@
|
||||
<string name="library_remove">Fjern fra Bibliotek</string>
|
||||
<string name="library_in">I Bibliotek</string>
|
||||
<string name="xbox_filter_show">Vis</string>
|
||||
<string name="itch_collections">Samlinger</string>
|
||||
<string name="xbox_filter_cloud">Sky</string>
|
||||
<string name="stores_xbox_cloud_settings">Skyinnstillinger</string>
|
||||
</resources>
|
||||
@@ -1941,6 +1941,7 @@
|
||||
<string name="display_filter_live">Wordt direct toegepast. Gedeeld door Steam en Desktop.</string>
|
||||
<string name="display_filter_note">FSR, GSR en NIS worden toegepast bij het vergroten van het sessiebeeld. Alleen verscherpen werkt ook zonder vergroting.</string>
|
||||
<string name="display_sharpness">Filterscherpte</string>
|
||||
<string name="display_frame_rate">Framerate</string>
|
||||
<string name="display_look_filter">%1$s Zet schaling op %2$s.</string>
|
||||
<string name="display_match_screen">Schermformaat (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Scherm volgen (past formaat aan bij vouwen of uitvouwen)</string>
|
||||
@@ -3082,6 +3083,7 @@
|
||||
<string name="library_remove">Verwijderen uit Bibliotheek</string>
|
||||
<string name="library_in">In Bibliotheek</string>
|
||||
<string name="xbox_filter_show">Weergeven</string>
|
||||
<string name="itch_collections">Collecties</string>
|
||||
<string name="xbox_filter_cloud">Cloud</string>
|
||||
<string name="stores_xbox_cloud_settings">Cloudinstellingen</string>
|
||||
</resources>
|
||||
@@ -1983,6 +1983,7 @@
|
||||
<string name="display_filter_live">Działa od razu. Wspólny dla Steam i Pulpitu.</string>
|
||||
<string name="display_filter_note">FSR, GSR i NIS działają przy powiększaniu obrazu sesji. „Tylko wyostrzanie” działa też bez powiększania.</string>
|
||||
<string name="display_sharpness">Ostrość filtra</string>
|
||||
<string name="display_frame_rate">Liczba klatek</string>
|
||||
<string name="display_look_filter">%1$s Ustawia skalowanie na %2$s.</string>
|
||||
<string name="display_match_screen">Dopasuj do ekranu (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Dopasuj do ekranu (zmienia rozmiar po złożeniu lub rozłożeniu)</string>
|
||||
@@ -3153,6 +3154,7 @@
|
||||
<string name="library_remove">Usuń z biblioteki</string>
|
||||
<string name="library_in">W bibliotece</string>
|
||||
<string name="xbox_filter_show">Pokaż</string>
|
||||
<string name="itch_collections">Kolekcje</string>
|
||||
<string name="xbox_filter_cloud">Chmura</string>
|
||||
<string name="stores_xbox_cloud_settings">Ustawienia chmury</string>
|
||||
</resources>
|
||||
@@ -1954,6 +1954,7 @@
|
||||
<string name="display_filter_live">Aplica-se em tempo real. Partilhado pelo Steam e pelo Ambiente de trabalho.</string>
|
||||
<string name="display_filter_note">FSR, GSR e NIS aplicam-se ao ampliar a imagem da sessão. «Só nitidez» também funciona sem ampliação.</string>
|
||||
<string name="display_sharpness">Nitidez do filtro</string>
|
||||
<string name="display_frame_rate">Taxa de fotogramas</string>
|
||||
<string name="display_look_filter">%1$s Define a escala como %2$s.</string>
|
||||
<string name="display_match_screen">Igual ao ecrã (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Seguir o ecrã (redimensiona ao dobrar ou desdobrar)</string>
|
||||
@@ -3116,6 +3117,7 @@
|
||||
<string name="library_remove">Remover da Biblioteca</string>
|
||||
<string name="library_in">Na Biblioteca</string>
|
||||
<string name="xbox_filter_show">Mostrar</string>
|
||||
<string name="itch_collections">Coleções</string>
|
||||
<string name="xbox_filter_cloud">Nuvem</string>
|
||||
<string name="stores_xbox_cloud_settings">Definições da nuvem</string>
|
||||
</resources>
|
||||
@@ -1954,6 +1954,7 @@
|
||||
<string name="display_filter_live">Aplicado na hora. Compartilhado entre Steam e Área de trabalho.</string>
|
||||
<string name="display_filter_note">FSR, GSR e NIS são aplicados ao ampliar a imagem da sessão. Só nitidez também funciona sem ampliação.</string>
|
||||
<string name="display_sharpness">Nitidez do filtro</string>
|
||||
<string name="display_frame_rate">Taxa de quadros</string>
|
||||
<string name="display_look_filter">%1$s Define a escala como %2$s.</string>
|
||||
<string name="display_match_screen">Igual à tela (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Seguir a tela (redimensiona ao dobrar ou desdobrar)</string>
|
||||
@@ -3116,6 +3117,7 @@
|
||||
<string name="library_remove">Remover da Biblioteca</string>
|
||||
<string name="library_in">Na Biblioteca</string>
|
||||
<string name="xbox_filter_show">Mostrar</string>
|
||||
<string name="itch_collections">Coleções</string>
|
||||
<string name="xbox_filter_cloud">Nuvem</string>
|
||||
<string name="stores_xbox_cloud_settings">Configurações da nuvem</string>
|
||||
</resources>
|
||||
@@ -1962,6 +1962,7 @@
|
||||
<string name="display_filter_live">Se aplică live. Partajat de Steam și Desktop.</string>
|
||||
<string name="display_filter_note">FSR, GSR și NIS se aplică la mărirea imaginii sesiunii. Doar claritate funcționează și fără mărire.</string>
|
||||
<string name="display_sharpness">Claritatea filtrului</string>
|
||||
<string name="display_frame_rate">Rata de cadre</string>
|
||||
<string name="display_look_filter">%1$s Setează scalarea la %2$s.</string>
|
||||
<string name="display_match_screen">Potrivire ecran (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Urmărește ecranul (se redimensionează la împăturire sau desfacere)</string>
|
||||
@@ -3116,6 +3117,7 @@
|
||||
<string name="library_remove">Elimină din Bibliotecă</string>
|
||||
<string name="library_in">În Bibliotecă</string>
|
||||
<string name="xbox_filter_show">Afișează</string>
|
||||
<string name="itch_collections">Colecții</string>
|
||||
<string name="xbox_filter_cloud">Cloud</string>
|
||||
<string name="stores_xbox_cloud_settings">Setări cloud</string>
|
||||
</resources>
|
||||
@@ -1985,6 +1985,7 @@
|
||||
<string name="display_filter_live">Применяется сразу. Общий для Steam и рабочего стола.</string>
|
||||
<string name="display_filter_note">FSR, GSR и NIS работают при увеличении изображения сессии. «Sharpen only» работает и без увеличения.</string>
|
||||
<string name="display_sharpness">Резкость фильтра</string>
|
||||
<string name="display_frame_rate">Частота кадров</string>
|
||||
<string name="display_look_filter">%1$s Устанавливает масштабирование: %2$s.</string>
|
||||
<string name="display_match_screen">По размеру экрана (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">По экрану (меняется при складывании и раскладывании)</string>
|
||||
@@ -3152,6 +3153,7 @@
|
||||
<string name="library_remove">Убрать из библиотеки</string>
|
||||
<string name="library_in">В библиотеке</string>
|
||||
<string name="xbox_filter_show">Показать</string>
|
||||
<string name="itch_collections">Коллекции</string>
|
||||
<string name="xbox_filter_cloud">Облако</string>
|
||||
<string name="stores_xbox_cloud_settings">Настройки облака</string>
|
||||
</resources>
|
||||
@@ -1941,6 +1941,7 @@
|
||||
<string name="display_filter_live">Tillämpas direkt. Delas av Steam och skrivbordet.</string>
|
||||
<string name="display_filter_note">FSR, GSR och NIS tillämpas när sessionens bild förstoras. Endast skärpa fungerar även utan förstoring.</string>
|
||||
<string name="display_sharpness">Filterskärpa</string>
|
||||
<string name="display_frame_rate">Bildfrekvens</string>
|
||||
<string name="display_look_filter">%1$s Ställer in skalning till %2$s.</string>
|
||||
<string name="display_match_screen">Matcha skärmen (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Följ skärmen (ändrar storlek vid vikning)</string>
|
||||
@@ -3082,6 +3083,7 @@
|
||||
<string name="library_remove">Ta bort från Bibliotek</string>
|
||||
<string name="library_in">I Bibliotek</string>
|
||||
<string name="xbox_filter_show">Visa</string>
|
||||
<string name="itch_collections">Samlingar</string>
|
||||
<string name="xbox_filter_cloud">Moln</string>
|
||||
<string name="stores_xbox_cloud_settings">Molninställningar</string>
|
||||
</resources>
|
||||
@@ -1920,6 +1920,7 @@
|
||||
<string name="display_filter_live">มีผลทันที ใช้ร่วมกันระหว่าง Steam และเดสก์ท็อป</string>
|
||||
<string name="display_filter_note">FSR, GSR และ NIS จะมีผลเมื่อขยายภาพของเซสชัน เพิ่มความคมชัดเท่านั้นทำงานได้โดยไม่ต้องขยายภาพด้วย</string>
|
||||
<string name="display_sharpness">ความคมชัดของตัวกรอง</string>
|
||||
<string name="display_frame_rate">อัตราเฟรม</string>
|
||||
<string name="display_look_filter">%1$s ตั้งการปรับขนาดเป็น %2$s</string>
|
||||
<string name="display_match_screen">พอดีหน้าจอ (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">ตามหน้าจอ (ปรับขนาดเมื่อพับหรือกาง)</string>
|
||||
@@ -3057,6 +3058,7 @@
|
||||
<string name="library_remove">นำออกจากไลบรารี</string>
|
||||
<string name="library_in">อยู่ในไลบรารี</string>
|
||||
<string name="xbox_filter_show">แสดง</string>
|
||||
<string name="itch_collections">คอลเลกชัน</string>
|
||||
<string name="xbox_filter_cloud">คลาวด์</string>
|
||||
<string name="stores_xbox_cloud_settings">การตั้งค่าคลาวด์</string>
|
||||
</resources>
|
||||
@@ -1935,6 +1935,7 @@
|
||||
<string name="display_filter_live">Anında uygulanır. Steam ve Masaüstü tarafından paylaşılır.</string>
|
||||
<string name="display_filter_note">FSR, GSR ve NIS, oturum görüntüsü büyütülürken uygulanır. Yalnızca keskinleştirme büyütme olmadan da çalışır.</string>
|
||||
<string name="display_sharpness">Filtre keskinliği</string>
|
||||
<string name="display_frame_rate">Kare hızı</string>
|
||||
<string name="display_look_filter">%1$s Ölçeklemeyi %2$s olarak ayarlar.</string>
|
||||
<string name="display_match_screen">Ekrana Uydur (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Ekranı takip et (katlanıp açıldığında yeniden boyutlanır)</string>
|
||||
@@ -3084,6 +3085,7 @@
|
||||
<string name="library_remove">Kütüphane içinden kaldır</string>
|
||||
<string name="library_in">Kütüphane içinde</string>
|
||||
<string name="xbox_filter_show">Göster</string>
|
||||
<string name="itch_collections">Koleksiyonlar</string>
|
||||
<string name="xbox_filter_cloud">Bulut</string>
|
||||
<string name="stores_xbox_cloud_settings">Bulut ayarları</string>
|
||||
</resources>
|
||||
@@ -1983,6 +1983,7 @@
|
||||
<string name="display_filter_live">Застосовується відразу. Спільний для Steam і Робочого столу.</string>
|
||||
<string name="display_filter_note">FSR, GSR і NIS застосовуються під час збільшення зображення сеансу. «Лише різкість» працює і без збільшення.</string>
|
||||
<string name="display_sharpness">Різкість фільтра</string>
|
||||
<string name="display_frame_rate">Частота кадрів</string>
|
||||
<string name="display_look_filter">%1$s Встановлює масштабування на %2$s.</string>
|
||||
<string name="display_match_screen">Під екран (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Слідувати за екраном (змінює розмір при згортанні чи розгортанні)</string>
|
||||
@@ -3150,6 +3151,7 @@
|
||||
<string name="library_remove">Прибрати з бібліотеки</string>
|
||||
<string name="library_in">У бібліотеці</string>
|
||||
<string name="xbox_filter_show">Показати</string>
|
||||
<string name="itch_collections">Колекції</string>
|
||||
<string name="xbox_filter_cloud">Хмара</string>
|
||||
<string name="stores_xbox_cloud_settings">Налаштування хмари</string>
|
||||
</resources>
|
||||
@@ -1920,6 +1920,7 @@
|
||||
<string name="display_filter_live">Áp dụng ngay. Dùng chung cho Steam và Desktop.</string>
|
||||
<string name="display_filter_note">FSR, GSR và NIS áp dụng khi phóng to hình ảnh phiên. Chỉ làm nét cũng hoạt động mà không cần phóng to.</string>
|
||||
<string name="display_sharpness">Độ sắc nét bộ lọc</string>
|
||||
<string name="display_frame_rate">Tốc độ khung hình</string>
|
||||
<string name="display_look_filter">%1$s Đặt chia tỷ lệ thành %2$s.</string>
|
||||
<string name="display_match_screen">Khớp màn hình (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Theo màn hình (đổi kích thước khi gập hoặc mở)</string>
|
||||
@@ -3057,6 +3058,7 @@
|
||||
<string name="library_remove">Xóa khỏi Thư viện</string>
|
||||
<string name="library_in">Trong Thư viện</string>
|
||||
<string name="xbox_filter_show">Hiển thị</string>
|
||||
<string name="itch_collections">Bộ sưu tập</string>
|
||||
<string name="xbox_filter_cloud">Đám mây</string>
|
||||
<string name="stores_xbox_cloud_settings">Cài đặt đám mây</string>
|
||||
</resources>
|
||||
@@ -2000,6 +2000,7 @@
|
||||
<string name="display_filter_live">即时生效。由 Steam 和桌面共享。</string>
|
||||
<string name="display_filter_note">FSR、GSR 和 NIS 在放大会话画面时生效。“仅锐化”在不放大时也可用。</string>
|
||||
<string name="display_sharpness">滤镜锐度</string>
|
||||
<string name="display_frame_rate">帧率</string>
|
||||
<string name="display_look_filter">%1$s 将缩放设为 %2$s。</string>
|
||||
<string name="display_match_screen">匹配屏幕(%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">跟随屏幕(折叠或展开时调整大小)</string>
|
||||
@@ -3061,6 +3062,7 @@
|
||||
<string name="library_remove">从游戏库移除</string>
|
||||
<string name="library_in">已在游戏库</string>
|
||||
<string name="xbox_filter_show">显示</string>
|
||||
<string name="itch_collections">收藏集</string>
|
||||
<string name="xbox_filter_cloud">云</string>
|
||||
<string name="stores_xbox_cloud_settings">云设置</string>
|
||||
</resources>
|
||||
@@ -1923,6 +1923,7 @@
|
||||
<string name="display_filter_live">即時生效。Steam 和桌面共用。</string>
|
||||
<string name="display_filter_note">FSR、GSR 和 NIS 會在放大會話畫面時套用。「只銳化」不放大也能使用。</string>
|
||||
<string name="display_sharpness">濾鏡銳利度</string>
|
||||
<string name="display_frame_rate">幀率</string>
|
||||
<string name="display_look_filter">%1$s 將縮放設為 %2$s。</string>
|
||||
<string name="display_match_screen">配合螢幕(%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">跟隨螢幕(摺疊或展開時調整大小)</string>
|
||||
@@ -3060,6 +3061,7 @@
|
||||
<string name="library_remove">從收藏庫移除</string>
|
||||
<string name="library_in">已在收藏庫</string>
|
||||
<string name="xbox_filter_show">顯示</string>
|
||||
<string name="itch_collections">收藏集</string>
|
||||
<string name="xbox_filter_cloud">雲端</string>
|
||||
<string name="stores_xbox_cloud_settings">雲端設定</string>
|
||||
</resources>
|
||||
@@ -1923,6 +1923,7 @@
|
||||
<string name="display_filter_live">立即生效。Steam 和桌面共用。</string>
|
||||
<string name="display_filter_note">FSR、GSR 和 NIS 會在放大工作階段畫面時套用。「僅銳化」不放大也能使用。</string>
|
||||
<string name="display_sharpness">濾鏡銳利度</string>
|
||||
<string name="display_frame_rate">影格率</string>
|
||||
<string name="display_look_filter">%1$s 將縮放設為 %2$s。</string>
|
||||
<string name="display_match_screen">符合螢幕(%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">跟隨螢幕(摺疊或展開時調整大小)</string>
|
||||
@@ -3060,6 +3061,7 @@
|
||||
<string name="library_remove">從收藏庫移除</string>
|
||||
<string name="library_in">已在收藏庫</string>
|
||||
<string name="xbox_filter_show">顯示</string>
|
||||
<string name="itch_collections">收藏集</string>
|
||||
<string name="xbox_filter_cloud">雲端</string>
|
||||
<string name="stores_xbox_cloud_settings">雲端設定</string>
|
||||
</resources>
|
||||
@@ -258,6 +258,8 @@
|
||||
<string name="mode_ratio">Screen ratio</string>
|
||||
<string name="mode_ratio_custom">Set by the custom resolution.</string>
|
||||
<string name="mode_ratio_auto">Auto uses at least 16:9.</string>
|
||||
<string name="mode_performance">Performance mode</string>
|
||||
<string name="mode_performance_hint">Lets games run without waiting for the screen and reduces repeated window checks in gamescope and Wine. Can use more power and run warmer. Use Steam\'s Quick Access menu to limit Steam games. Applies next session.</string>
|
||||
<string name="mode_hdr">HDR</string>
|
||||
<string name="mode_hdr10">HDR10 output</string>
|
||||
<string name="mode_hdr_unavailable">Not available: %1$s.</string>
|
||||
@@ -308,7 +310,7 @@
|
||||
<string name="back_double_tap_window">Double-tap window</string>
|
||||
<string name="back_tap_ms">%1$d ms</string>
|
||||
<string name="brightness_permission_title">Allow brightness control</string>
|
||||
<string name="brightness_permission_text">Tap to allow Steam to change Android screen brightness.</string>
|
||||
<string name="brightness_permission_text">Set up brightness control in DroidDeck.</string>
|
||||
<string name="back_menu_then_qam">Menu → QAM</string>
|
||||
<string name="back_qam_then_menu">QAM → Menu</string>
|
||||
<string name="mode_session">Session</string>
|
||||
@@ -2052,6 +2054,7 @@
|
||||
<string name="display_filter_live">Applies live. Shared by Steam and Desktop.</string>
|
||||
<string name="display_filter_note">FSR, GSR and NIS apply when enlarging the session image. Sharpen only also works without enlargement.</string>
|
||||
<string name="display_sharpness">Filter sharpness</string>
|
||||
<string name="display_frame_rate">Frame rate</string>
|
||||
<string name="display_look_filter">%1$s Sets scaling to %2$s.</string>
|
||||
<string name="display_match_screen">Match screen (%1$d×%2$d)</string>
|
||||
<string name="display_follow_screen">Follow screen (resizes when folded or unfolded)</string>
|
||||
@@ -3233,8 +3236,32 @@
|
||||
<string name="library_remove">Remove from Library</string>
|
||||
<string name="library_in">In Library</string>
|
||||
<string name="xbox_filter_show">Show</string>
|
||||
<string name="itch_collections">Collections</string>
|
||||
<string name="xbox_filter_cloud">Cloud</string>
|
||||
<string name="stores_xbox_cloud_settings">Cloud settings</string>
|
||||
<string name="xbox_cloud_gaming" translatable="false">Xbox Cloud Gaming</string>
|
||||
<string name="xbox_filter_game_pass" translatable="false">Game Pass</string>
|
||||
<string name="integration_title">Steam integration</string>
|
||||
<string name="integration_count">%1$d of %2$d on</string>
|
||||
<string name="integration_set_up">Set up</string>
|
||||
<string name="integration_later">Not now</string>
|
||||
<string name="integration_location">Location</string>
|
||||
<string name="integration_app_info">App info</string>
|
||||
<string name="integration_wifi">Wi-Fi names</string>
|
||||
<string name="integration_brightness">Brightness</string>
|
||||
<string name="integration_home">DroidDeck as Home</string>
|
||||
<string name="integration_shortcuts">Home button shortcuts</string>
|
||||
<string name="integration_wifi_hint">Show networks in Steam · needs Location access, never tracked</string>
|
||||
<string name="integration_wifi_on">Networks show in Steam</string>
|
||||
<string name="integration_wifi_location_off">Location is off</string>
|
||||
<string name="integration_wifi_denied">Location denied · allow it in App info</string>
|
||||
<string name="integration_brightness_hint">Steam’s slider sets screen brightness</string>
|
||||
<string name="integration_home_hint">Home opens the Steam menu in a session</string>
|
||||
<string name="integration_shortcuts_hint">Hold Home for Steam Guide chords</string>
|
||||
<string name="integration_shortcuts_needs_home">Needs DroidDeck as Home</string>
|
||||
<string name="integration_shortcuts_maybe_restricted">Greyed out in Android? App info → ⋮ → Allow restricted settings</string>
|
||||
<string name="integration_shortcuts_restricted">Blocked by Android · App info → ⋮ → Allow restricted settings</string>
|
||||
<string name="integration_shortcuts_service">DroidDeck Home button</string>
|
||||
<string name="integration_shortcuts_service_description">Pass Home button presses to Steam Guide while a Steam session is focused and DroidDeck is the default Home app. Does not read screen content.</string>
|
||||
<string name="integration_brightness_needed">Turn on Brightness in Setup → Steam integration</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:accessibilityFeedbackType="feedbackGeneric"
|
||||
android:accessibilityFlags="flagRequestFilterKeyEvents"
|
||||
android:canRequestFilterKeyEvents="true"
|
||||
android:canRetrieveWindowContent="false"
|
||||
android:description="@string/integration_shortcuts_service_description" />
|
||||
@@ -6,6 +6,7 @@ import android.view.Display
|
||||
import androidx.compose.runtime.MutableState
|
||||
import com.droiddeck.launcher.SessionActivity
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
import org.junit.After
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Before
|
||||
@@ -37,10 +38,12 @@ class GlassesMirrorPacingTest {
|
||||
val panel = Shadow.extract<ModeDisplay>(activity.display)
|
||||
panel.supported = arrayOf(mode(1, 60f), mode(2, 90f), mode(3, 120f))
|
||||
panel.current = panel.supported.last()
|
||||
SessionState.performanceMode = false
|
||||
activity.getSharedPreferences("session", Context.MODE_PRIVATE).edit().clear().commit()
|
||||
}
|
||||
|
||||
@After fun cleanup() {
|
||||
SessionState.performanceMode = false
|
||||
activity.getSharedPreferences("session", Context.MODE_PRIVATE).edit().clear().commit()
|
||||
}
|
||||
|
||||
@@ -50,7 +53,7 @@ class GlassesMirrorPacingTest {
|
||||
apply(connected, settings.copy(refreshHz = 90))
|
||||
expect(2, 90f, 90)
|
||||
apply(GlassesState(), settings)
|
||||
expect(3, 120f, SessionPrefs.FPS_UNPACED)
|
||||
expect(3, 120f, 0)
|
||||
}
|
||||
|
||||
@Test fun retiredSavedLimitsDoNotCapThePhoneOrMirroredOutput() {
|
||||
@@ -61,13 +64,21 @@ class GlassesMirrorPacingTest {
|
||||
apply(connected.copy(hz = 120f), settings)
|
||||
expect(1, 60f, 60)
|
||||
apply(GlassesState(), settings)
|
||||
expect(3, 120f, 0)
|
||||
}
|
||||
|
||||
@Test fun performanceModeResumesUnpacedOutputAfterMirrorDisconnects() {
|
||||
SessionState.performanceMode = true
|
||||
apply(connected, settings)
|
||||
expect(1, 60f, 60)
|
||||
apply(GlassesState(), settings)
|
||||
expect(3, 120f, SessionPrefs.FPS_UNPACED)
|
||||
}
|
||||
|
||||
@Test fun pacingFollowsThePanelWhenTheSystemKeepsALowerRateThanRequested() {
|
||||
Shadow.extract<ModeDisplay>(activity.display).current = mode(2, 90f)
|
||||
apply(GlassesState(), settings)
|
||||
expect(3, 90f, SessionPrefs.FPS_UNPACED)
|
||||
expect(3, 90f, 0)
|
||||
}
|
||||
|
||||
private fun apply(state: GlassesState, config: GlassesSettings) {
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.droiddeck.launcher.input
|
||||
|
||||
import android.app.Application
|
||||
import android.view.KeyEvent
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [28, 33], manifest = Config.NONE, application = Application::class)
|
||||
class HomeGuideInputTest {
|
||||
private val states = mutableListOf<Boolean>()
|
||||
private var cancellations = 0
|
||||
private val input = HomeGuideInput({ states.add(it) }, { cancellations++ })
|
||||
|
||||
private fun home(action: Int, device: Int = 10, repeat: Int = 0, down: Long = 10) =
|
||||
KeyEvent(down, down + 100, action, KeyEvent.KEYCODE_HOME, repeat, 0, device, 102)
|
||||
|
||||
@Test fun guideIsHeldImmediatelyAndReleaseDoesNotDependOnAndroidDownTime() {
|
||||
assertTrue(input.onKeyEvent(home(KeyEvent.ACTION_DOWN), true))
|
||||
assertEquals(listOf(true), states)
|
||||
assertTrue(input.onKeyEvent(home(KeyEvent.ACTION_DOWN, repeat = 1), true))
|
||||
assertFalse(input.onKeyEvent(KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BUTTON_X), true))
|
||||
assertTrue(input.onKeyEvent(home(KeyEvent.ACTION_UP, down = 77), true))
|
||||
assertEquals(listOf(true, false), states)
|
||||
}
|
||||
|
||||
@Test fun anUnownedHomePressKeepsAndroidBehaviorEvenIfSessionBecomesEligibleBeforeRelease() {
|
||||
assertFalse(input.onKeyEvent(home(KeyEvent.ACTION_DOWN), false))
|
||||
assertFalse(input.onKeyEvent(home(KeyEvent.ACTION_UP), true))
|
||||
assertTrue(states.isEmpty())
|
||||
}
|
||||
|
||||
@Test fun focusLossReleasesGuideAndConsumesTheOwnedReleaseWithoutAnotherTap() {
|
||||
input.onKeyEvent(home(KeyEvent.ACTION_DOWN), true)
|
||||
input.cancel()
|
||||
assertEquals(1, cancellations)
|
||||
assertTrue(input.onKeyEvent(home(KeyEvent.ACTION_DOWN, repeat = 2), false))
|
||||
assertTrue(input.onKeyEvent(home(KeyEvent.ACTION_UP), false))
|
||||
assertEquals(listOf(true, false), states)
|
||||
assertFalse(input.onKeyEvent(home(KeyEvent.ACTION_UP), false))
|
||||
}
|
||||
|
||||
@Test fun disablingDuringAHoldReleasesItAndDoesNotStealTheNextAndroidHomePress() {
|
||||
input.onKeyEvent(home(KeyEvent.ACTION_DOWN), true)
|
||||
assertTrue(input.onKeyEvent(home(KeyEvent.ACTION_UP), false))
|
||||
assertEquals(listOf(true, false), states)
|
||||
assertFalse(input.onKeyEvent(home(KeyEvent.ACTION_DOWN), false))
|
||||
}
|
||||
|
||||
@Test fun guideStaysHeldUntilAllOwnersReleaseAndDisconnectCancelsTheLastOwner() {
|
||||
input.onKeyEvent(home(KeyEvent.ACTION_DOWN), true)
|
||||
input.onKeyEvent(home(KeyEvent.ACTION_DOWN, device = 11), true)
|
||||
input.onKeyEvent(home(KeyEvent.ACTION_UP), true)
|
||||
assertEquals(listOf(true), states)
|
||||
input.onDeviceRemoved(11)
|
||||
assertEquals(listOf(true, false), states)
|
||||
assertEquals(1, cancellations)
|
||||
}
|
||||
}
|
||||
@@ -328,6 +328,53 @@ class PadBridgeQamTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun homeGuidePrecedesEarlyPartnerInputAndDoesNotGenerateABareButton() {
|
||||
bridge.setHomeGuidePressed(true)
|
||||
assertTrue(pad().isDown(PadState.GUIDE))
|
||||
bridge.applyExternal({ it.press(PadState.X, true) }, true)
|
||||
assertFalse(pad().isDown(PadState.X))
|
||||
advance(80)
|
||||
assertTrue(pad().isDown(PadState.GUIDE))
|
||||
assertTrue(pad().isDown(PadState.X))
|
||||
bridge.applyExternal({ it.press(PadState.X, false) }, true)
|
||||
bridge.setHomeGuidePressed(false)
|
||||
advance(1000)
|
||||
assertFalse(pad().isDown(PadState.GUIDE))
|
||||
assertFalse(pad().isDown(PadState.X))
|
||||
}
|
||||
|
||||
@Test fun cancellingHomeDiscardsQueuedPartnersAndReleasesGuideImmediately() {
|
||||
bridge.setHomeGuidePressed(true)
|
||||
bridge.applyExternal({ it.press(PadState.LB, true); it.leftY = -1f }, true)
|
||||
bridge.cancelHomeGuide()
|
||||
advance(1000)
|
||||
assertFalse(pad().isDown(PadState.GUIDE))
|
||||
assertFalse(pad().isDown(PadState.LB))
|
||||
assertEquals(0f, pad().leftY)
|
||||
}
|
||||
|
||||
@Test fun homeAndTouchGuideHaveIndependentReleases() {
|
||||
bridge.setHomeGuidePressed(true)
|
||||
bridge.setSystemButtons(true, false)
|
||||
bridge.setHomeGuidePressed(false)
|
||||
advance(1000)
|
||||
assertTrue(pad().isDown(PadState.GUIDE))
|
||||
bridge.setSystemButtons(false, false)
|
||||
advance(1000)
|
||||
assertFalse(pad().isDown(PadState.GUIDE))
|
||||
}
|
||||
|
||||
@Test fun releasingHomeStopsHeldAxesFromBecomingNavigation() {
|
||||
bridge.setHomeGuidePressed(true)
|
||||
bridge.applyExternal({ it.leftY = -1f }, true)
|
||||
advance(80)
|
||||
assertEquals(-1f, pad().leftY)
|
||||
bridge.setHomeGuidePressed(false)
|
||||
advance(1000)
|
||||
assertEquals(0f, pad().leftY)
|
||||
assertFalse(pad().isDown(PadState.GUIDE))
|
||||
}
|
||||
|
||||
private fun key(device: InputDevice, code: Int, action: Int = KeyEvent.ACTION_DOWN, repeat: Int = 0, scan: Int = 0) =
|
||||
KeyEvent(0L, 0L, action, code, repeat, 0, device.id, scan, 0, InputDevice.SOURCE_GAMEPAD)
|
||||
|
||||
|
||||
@@ -66,14 +66,16 @@ class DeviceControlsComponentTest {
|
||||
assertEquals(3, audio.getStreamVolume(AudioManager.STREAM_MUSIC))
|
||||
}
|
||||
|
||||
@Test fun deniedBrightnessIsReadBackAndAppliedOnlyAfterPermission() {
|
||||
@Test fun deniedBrightnessDoesNotOpenSettingsOrReplayAnOldSliderValueAfterPermission() {
|
||||
WriteSettingsShadow.writable = false
|
||||
request("brightness", "0.75")
|
||||
assertEquals(128, Settings.System.getInt(context.contentResolver, Settings.System.SCREEN_BRIGHTNESS))
|
||||
assertEquals(Settings.ACTION_MANAGE_WRITE_SETTINGS, shadowOf(context).nextStartedActivity.action)
|
||||
assertNull(shadowOf(context).nextStartedActivity)
|
||||
assertFalse(JSONObject(File(directory, "state.json").readText()).getBoolean("brightnessWritable"))
|
||||
WriteSettingsShadow.writable = true
|
||||
tick()
|
||||
assertEquals(128, Settings.System.getInt(context.contentResolver, Settings.System.SCREEN_BRIGHTNESS))
|
||||
request("brightness", "0.75")
|
||||
assertEquals(192, Settings.System.getInt(context.contentResolver, Settings.System.SCREEN_BRIGHTNESS))
|
||||
}
|
||||
|
||||
@@ -87,7 +89,7 @@ class DeviceControlsComponentTest {
|
||||
assertEquals(1.0, JSONObject(File(directory, "state.json").readText()).getDouble("brightness"), 0.0001)
|
||||
}
|
||||
|
||||
@Test fun hiddenPermissionRequestOffersANotificationAndRetainsTheLatestValue() {
|
||||
@Test fun permissionNotificationOpensOptionalLauncherSetupOnlyWhenSelected() {
|
||||
visible = false
|
||||
WriteSettingsShadow.writable = false
|
||||
request("brightness", "0.25")
|
||||
@@ -96,11 +98,13 @@ class DeviceControlsComponentTest {
|
||||
val notifications = context.getSystemService(NotificationManager::class.java)
|
||||
val notification = notifications.activeNotifications.single().notification
|
||||
notification.contentIntent.send()
|
||||
assertEquals(Settings.ACTION_MANAGE_WRITE_SETTINGS, shadowOf(context).nextStartedActivity.action)
|
||||
val intent = shadowOf(context).nextStartedActivity
|
||||
assertEquals(com.droiddeck.launcher.core.SteamIntegration.ACTION_SETUP, intent.action)
|
||||
assertEquals("BRIGHTNESS", intent.getStringExtra(com.droiddeck.launcher.core.SteamIntegration.EXTRA_FEATURE))
|
||||
shadowOf(Looper.getMainLooper()).idleFor(Duration.ofSeconds(121))
|
||||
WriteSettingsShadow.writable = true
|
||||
tick()
|
||||
assertEquals(192, Settings.System.getInt(context.contentResolver, Settings.System.SCREEN_BRIGHTNESS))
|
||||
assertEquals(128, Settings.System.getInt(context.contentResolver, Settings.System.SCREEN_BRIGHTNESS))
|
||||
assertTrue(notifications.activeNotifications.isEmpty())
|
||||
}
|
||||
|
||||
@@ -123,15 +127,15 @@ class DeviceControlsComponentTest {
|
||||
assertEquals(128, Settings.System.getInt(context.contentResolver, Settings.System.SCREEN_BRIGHTNESS))
|
||||
}
|
||||
|
||||
@Test fun rejectedPermissionCanBeRequestedAgainWithoutOpeningRepeatedScreens() {
|
||||
@Test fun repeatedSliderChangesDoNotInterruptTheSession() {
|
||||
WriteSettingsShadow.writable = false
|
||||
request("brightness", "0.75")
|
||||
assertNotNull(shadowOf(context).nextStartedActivity)
|
||||
assertNull(shadowOf(context).nextStartedActivity)
|
||||
request("brightness", "0.8")
|
||||
assertNull(shadowOf(context).nextStartedActivity)
|
||||
shadowOf(Looper.getMainLooper()).idleFor(Duration.ofSeconds(5))
|
||||
request("brightness", "0.8")
|
||||
assertNotNull(shadowOf(context).nextStartedActivity)
|
||||
assertNull(shadowOf(context).nextStartedActivity)
|
||||
}
|
||||
|
||||
@Test fun oversizedRequestsAreDiscardedAndDoNotBlockLaterCommands() {
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class OutputPacingTest {
|
||||
@Test fun phoneOutputIsUnpaced() {
|
||||
assertEquals(SessionPrefs.FPS_UNPACED, SessionPrefs.compositorFpsLimit(0))
|
||||
}
|
||||
|
||||
@Test fun mirroringKeepsTheGlassesRate() {
|
||||
assertEquals(60, SessionPrefs.compositorFpsLimit(60))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.RuntimeEnvironment
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [33])
|
||||
class PerformanceModeTest {
|
||||
private val app get() = RuntimeEnvironment.getApplication()
|
||||
private val session get() = app.getSharedPreferences("session", Context.MODE_PRIVATE)
|
||||
|
||||
@Before fun clear() { session.edit().clear().commit() }
|
||||
|
||||
@Test fun offByDefaultAndPerMode() {
|
||||
assertFalse(SessionPrefs.performanceMode(app, SessionService.MODE_STEAM))
|
||||
SessionPrefs.setPerformanceMode(app, SessionService.MODE_STEAM, true)
|
||||
assertTrue(SessionPrefs.performanceMode(app, SessionService.MODE_STEAM))
|
||||
assertFalse(SessionPrefs.performanceMode(app, SessionService.MODE_DESKTOP))
|
||||
}
|
||||
|
||||
@Test fun offKeepsDisplayAndMirrorPacing() {
|
||||
assertEquals(0, SessionPrefs.compositorFpsLimit(0, false))
|
||||
assertEquals(60, SessionPrefs.compositorFpsLimit(60, false))
|
||||
}
|
||||
|
||||
@Test fun onIsUnpacedUnlessMirroring() {
|
||||
assertEquals(SessionPrefs.FPS_UNPACED, SessionPrefs.compositorFpsLimit(0, true))
|
||||
assertEquals(60, SessionPrefs.compositorFpsLimit(60, true))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.droiddeck.launcher.stores.itch
|
||||
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
@org.junit.runner.RunWith(org.robolectric.RobolectricTestRunner::class)
|
||||
@org.robolectric.annotation.Config(sdk = [33], application = android.app.Application::class)
|
||||
class ItchCollectionsTest {
|
||||
@Test fun collectionsKeepTheirIdTitleAndCount() {
|
||||
val body = JSONArray()
|
||||
.put(JSONObject().put("id", 8356509).put("title", "library").put("games_count", 12))
|
||||
.put(JSONObject().put("id", 7).put("title", "").put("games_count", 3))
|
||||
.put(JSONObject().put("title", "no id"))
|
||||
val list = ItchCollections.parseCollections(body)
|
||||
assertEquals(listOf("8356509"), list.map { it.id })
|
||||
assertEquals("library", list.single().title)
|
||||
assertEquals(12, list.single().count)
|
||||
}
|
||||
|
||||
@Test fun collectionGamesReadBothKeyStylesAndSkipRowsWithoutAGame() {
|
||||
val game = JSONObject().put("id", 99).put("title", "Celeste 64").put("url", "https://noel.itch.io/celeste64")
|
||||
val snake = JSONObject().put("collection_games", JSONArray().put(JSONObject().put("game", game)).put(JSONObject().put("position", 1)))
|
||||
val camel = JSONObject().put("collectionGames", JSONArray().put(JSONObject().put("game", game)))
|
||||
assertEquals(listOf("noel.itch.io/celeste64"), ItchCollections.parseGames(snake).map { it.id })
|
||||
assertEquals(1, ItchCollections.parseGames(camel).size)
|
||||
assertEquals(false, ItchCollections.parseGames(snake).single().owned)
|
||||
assertEquals(0, ItchCollections.parseGames(JSONObject()).size)
|
||||
}
|
||||
}
|
||||
@@ -94,4 +94,23 @@ class LibraryEntriesTest {
|
||||
GameRef.parse("xbox:9NBLGGH4R315").let { assertEquals(Store.XBOX, it.store); assertEquals("9NBLGGH4R315", it.storeId) }
|
||||
GameRef.parse("app:nope:1").let { assertNull(it.store); assertNull(it.appId) }
|
||||
}
|
||||
|
||||
@Test fun aCollectionKeepsItsInstalledGamesAndListsTheRestAsNotInstalled() {
|
||||
val games = listOf(
|
||||
Library.SteamGame(440, "Team Fortress 2", null, "Steam library"),
|
||||
Library.SteamGame(-5, "Celeste", null, Library.ADDED, source = "itch", storeId = "a/celeste"),
|
||||
Library.SteamGame(-6, "Other", null, Library.ADDED, source = "itch", storeId = "a/other"),
|
||||
)
|
||||
val library = mapOf(Store.ITCH to listOf(owned(Store.ITCH, "a/celeste"), owned(Store.ITCH, "a/other"), owned(Store.ITCH, "b/owned")))
|
||||
val all = libraryEntries(games, library, setOf("itch:a/celeste", "itch:a/other"))
|
||||
val collection = listOf(owned(Store.ITCH, "a/celeste"), owned(Store.ITCH, "b/owned"), owned(Store.ITCH, "c/new"))
|
||||
val out = collectionEntries(all, collection)
|
||||
assertEquals(listOf("app:-5", "app:itch:b/owned", "app:itch:c/new"), out.map { it.key })
|
||||
assertEquals(listOf(true, false, false), out.map { it.installed })
|
||||
}
|
||||
|
||||
@Test fun anEmptyCollectionHidesEveryGame() {
|
||||
val all = libraryEntries(listOf(Library.SteamGame(440, "Team Fortress 2", null, "Steam library")), emptyMap(), emptySet())
|
||||
assertEquals(emptyList<String>(), collectionEntries(all, emptyList()).map { it.key })
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.ui.test.assertIsEnabled
|
||||
import androidx.compose.ui.test.assertIsNotEnabled
|
||||
import androidx.compose.ui.semantics.SemanticsProperties
|
||||
import androidx.compose.ui.test.SemanticsMatcher
|
||||
import androidx.compose.ui.test.assert
|
||||
import androidx.compose.ui.test.onNodeWithTag
|
||||
import androidx.compose.ui.test.onNodeWithText
|
||||
import androidx.compose.ui.test.performClick
|
||||
import com.droiddeck.launcher.core.SteamIntegration
|
||||
import com.droiddeck.launcher.core.SteamIntegration.Feature
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [33], qualifiers = "w960dp-h540dp-land")
|
||||
class SteamIntegrationGroupTest {
|
||||
@get:Rule val compose = createRobolectricComposeRule()
|
||||
private val state = mutableStateOf(SteamIntegration.State())
|
||||
private val requests = mutableListOf<Feature>()
|
||||
private var appInfo = 0
|
||||
private var location = 0
|
||||
|
||||
private fun stateIs(value: String) = SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, value)
|
||||
|
||||
private fun show() = compose.setContent {
|
||||
DroidDeckTheme {
|
||||
SteamIntegrationGroup(state.value, onFeature = { requests.add(it) }, onAppInfo = { appInfo++ }, onLocation = { location++ })
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun everySwitchRequestsOnlyItsOwnFeature() {
|
||||
state.value = SteamIntegration.State(home = true)
|
||||
show()
|
||||
compose.onNodeWithTag("integration-action-brightness").performClick()
|
||||
compose.onNodeWithTag("integration-action-home").performClick()
|
||||
compose.onNodeWithTag("integration-action-shortcuts").performClick()
|
||||
assertEquals(listOf(Feature.BRIGHTNESS, Feature.HOME, Feature.SHORTCUTS), requests)
|
||||
}
|
||||
|
||||
@Test fun switchesReflectAndroidGrants() {
|
||||
state.value = SteamIntegration.State(brightness = true, home = true, shortcuts = true)
|
||||
show()
|
||||
compose.onNodeWithTag("integration-action-brightness").assert(stateIs("On"))
|
||||
compose.onNodeWithTag("integration-action-shortcuts").assert(stateIs("On"))
|
||||
compose.onNodeWithTag("integration-action-wifi").assert(stateIs("Off"))
|
||||
compose.onNodeWithText("3 of 4 on").assertExists()
|
||||
}
|
||||
|
||||
@Test fun shortcutsWaitForHome() {
|
||||
show()
|
||||
compose.onNodeWithTag("integration-action-shortcuts").assertIsNotEnabled()
|
||||
compose.onNodeWithText("Needs DroidDeck as Home").assertExists()
|
||||
compose.runOnIdle { state.value = state.value.copy(home = true) }
|
||||
compose.onNodeWithTag("integration-action-shortcuts").assertIsEnabled()
|
||||
}
|
||||
|
||||
@Test fun restrictedShortcutsPointToAppInfo() {
|
||||
state.value = SteamIntegration.State(home = true, shortcutsRestricted = true)
|
||||
show()
|
||||
compose.onNodeWithTag("integration-action-shortcuts").assertIsNotEnabled()
|
||||
compose.onNodeWithText("App info").performClick()
|
||||
assertEquals(1, appInfo)
|
||||
compose.runOnIdle { state.value = state.value.copy(shortcutsRestricted = false) }
|
||||
compose.onNodeWithText("App info").assertDoesNotExist()
|
||||
compose.onNodeWithTag("integration-action-shortcuts").assertIsEnabled()
|
||||
}
|
||||
|
||||
@Test fun unconfirmedRestrictionOffersAppInfoAfterAnAttempt() {
|
||||
state.value = SteamIntegration.State(home = true)
|
||||
show()
|
||||
compose.onNodeWithText("App info").assertDoesNotExist()
|
||||
compose.runOnIdle { state.value = state.value.copy(shortcutsTried = true) }
|
||||
compose.onNodeWithTag("integration-action-shortcuts").assertIsEnabled()
|
||||
compose.onNodeWithText("App info").performClick()
|
||||
assertEquals(1, appInfo)
|
||||
}
|
||||
|
||||
@Test fun deniedLocationPointsToAppInfoWithoutTogglingWifi() {
|
||||
state.value = SteamIntegration.State(locationBlocked = true)
|
||||
show()
|
||||
compose.onNodeWithText("Location denied · allow it in App info").assertExists()
|
||||
compose.onNodeWithText("App info").performClick()
|
||||
assertEquals(1, location)
|
||||
assertTrue(requests.isEmpty())
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
# itch.io collections
|
||||
|
||||
On the Library's itch tab a Collections button in the header lists the collections of the signed-in
|
||||
itch account. Picking one hides every game that is not in it; the games of the collection that are not
|
||||
installed show in the existing "Not installed" section, and All brings the full library back. The button
|
||||
exists only while the itch chip is selected.
|
||||
|
||||
## Data
|
||||
|
||||
`ItchCollections` (`stores/itch/ItchCollections.kt`) asks itch with the account's API key:
|
||||
|
||||
```
|
||||
GET /profile/collections -> collections[{id, title, games_count}]
|
||||
GET /collections/<id>/collection-games?page=N -> collection_games[{game{...}}]
|
||||
```
|
||||
|
||||
Pages are read until one comes back empty. Each game goes through `ItchLibrary.item`, the reader the
|
||||
library and shelves share, so it looks the same everywhere. The selection and the loaded games live in
|
||||
memory; the list is asked again whenever the itch tab opens. Counts are logged
|
||||
(`itch.io: <n> collections`, `itch.io: collection <id> has <n> games`).
|
||||
|
||||
## Filtering
|
||||
|
||||
`collectionEntries` keeps the itch entries whose store key is in the collection, then adds the
|
||||
collection games the library has no entry for as not installed ones. Their game page resolves through
|
||||
`StoresState.detailItem`, which also looks at the collection games.
|
||||
@@ -96,7 +96,8 @@ running AIO Graphics Test uncapped, Xwayland used 24-32% of a core and the game'
|
||||
present thread sat about half idle.
|
||||
|
||||
The patch can keep the result for `DROIDDECK_WSI_BYPASS_CHECK_MS` milliseconds. Unset
|
||||
or 0 keeps the per-present check; the app sets 100. With 100, a window resize or a flip/obscure change is seen up to 100 ms
|
||||
or 0 keeps the per-present check; the app sets 100 only in Performance mode and 0
|
||||
otherwise. With 100, a window resize or a flip/obscure change is seen up to 100 ms
|
||||
later than before; surface creation and capability queries still check every time.
|
||||
|
||||
## 0118 Wayland: preserve signed plane positions
|
||||
@@ -120,34 +121,3 @@ The old component lost the image in Fill and magnification. The tested executabl
|
||||
matches the pinned p14 archive and the locally assembled APK. Hardware checks used
|
||||
native Gamescope properties; the physical Back+LB shortcut was not independently
|
||||
confirmed. The original APK and runtime were restored after validation.
|
||||
|
||||
## 0119 WSI: default image count while the frame limiter runs
|
||||
|
||||
The app sets `GAMESCOPE_WSI_MIN_IMAGE_COUNT=8` so an uncapped game keeps drawing while
|
||||
gamescope turns its buffers around. With Steam's Frame Limit on, gamescope forces FIFO,
|
||||
and the layer always hands the driver MAILBOX, so a game with eight images could queue
|
||||
up to seven frames inside gamescope before it blocked: each one adds a frame of input
|
||||
latency at the limited rate.
|
||||
|
||||
While the limiter forces FIFO, the layer now reports and enforces its default minimum
|
||||
of 3 images instead of the raised count; with the limiter off it uses the raised count
|
||||
as before. DXVK and VKD3D-Proton already recreate their swapchain when the limiter
|
||||
changes (the layer returns `VK_ERROR_OUT_OF_DATE_KHR`), so their image count follows
|
||||
the Quick Access menu. Other apps keep their swapchain on a limiter change; they now
|
||||
get `VK_SUBOPTIMAL_KHR` while their image count no longer matches, unless the layer
|
||||
marks them as not taking it (`NoSuboptimal`).
|
||||
|
||||
## 0120 Wayland: nested refresh follows the host
|
||||
|
||||
`-r` fixes the refresh gamescope paces at, and the frame limiter and Steam's Frame Limit
|
||||
slider use the same value. The app passes the panel refresh at session start, so a
|
||||
panel switched to another mode during the session (for example in the device's own
|
||||
quick settings) left gamescope pacing at the old rate until the next session; only the
|
||||
reported output refresh changed.
|
||||
|
||||
With `GAMESCOPE_NESTED_REFRESH_FOLLOWS_HOST=1`, a refresh the host compositor reports
|
||||
through presentation feedback replaces the `-r` value, so pacing and the limiter switch
|
||||
with the panel. `-r` still sets the starting rate, which avoids gamescope assuming
|
||||
60 Hz until the first frame is shown. When the refresh changes, gamescope also sends
|
||||
its `gamescope_control` display information to Steam again; Steam otherwise reads it
|
||||
only when it binds.
|
||||
@@ -1,59 +0,0 @@
|
||||
diff --git a/layer/VkLayer_FROG_gamescope_wsi.cpp b/layer/VkLayer_FROG_gamescope_wsi.cpp
|
||||
index ea4ba84..46d086c 100644
|
||||
--- a/layer/VkLayer_FROG_gamescope_wsi.cpp
|
||||
+++ b/layer/VkLayer_FROG_gamescope_wsi.cpp
|
||||
@@ -201,6 +201,13 @@ namespace GamescopeWSILayer {
|
||||
return s_minImageCount;
|
||||
}
|
||||
|
||||
+ // The raised count keeps an uncapped game drawing while gamescope turns its buffers around.
|
||||
+ // Under the frame limiter's FIFO the extra images only queue frames ahead of the screen,
|
||||
+ // so a limited swapchain gets the default count.
|
||||
+ static uint32_t getMinImageCount(bool forcingFifo) {
|
||||
+ return forcingFifo ? std::min(getMinImageCount(), 3u) : getMinImageCount();
|
||||
+ }
|
||||
+
|
||||
static bool getEnsureMinImageCount() {
|
||||
static bool s_ensureMinImageCount = []() -> bool {
|
||||
if (auto ensure = parseEnv<bool>("GAMESCOPE_WSI_ENSURE_MIN_IMAGE_COUNT")) {
|
||||
@@ -984,7 +991,7 @@ namespace GamescopeWSILayer {
|
||||
|
||||
pSurfaceCapabilities->currentExtent = rect->extent;
|
||||
}
|
||||
- pSurfaceCapabilities->minImageCount = getMinImageCount();
|
||||
+ pSurfaceCapabilities->minImageCount = getMinImageCount(gamescopeIsForcingFifo(gamescopeSurface->waylandObjects));
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
@@ -1027,7 +1034,7 @@ namespace GamescopeWSILayer {
|
||||
|
||||
pSurfaceCapabilities->surfaceCapabilities.currentExtent = rect->extent;
|
||||
}
|
||||
- pSurfaceCapabilities->surfaceCapabilities.minImageCount = getMinImageCount();
|
||||
+ pSurfaceCapabilities->surfaceCapabilities.minImageCount = getMinImageCount(gamescopeIsForcingFifo(gamescopeSurface->waylandObjects));
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
@@ -1305,7 +1312,7 @@ namespace GamescopeWSILayer {
|
||||
|
||||
uint32_t minImageCount = swapchainInfo.minImageCount;
|
||||
if (getEnsureMinImageCount())
|
||||
- minImageCount = std::max(getMinImageCount(), minImageCount);
|
||||
+ minImageCount = std::max(getMinImageCount(gamescopeIsForcingFifo(gamescopeSurface->waylandObjects)), minImageCount);
|
||||
swapchainInfo.minImageCount = minImageCount;
|
||||
|
||||
fprintf(stderr, "[Gamescope WSI] Creating swapchain for xid: 0x%0x - oldSwapchain: %p - provided minImageCount: %u - minImageCount: %u - format: %s - colorspace: %s - flip: %s\n",
|
||||
@@ -1627,6 +1634,13 @@ namespace GamescopeWSILayer {
|
||||
continue;
|
||||
}
|
||||
|
||||
+ // Other apps keep their swapchain when the limiter changes; ask them to recreate it so
|
||||
+ // the image count follows the limiter as well.
|
||||
+ if (!frameLimiterAware && gamescopeSwapchain->forceFifo != forceFifo &&
|
||||
+ getMinImageCount(true) != getMinImageCount(false) &&
|
||||
+ !(gamescopeSurface->flags & GamescopeLayerClient::Flag::NoSuboptimal))
|
||||
+ UpdateSwapchainResult(VK_SUBOPTIMAL_KHR);
|
||||
+
|
||||
const bool canBypass = gamescopeSurface->canBypassXWaylandAtPresent(gamescopeSwapchain->isHdrColorspace);
|
||||
if (canBypass != gamescopeSwapchain->isBypassingXWayland) {
|
||||
if (canBypass) {
|
||||
@@ -1,63 +0,0 @@
|
||||
diff --git a/src/Backends/WaylandBackend.cpp b/src/Backends/WaylandBackend.cpp
|
||||
index 40164ba..fa6060e 100644
|
||||
--- a/src/Backends/WaylandBackend.cpp
|
||||
+++ b/src/Backends/WaylandBackend.cpp
|
||||
@@ -1698,6 +1698,22 @@ namespace gamescope
|
||||
}
|
||||
}
|
||||
|
||||
+ // -r sets the refresh gamescope starts with. With GAMESCOPE_NESTED_REFRESH_FOLLOWS_HOST=1 a refresh
|
||||
+ // the host compositor reports later replaces it, so pacing and the frame limiter follow a panel
|
||||
+ // switched to another mode during the session.
|
||||
+ static void FollowHostRefresh( int32_t nRefreshmHz )
|
||||
+ {
|
||||
+ static const bool s_bFollow = []
|
||||
+ {
|
||||
+ const char *pszFollow = getenv( "GAMESCOPE_NESTED_REFRESH_FOLLOWS_HOST" );
|
||||
+ return pszFollow && atoi( pszFollow ) != 0;
|
||||
+ }();
|
||||
+ if ( !s_bFollow || !g_nNestedRefresh || g_nNestedRefresh == nRefreshmHz )
|
||||
+ return;
|
||||
+ xdg_log.infof( "Nested refresh follows the host: %.3fhz", ConvertmHzToHz( (float) nRefreshmHz ) );
|
||||
+ g_nNestedRefresh = nRefreshmHz;
|
||||
+ }
|
||||
+
|
||||
void CWaylandPlane::UpdateVRRRefreshRate()
|
||||
{
|
||||
if ( m_pParent )
|
||||
@@ -1724,6 +1740,7 @@ namespace gamescope
|
||||
// TODO(strategy): We should pick the largest refresh rate.
|
||||
xdg_log.infof( "Changed refresh to: %.3fhz", ConvertmHzToHz( (float) nLargestRefreshRateMhz ) );
|
||||
g_nOutputRefresh = nLargestRefreshRateMhz;
|
||||
+ FollowHostRefresh( nLargestRefreshRateMhz );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1798,6 +1815,7 @@ namespace gamescope
|
||||
{
|
||||
xdg_log.infof( "Changed refresh to: %.3fhz", ConvertmHzToHz( (float) nRefresh ) );
|
||||
g_nOutputRefresh = nRefresh;
|
||||
+ FollowHostRefresh( nRefresh );
|
||||
}
|
||||
|
||||
m_pConnector->SetHostCompositorIsCurrentlyVRR( false );
|
||||
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
|
||||
index 6c9299d..5fb9086 100644
|
||||
--- a/src/steamcompmgr.cpp
|
||||
+++ b/src/steamcompmgr.cpp
|
||||
@@ -9254,6 +9254,15 @@ void update_vrr_atoms(xwayland_ctx_t *root_ctx, bool force, bool* needs_flush =
|
||||
g_nCurrentRefreshRate_CachedValue = g_nOutputRefresh;
|
||||
if (needs_flush)
|
||||
*needs_flush = true;
|
||||
+
|
||||
+ // Steam reads the display's refresh rates from gamescope_control when it binds; send them again.
|
||||
+ if ( !force )
|
||||
+ {
|
||||
+ wlserver_lock();
|
||||
+ for ( const auto &control : wlserver.gamescope_controls )
|
||||
+ wlserver_send_gamescope_control( control );
|
||||
+ wlserver_unlock();
|
||||
+ }
|
||||
}
|
||||
|
||||
// Don't update this in-sync with DRM vrr usage.
|
||||
@@ -1,3 +1,3 @@
|
||||
GAMESCOPE_REPO=Droid-Deck/DroidDeck-Components
|
||||
GAMESCOPE_TAG=gamescope-3.16.29-qam-fd755be0-qa
|
||||
GAMESCOPE_SHA256=c4ae418b81c3c66689522547ec7237cdfd8108bec873c3f1db8350359e17a904
|
||||
GAMESCOPE_TAG=gamescope-3.16.29-p14
|
||||
GAMESCOPE_SHA256=f0f2f33767c883bcfe66f28c303fddc1564f91a915fb7cedd31eb823570b254c
|
||||
@@ -151,6 +151,12 @@ def robocop_rogue_city_feature_level(game):
|
||||
return {"VKD3D_FEATURE_LEVEL": "12_1"}, [], "RoboCop: Rogue City: D3D12 feature level 12_1"
|
||||
|
||||
|
||||
@fix
|
||||
def reskate_feature_level(game):
|
||||
if "skate.exe" in game.files and "reskate.dll" in game.files:
|
||||
return {"VKD3D_FEATURE_LEVEL": "12_1"}, [], "ReSkate (skate.): D3D12 feature level 12_1"
|
||||
|
||||
|
||||
@fix
|
||||
def cyberpunk_feature_level(game):
|
||||
if game.stem == "cyberpunk2077" or (
|
||||
@@ -351,6 +357,26 @@ def game_cores(env):
|
||||
print("droiddeck-game-env: could not use game cores %r (%s)" % (text, error), file=sys.stderr)
|
||||
|
||||
|
||||
def cpu_topology(env):
|
||||
if "PROTON_CPU_TOPOLOGY" in env:
|
||||
return
|
||||
if "WINE_CPU_TOPOLOGY" in env:
|
||||
if env["WINE_CPU_TOPOLOGY"]:
|
||||
env["PROTON_CPU_TOPOLOGY"] = env["WINE_CPU_TOPOLOGY"]
|
||||
return
|
||||
if not (env.get("DROIDDECK_GAME_CORES", "").strip() or env.get("BL_GAME_CPUS", "").strip()):
|
||||
return
|
||||
try:
|
||||
cores = sorted(os.sched_getaffinity(0))
|
||||
except OSError:
|
||||
return
|
||||
online = online_cores()
|
||||
if not cores or set(cores) >= online or cores[-1] >= len(online):
|
||||
return
|
||||
env["WINE_CPU_TOPOLOGY"] = env["PROTON_CPU_TOPOLOGY"] = "%d:%s" % (len(cores), ",".join(map(str, cores)))
|
||||
print("droiddeck-game-env: Windows sees %d cores (%s)" % (len(cores), env["WINE_CPU_TOPOLOGY"]), file=sys.stderr)
|
||||
|
||||
|
||||
def apply_config(env, config, app_id, fixes=None):
|
||||
if config.get("version") != 1:
|
||||
raise ValueError("unsupported environment configuration")
|
||||
@@ -627,6 +653,7 @@ def main():
|
||||
env = vram_cap(env)
|
||||
env = force_ssbs(command, env)
|
||||
game_cores(env)
|
||||
cpu_topology(env)
|
||||
try:
|
||||
xbox = runpy.run_path(str(Path(__file__).with_name("droiddeck-xbox")))
|
||||
except Exception as error:
|
||||
|
||||
@@ -238,8 +238,6 @@ if [ -z "${BL_INSIDE:-}" ]; then
|
||||
fi
|
||||
if [ "${BL_REFRESH:-0}" -gt 0 ]; then
|
||||
args+=(-r "$BL_REFRESH")
|
||||
# -r is the starting rate; gamescope follows the panel when it switches modes later.
|
||||
export GAMESCOPE_NESTED_REFRESH_FOLLOWS_HOST=1
|
||||
fi
|
||||
[ "$mode" = steam ] && [ "${BL_STEAM_UI:-}" != desktop ] && args+=(-e)
|
||||
if [ "$mode" = steam ] && [ "${BL_XWAYLAND_COUNT:-2}" -gt 1 ]; then
|
||||
|
||||
@@ -449,6 +449,47 @@ class GameEnvironmentTest(unittest.TestCase):
|
||||
self.assertEqual(calls, [{0, 1, 2}])
|
||||
self.assertEqual(MODULE["parse_cores"]("0,2-7"), {0, 2, 3, 4, 5, 6, 7})
|
||||
|
||||
def test_windows_games_see_only_the_cores_they_are_pinned_to(self):
|
||||
os_mod = MODULE["os"]
|
||||
online = {"online_cores": lambda: {0, 1, 2, 3, 4, 5, 6, 7}}
|
||||
cases = [
|
||||
({"BL_GAME_CPUS": "6,7"}, {6, 7}, "2:6,7", "2:6,7"),
|
||||
({"DROIDDECK_GAME_CORES": "0-2"}, {0, 1, 2}, "3:0,1,2", "3:0,1,2"),
|
||||
({"BL_GAME_CPUS": "0-7"}, set(range(8)), None, None),
|
||||
({}, {6, 7}, None, None),
|
||||
({"BL_GAME_CPUS": "6,7", "WINE_CPU_TOPOLOGY": "4:0,1,2,3"}, {6, 7}, "4:0,1,2,3", "4:0,1,2,3"),
|
||||
({"WINE_CPU_TOPOLOGY": "2:0,1"}, set(range(8)), "2:0,1", "2:0,1"),
|
||||
({"BL_GAME_CPUS": "6,7", "WINE_CPU_TOPOLOGY": ""}, {6, 7}, "", None),
|
||||
({"BL_GAME_CPUS": "6,7", "PROTON_CPU_TOPOLOGY": "1:7"}, {6, 7}, None, "1:7"),
|
||||
({"BL_GAME_CPUS": "9"}, {9}, None, None),
|
||||
]
|
||||
for env, affinity, expected, proton in cases:
|
||||
with mock.patch.dict(MODULE["cpu_topology"].__globals__, online), \
|
||||
mock.patch.object(os_mod, "sched_getaffinity", return_value=affinity, create=True):
|
||||
MODULE["cpu_topology"](env)
|
||||
self.assertEqual(env.get("WINE_CPU_TOPOLOGY"), expected, env)
|
||||
self.assertEqual(env.get("PROTON_CPU_TOPOLOGY"), proton, env)
|
||||
|
||||
def test_reskate_runs_at_feature_level_12_1(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
reskate = Path(tmp) / "ReSkate"
|
||||
reskate.mkdir()
|
||||
for name in ("Skate.exe", "ReSkate.dll", "ReSkateLauncher.exe", "EAAntiCheat.GameServiceLauncher.exe"):
|
||||
(reskate / name).touch()
|
||||
for exe in ("ReSkateLauncher.exe", "Skate.exe"):
|
||||
env, extra, notes = MODULE["engine_fixes"](str(reskate / exe), [])
|
||||
self.assertEqual((env, extra), ({"VKD3D_FEATURE_LEVEL": "12_1"}, []), exe)
|
||||
self.assertTrue(notes)
|
||||
config = {"version": 1, "shared": {"VKD3D_FEATURE_LEVEL": "12_2"}}
|
||||
self.assertEqual(MODULE["apply_config"]({}, config, "3354750", env)["VKD3D_FEATURE_LEVEL"], "12_1")
|
||||
config["games"] = {"3354750": {"VKD3D_FEATURE_LEVEL": "12_2"}}
|
||||
self.assertEqual(MODULE["apply_config"]({}, config, "3354750", env)["VKD3D_FEATURE_LEVEL"], "12_2")
|
||||
skate = Path(tmp) / "Skate"
|
||||
skate.mkdir()
|
||||
for name in ("Skate.exe", "EAAntiCheat.GameServiceLauncher.exe"):
|
||||
(skate / name).touch()
|
||||
self.assertEqual(MODULE["engine_fixes"](str(skate / "EAAntiCheat.GameServiceLauncher.exe"), [])[:2], ({}, []))
|
||||
|
||||
def test_caravan_sandwitch_robocop_and_cyberpunk_run_at_feature_level_12_1(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
caravan = Path(tmp) / "Caravan SandWitch"
|
||||
|
||||
@@ -18,19 +18,16 @@ class SessionPacingTest(unittest.TestCase):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
env = dict(os.environ, XDG_RUNTIME_DIR=directory, BL_REFRESH=str(refresh),
|
||||
BL_MANGOAPP='0', BL_FPS='0', DROIDDECK_GAME_FRAME_LIMIT='0')
|
||||
env.pop('GAMESCOPE_NESTED_REFRESH_FOLLOWS_HOST', None)
|
||||
env.update(overrides)
|
||||
script = '''
|
||||
set -u
|
||||
mode=steam
|
||||
pipewire_stub() { return 1; }
|
||||
run_gamescope() { printf 'ARG:%s\\n' "$@"; printf 'FOLLOW:%s\\n' "${GAMESCOPE_NESTED_REFRESH_FOLLOWS_HOST:-}"; }
|
||||
run_gamescope() { printf 'ARG:%s\\n' "$@"; }
|
||||
''' + block
|
||||
result = subprocess.run(['bash', '-c', script], env=env, capture_output=True,
|
||||
text=True, timeout=5)
|
||||
self.assertEqual(0, result.returncode, result.stderr)
|
||||
self.follow = [line.removeprefix('FOLLOW:') for line in result.stdout.splitlines()
|
||||
if line.startswith('FOLLOW:')]
|
||||
return [line.removeprefix('ARG:') for line in result.stdout.splitlines()
|
||||
if line.startswith('ARG:')]
|
||||
|
||||
@@ -41,12 +38,6 @@ run_gamescope() { printf 'ARG:%s\\n' "$@"; printf 'FOLLOW:%s\\n' "${GAMESCOPE_NE
|
||||
self.assertEqual(str(refresh), args[args.index('-r') + 1])
|
||||
self.assertIn('-e', args)
|
||||
|
||||
def test_gamescope_follows_the_panel_after_the_starting_rate(self):
|
||||
self.launch(144)
|
||||
self.assertEqual(['1'], self.follow)
|
||||
self.launch(0)
|
||||
self.assertEqual([''], self.follow)
|
||||
|
||||
def test_retired_cap_variables_do_not_override_the_display_rate(self):
|
||||
for performance in ('0', '1'):
|
||||
with self.subTest(performance=performance):
|
||||
|
||||
Reference in new issue
Block a user