diff --git a/app/src/debug/java/com/droiddeck/launcher/ui/PreviewSupport.kt b/app/src/debug/java/com/droiddeck/launcher/ui/PreviewSupport.kt index 8debb7e1cf..a5eed7e598 100644 --- a/app/src/debug/java/com/droiddeck/launcher/ui/PreviewSupport.kt +++ b/app/src/debug/java/com/droiddeck/launcher/ui/PreviewSupport.kt @@ -66,7 +66,7 @@ internal val sampleActions: FrontEndActions = FrontEndActions( /** The in-game menu's actions with settled sample values; its switches do nothing. */ internal fun sampleDrawerActions( - steam: Boolean = true, desktop: Boolean = false, secondScreen: SecondScreenMode? = null, + steam: Boolean = true, desktop: Boolean = false, secondScreen: SecondScreenMode? = null, inputGame: Pair? = null, ): DrawerActions = DrawerActions( steam = steam, desktop = desktop, title = if (!steam && !desktop) "Hades" else null, isHomeApp = false, androidApps = emptyList(), @@ -85,4 +85,5 @@ internal fun sampleDrawerActions( onKeyboard = {}, onHardwareKeyboard = {}, onSteamMenu = if (steam) ({}) else null, onQam = if (steam) ({}) else null, onLaunchAndroidApp = { _, _ -> }, onBackground = {}, onShareLogs = {}, onStop = {}, onClose = {}, + inputGame = inputGame, onEditLayout = {}, ) diff --git a/app/src/main/java/com/droiddeck/launcher/ui/DrawerControls.kt b/app/src/main/java/com/droiddeck/launcher/ui/DrawerControls.kt index 594b9c6525..8fb678d67d 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/DrawerControls.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/DrawerControls.kt @@ -54,8 +54,9 @@ internal fun DrawerControlsGroup(host: MenuHost, a: DrawerActions, track: (Strin val named = library.profiles.map { it.id to profileLabel(context, it) } // For one game the first choice follows whatever all games use; for all games the profile itself is the choice. val profiles = if (gameScope) listOf(InputProfiles.AUTO to stringResource(R.string.flow_same_as_all, - profileLabel(context, library.profile(library.activeId(a.desktop))))) + named else named - val selected = if (gameScope) own?.profile ?: InputProfiles.AUTO else library.activeId(a.desktop) + profileLabel(context, library.profile(library.activeId(a.desktop))))) + named + else listOf(InputProfiles.AUTO to stringResource(R.string.flow_default_profile, profileLabel(context, library.profile(library.defaultId(a.desktop))))) + named + val selected = if (gameScope) own?.profile ?: InputProfiles.AUTO else library.selection(a.desktop).profile val detail = listOfNotNull(profileLabel(context, active), if (changes > 0 && game != null) stringResource(R.string.flow_game_changes, game.second, changes) else null).joinToString(" ยท ") SettingsGroup(stringResource(R.string.flow_controls), key = "controller-input", detail = detail) { if (game != null) ChoiceRow(host, "input-scope", stringResource(R.string.flow_apply_to), null,