fix(input): address review of per-game controls, binder, editor and Winlator import

This commit is contained in:
Kurt Himebauch committed 2026-12-04 13:05:24 -05:00
1 parent 59071d78db
commit d6d47d379f
46 files changed
+159 -98

No files matched your search

@@ -1370,8 +1370,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
if (nextGame != null) gameStarts++
gestureGame = nextGame
refreshGestureConfig()
val inputChanges = inputGameKey() != SessionState.inputGame
if (inputChanges) releasePads()
restoreGamePanel(nextGame)
if (inputGameKey() != SessionState.inputGame) { releasePads(); refreshInputProfile() }
if (inputGameKey() != SessionState.inputGame) refreshInputProfile()
}
if (
SessionState.mode == SessionService.MODE_STEAM &&
@@ -115,10 +115,16 @@ object ControllerPrefs {
fun opacityFolded(context: Context) = prefs(context).getBoolean("opacityFolded", false)
/** Multiplies the old per-layout opacity into the global one, once. */
fun foldOpacity(context: Context, layoutPercent: Int) {
val folded = (onScreenOpacity(context) * layoutPercent / 100f).toInt().coerceIn(onScreenOpacityRange)
prefs(context).edit().putInt("onScreenOpacity", folded).putBoolean("opacityFolded", true).commit()
/** Multiplies the old per-layout opacity into the global one, once. False when it could not be saved. */
fun foldOpacity(context: Context, layoutPercent: Int): Boolean {
val p = prefs(context)
val before = onScreenOpacity(context)
val hadValue = p.contains("onScreenOpacity")
val folded = (before * layoutPercent / 100f).toInt().coerceIn(onScreenOpacityRange)
if (p.edit().putInt("onScreenOpacity", folded).putBoolean("opacityFolded", true).commit()) return true
// SharedPreferences keeps a failed commit's values in memory.
p.edit().apply { if (hadValue) putInt("onScreenOpacity", before) else remove("onScreenOpacity") }.remove("opacityFolded").apply()
return false
}
fun setAdaptiveSticks(context: Context, on: Boolean) {
@@ -46,7 +46,8 @@ object InputLibraries {
if (version < 12) library = barStockLayouts(library)
if (version < 13) library = LegacyScreenKeyMigration.pin(library)
if (version < 14) library = deckGamepadSurfaces(context, library)
if (version < 17) library = singleOpacity(context, library)
// Not tied to the version: a fold that could not be saved is tried again on the next read.
library = singleOpacity(context, library)
if (version < 6 || !p.contains(LegacyScreenKeyMigration.BACKUP)) {
val legacy = LegacyScreenKeyMigration.snapshot(context)
if (legacy != null) {
@@ -300,7 +301,7 @@ object InputLibraries {
if (library.layouts.all { it.style.opacity == 100 }) return library
if (!ControllerPrefs.opacityFolded(context)) {
val main = runCatching { library.activeLayout(false, InputRole.PRIMARY) }.getOrNull()?.style?.opacity ?: 100
ControllerPrefs.foldOpacity(context, main)
if (!ControllerPrefs.foldOpacity(context, main)) return library
}
return library.copy(layouts = library.layouts.map { it.copy(style = it.style.copy(opacity = 100)) })
}
@@ -190,7 +190,7 @@ data class InputLibrary(
fun gameChanges(isDesktop: Boolean, game: String, only: InputRole? = null): Int {
val current = games[game] ?: return 0
return current.parts.entries.filter { only == null || it.key == only }.sumOf { (role, part) ->
val base = copy(games = games - game).activePart(isDesktop, role)
val base = copy(games = games + (game to current.copy(parts = current.parts - role))).activePart(isDesktop, role, game)
val mine = preset(part.bindings)
val theirs = preset(base.bindings)
val controls = (mine.controls.keys + theirs.controls.keys).count { (mine.controls[it] ?: InputAction.Native()) != (theirs.controls[it] ?: InputAction.Native()) }
@@ -201,7 +201,8 @@ data class InputLibrary(
val before = baseLayout?.elements?.firstOrNull { it.id == e.id }
before == null || before != e || mine.action(e) != theirs.action(e) || (e.hasClick && mine.clickAction(e) != theirs.clickAction(e))
} + if (layout == null) 0 else baseLayout?.elements.orEmpty().count { e -> layout.elements.none { it.id == e.id } }
controls + keys + if (layout?.id == baseLayout?.id) 0 else elements
val styled = if (layout != null && layout.id != baseLayout?.id && layout.style != baseLayout?.style) 1 else 0
controls + keys + styled + if (layout?.id == baseLayout?.id) 0 else elements
}
}
fun withProfile(value: SavedInputProfile) = copy(profiles = profiles.filterNot { it.id == value.id } + value)
@@ -32,6 +32,8 @@ object WinlatorLayouts {
"KP_3" to 81, "KP_0" to 82, "KP_DEL" to 83, "F11" to 87, "F12" to 88, "KP_ENTER" to 96, "CTRL_R" to 97, "KP_DIVIDE" to 98,
"PRTSCN" to 99, "ALT_R" to 100, "HOME" to 102, "UP" to 103, "PG_UP" to 104, "PRIOR" to 104, "LEFT" to 105, "RIGHT" to 106,
"END" to 107, "DOWN" to 108, "PG_DOWN" to 109, "NEXT" to 109, "INSERT" to 110, "DEL" to 111,
// Older profiles name the left modifiers without a side.
"SHIFT" to 42, "CTRL" to 29, "ALT" to 56,
)
private val gamepad: Map<String, InputControl> = mapOf(
@@ -108,11 +110,15 @@ object WinlatorLayouts {
val shape = when (e.optString("shape")) { "CIRCLE" -> InputButtonShape.CIRCLE; "RECT", "SQUARE" -> InputButtonShape.RECTANGLE; else -> InputButtonShape.ROUNDED }
when (e.optString("type")) {
"BUTTON" -> {
val binding = bindings.firstOrNull { it != "NONE" } ?: continue
val action = buttonAction(binding) ?: InputAction.Disabled
val bound = bindings.filter { it != "NONE" && it.isNotBlank() }
val binding = bound.firstOrNull() ?: continue
// A button presses every bound slot at once, so several keys make one chord.
val chord = bound.mapNotNull(::key).distinct().take(8)
val action = if (bound.size > 1 && chord.size == bound.size) InputAction.Keys(chord)
else buttonAction(binding) ?: InputAction.Disabled
val trigger = action is InputAction.Native && (action.target == InputControl.LT || action.target == InputControl.RT)
val (hw, hh) = when (e.optString("shape")) { "RECT", "ROUND_RECT" -> 4f to 2f; "SQUARE" -> 2.5f to 2.5f; else -> 3f to 3f }
place(if (trigger) InputElementKind.TRIGGER else InputElementKind.BUTTON, text.ifEmpty { label(binding) }, cx, cy, hw * scale, hh * scale,
place(if (trigger) InputElementKind.TRIGGER else InputElementKind.BUTTON, text.ifEmpty { if (chord.size > 1 && chord.size == bound.size) bound.joinToString("+") { label(it) }.take(80) else label(binding) }, cx, cy, hw * scale, hh * scale,
action, shape, e.optBoolean("toggleSwitch"))
}
"D_PAD" -> place(InputElementKind.DPAD, text.ifEmpty { "D-pad" }, cx, cy, 7 * scale, 7 * scale, directionAction(bindings, InputElementKind.DPAD))
@@ -37,6 +37,7 @@ internal fun CommunityLayouts(role: InputRole, onUse: (Pair<SavedInputLayout, Sa
var failed by remember { mutableStateOf(false) }
var attempt by remember { mutableIntStateOf(0) }
val previews = remember { mutableStateMapOf<String, Pair<SavedInputLayout, SavedInputBindings>?>() }
val broken = remember { mutableStateMapOf<String, Boolean>() }
var loading by remember { mutableStateOf<String?>(null) }
LaunchedEffect(attempt) {
failed = false
@@ -54,7 +55,7 @@ internal fun CommunityLayouts(role: InputRole, onUse: (Pair<SavedInputLayout, Sa
else -> for (file in list) {
val title = file.removeSuffix(".icp").removeSuffix(".ICP")
val preview = previews[file]
SettingsRow(title, null) {
SettingsRow(title, if (broken[file] == true) stringResource(R.string.flow_community_failed) else null) {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) {
preview?.let { InputLayoutThumbnail(it.first, role) }
if (preview == null) SecondaryButton(stringResource(if (loading == file) R.string.flow_loading else R.string.flow_preview),
@@ -67,7 +68,7 @@ internal fun CommunityLayouts(role: InputRole, onUse: (Pair<SavedInputLayout, Sa
WinlatorLayouts.import(it, title, if (role == InputRole.PRIMARY) InputLayoutScreen.MAIN else InputLayoutScreen.SECONDARY,
metrics.widthPixels, metrics.heightPixels)
}
if (previews[file] == null) failed = raw == null
broken[file] = previews[file] == null
loading = null
}
}
@@ -82,7 +82,7 @@ internal fun InputButtonsPane(bindingsId: String, scope: String, baseId: String?
runCatching { InputLibraries.update(context) { l -> l.withPreset(l.preset(bindingsId).let { it.copy(controls = it.controls + (selected to action)) }) } }
.onSuccess { onChanged() }.onFailure { failure = it.message ?: context.getString(R.string.input_save_failed) }
}
val changed = InputControl.padControls.filter { c ->
val changed = InputControl.entries.filter { c ->
(preset.controls[c] ?: InputAction.Native()) != (base?.controls?.get(c) ?: InputAction.Native())
}
BackHandlerCompat(onBack)
@@ -160,10 +160,13 @@ internal fun ScopePill(text: String) {
private fun ControllerDrawing(selected: InputControl, modifier: Modifier, onPick: (InputControl) -> Unit) {
val context = LocalContext.current
val pick by rememberUpdatedState(onPick)
val current by rememberUpdatedState(selected)
AndroidView(factory = { InputSurfaceEditorView(it).apply { selectOnly = true; setBackgroundColor(android.graphics.Color.TRANSPARENT) } },
modifier = modifier.testTag("input-buttons-pad"), update = { view ->
view.onSelect = { id -> id?.removePrefix("legacy:")?.let(InputControl::fromId)?.let(pick) }
view.onResize = { _, _ -> }
view.onSelect = { id ->
val control = id?.removePrefix("legacy:")?.let(InputControl::fromId)
if (control != null) pick(control) else view.selected = "legacy:${current.id}"
}
fun place() {
if (view.width <= 0 || view.height <= 0) return
val stock = LegacyGamepadLayout(context, view.width, view.height).elements().filter { it.id.startsWith("legacy:") }
@@ -172,6 +175,7 @@ private fun ControllerDrawing(selected: InputControl, modifier: Modifier, onPick
view.aspect = view.width.toFloat() / view.height
view.elements = OnScreenLayout.editorElements(context, layout, view.width, view.height).filter { it.id.startsWith("legacy:") }
}
view.onResize = { _, _ -> place() }
view.selected = "legacy:${selected.id}"
if (view.elements.isEmpty()) view.post { place() }
})
@@ -274,15 +274,22 @@ private fun InputSettingsContent(onBack: () -> Unit, onChanged: () -> Unit, embe
library.desktop == profileId -> "desktop"
else -> "none"
}
val builtIn = profileId == InputProfile.GAME || profileId == InputProfile.DESKTOP
fun applyDefault(l: InputLibrary, pick: String) =
l.copy(steam = if (pick == "game" || pick == "both") profileId else if (l.steam == profileId) InputProfile.GAME else l.steam,
desktop = if (pick == "desktop" || pick == "both") profileId else if (l.desktop == profileId) InputProfile.DESKTOP else l.desktop)
fun usesIn(l: InputLibrary) = when {
l.steam == profileId && l.desktop == profileId -> "both"
l.steam == profileId -> "game"
l.desktop == profileId -> "desktop"
else -> "none"
}
// A built-in profile is the fallback for its own mode, so it can't give that mode up.
val defaults = listOf("game" to stringResource(R.string.input_game_mode), "desktop" to stringResource(R.string.input_desktop_mode),
"both" to stringResource(R.string.flow_both_modes), "none" to stringResource(R.string.flow_no_mode))
.filter { (pick, _) -> pick == uses || usesIn(applyDefault(library, pick)) == pick }
SettingsGroup(stringResource(R.string.flow_default_for)) {
ChoiceRow(host, "profile-default", stringResource(R.string.flow_default_for), null, listOfNotNull(
"game" to stringResource(R.string.input_game_mode), "desktop" to stringResource(R.string.input_desktop_mode),
"both" to stringResource(R.string.flow_both_modes), if (builtIn) null else "none" to stringResource(R.string.flow_no_mode)), uses) { pick ->
update { l ->
l.copy(steam = if (pick == "game" || pick == "both") profileId else if (l.steam == profileId) InputProfile.GAME else l.steam,
desktop = if (pick == "desktop" || pick == "both") profileId else if (l.desktop == profileId) InputProfile.DESKTOP else l.desktop)
}
ChoiceRow(host, "profile-default", stringResource(R.string.flow_default_for), null, defaults, uses) { pick ->
update { applyDefault(it, pick) }
}
}
SettingsGroup(stringResource(R.string.input_profile_controls)) {
@@ -467,6 +467,8 @@ private fun DockedElementPanel(draft: SurfaceDraft, element: InputSurfaceElement
LaunchedEffect(actionDraft.action) {
if (actionDraft.action.validAs(control, element.takeUnless { clicking }, clicking)) draft.assign(element.id, actionDraft.action, clicking)
}
// Undo, or any other change to the saved action, shows here too.
LaunchedEffect(current) { if (actionDraft.action != current) actionDraft.action = current }
BoxWithConstraints(Modifier.fillMaxSize()) {
Surface(Modifier.align(if (onRight) Alignment.CenterEnd else Alignment.CenterStart).padding(8.dp)
.width(minOf(380.dp, maxWidth * .48f)).fillMaxHeight().testTag("input-editor-panel"),
@@ -132,10 +132,11 @@ internal class InputSurfaceEditorView(context: Context) : FrameLayout(context) {
val sy = grid * width / height.coerceAtLeast(1)
fun round(value: Float, step: Float) = (Math.round(value / step) * step)
if (corner == 0) return e.copy(x = round(e.x, sx).coerceIn(0f, 1f - e.width), y = round(e.y, sy).coerceIn(0f, 1f - e.height))
val right = if (corner and 2 != 0) round(e.x + e.width, sx).coerceIn(e.x + .03f, 1f) else e.x + e.width
val bottom = if (corner and 8 != 0) round(e.y + e.height, sy).coerceIn(e.y + .03f, 1f) else e.y + e.height
val left = if (corner and 1 != 0) round(e.x, sx).coerceIn(0f, right - .03f) else e.x
val top = if (corner and 4 != 0) round(e.y, sy).coerceIn(0f, bottom - .03f) else e.y
fun Float.within(low: Float, high: Float) = coerceIn(minOf(low, high), maxOf(low, high))
val right = if (corner and 2 != 0) round(e.x + e.width, sx).within(e.x + .03f, 1f) else e.x + e.width
val bottom = if (corner and 8 != 0) round(e.y + e.height, sy).within(e.y + .03f, 1f) else e.y + e.height
val left = if (corner and 1 != 0) round(e.x, sx).within(0f, right - .03f) else e.x
val top = if (corner and 4 != 0) round(e.y, sy).within(0f, bottom - .03f) else e.y
return e.copy(x = left, y = top, width = right - left, height = bottom - top).bounded()
}
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">عناصر التحكم</string>
<string name="flow_default_profile">الافتراضي (%1$s)</string>
<string name="flow_game_changes">%1$s: تم تغيير %2$d</string>
<string name="flow_game_changes">تغييرات %1$s: %2$d</string>
<string name="flow_save_for">حفظ التغييرات لـ</string>
<string name="flow_save_for_hint">تغييرات اللعبة الواحدة تُضاف فوق ملفها الشخصي.</string>
<string name="flow_all_games">كل الألعاب</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">الافتراضي لـ</string>
<string name="flow_both_modes">كلا الوضعين</string>
<string name="flow_no_mode">لا شيء</string>
<string name="flow_used_games">مثبّت في %1$d ألعاب</string>
<string name="flow_used_games">الألعاب المثبِّتة له: %1$d</string>
<string name="flow_mine">الخاصة بي</string>
<string name="flow_community">المجتمع</string>
<string name="flow_community_hint">تخطيطات شاركها لاعبو Winlator. ترسل أزرارها مفاتيح لوحة المفاتيح والماوس.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Controles</string>
<string name="flow_default_profile">Predeterminado (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d cambiados</string>
<string name="flow_game_changes">Cambios para %1$s: %2$d</string>
<string name="flow_save_for">Guardar cambios para</string>
<string name="flow_save_for_hint">Los cambios de un juego se aplican sobre su perfil.</string>
<string name="flow_all_games">Todos los juegos</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Predeterminado para</string>
<string name="flow_both_modes">Ambos modos</string>
<string name="flow_no_mode">Ninguno</string>
<string name="flow_used_games">Fijado por %1$d juegos</string>
<string name="flow_used_games">Juegos que lo fijan: %1$d</string>
<string name="flow_mine">Míos</string>
<string name="flow_community">Comunidad</string>
<string name="flow_community_hint">Diseños compartidos por jugadores de Winlator. Sus botones envían teclas de teclado y mouse.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Управление</string>
<string name="flow_default_profile">По подразбиране (%1$s)</string>
<string name="flow_game_changes">%1$s: променени %2$d</string>
<string name="flow_game_changes">Промени за %1$s: %2$d</string>
<string name="flow_save_for">Запазване на промените за</string>
<string name="flow_save_for_hint">Промените за една игра се добавят върху профила ѝ.</string>
<string name="flow_all_games">Всички игри</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">По подразбиране за</string>
<string name="flow_both_modes">И двата режима</string>
<string name="flow_no_mode">Нито един</string>
<string name="flow_used_games">Закачен от %1$d игри</string>
<string name="flow_used_games">Игри, които го закачат: %1$d</string>
<string name="flow_mine">Мои</string>
<string name="flow_community">Общност</string>
<string name="flow_community_hint">Подредби, споделени от играчи на Winlator. Бутоните им изпращат клавиши от клавиатура и мишка.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Ovládání</string>
<string name="flow_default_profile">Výchozí (%1$s)</string>
<string name="flow_game_changes">%1$s: změněno %2$d</string>
<string name="flow_game_changes">Změny pro %1$s: %2$d</string>
<string name="flow_save_for">Ukládat změny pro</string>
<string name="flow_save_for_hint">Změny pro jednu hru se přidávají k jejímu profilu.</string>
<string name="flow_all_games">Všechny hry</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Výchozí pro</string>
<string name="flow_both_modes">Oba režimy</string>
<string name="flow_no_mode">Žádný</string>
<string name="flow_used_games">Připnuto hrami: %1$d</string>
<string name="flow_used_games">Hry, které ho připnuly: %1$d</string>
<string name="flow_mine">Moje</string>
<string name="flow_community">Komunita</string>
<string name="flow_community_hint">Rozložení sdílená hráči Winlatoru. Jejich tlačítka posílají klávesy klávesnice a myši.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Styring</string>
<string name="flow_default_profile">Standard (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d ændret</string>
<string name="flow_game_changes">Ændringer for %1$s: %2$d</string>
<string name="flow_save_for">Gem ændringer for</string>
<string name="flow_save_for_hint">Ændringer for ét spil lægges oven på dets profil.</string>
<string name="flow_all_games">Alle spil</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Standard for</string>
<string name="flow_both_modes">Begge tilstande</string>
<string name="flow_no_mode">Ingen</string>
<string name="flow_used_games">Fastgjort af %1$d spil</string>
<string name="flow_used_games">Spil, der har fastgjort den: %1$d</string>
<string name="flow_mine">Mine</string>
<string name="flow_community">Fællesskab</string>
<string name="flow_community_hint">Layouts delt af Winlator-spillere. Deres knapper sender tastatur- og musetaster.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Steuerung</string>
<string name="flow_default_profile">Standard (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d geändert</string>
<string name="flow_game_changes">Änderungen für %1$s: %2$d</string>
<string name="flow_save_for">Änderungen speichern für</string>
<string name="flow_save_for_hint">Änderungen für ein Spiel liegen über seinem Profil.</string>
<string name="flow_all_games">Alle Spiele</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Standard für</string>
<string name="flow_both_modes">Beide Modi</string>
<string name="flow_no_mode">Keiner</string>
<string name="flow_used_games">Von %1$d Spielen festgelegt</string>
<string name="flow_used_games">Festlegende Spiele: %1$d</string>
<string name="flow_mine">Meine</string>
<string name="flow_community">Community</string>
<string name="flow_community_hint">Von Winlator-Spielern geteilte Layouts. Ihre Tasten senden Tastatur- und Maustasten.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Χειριστήρια</string>
<string name="flow_default_profile">Προεπιλογή (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d αλλαγές</string>
<string name="flow_game_changes">Αλλαγές για %1$s: %2$d</string>
<string name="flow_save_for">Αποθήκευση αλλαγών για</string>
<string name="flow_save_for_hint">Οι αλλαγές για ένα παιχνίδι μπαίνουν πάνω από το προφίλ του.</string>
<string name="flow_all_games">Όλα τα παιχνίδια</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Προεπιλογή για</string>
<string name="flow_both_modes">Και τις δύο λειτουργίες</string>
<string name="flow_no_mode">Καμία</string>
<string name="flow_used_games">Καρφιτσωμένο από %1$d παιχνίδια</string>
<string name="flow_used_games">Παιχνίδια που το καρφιτσώνουν: %1$d</string>
<string name="flow_mine">Δικές μου</string>
<string name="flow_community">Κοινότητα</string>
<string name="flow_community_hint">Διατάξεις που μοιράστηκαν παίκτες του Winlator. Τα κουμπιά τους στέλνουν πλήκτρα πληκτρολογίου και ποντικιού.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Controles</string>
<string name="flow_default_profile">Predeterminado (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d cambiados</string>
<string name="flow_game_changes">Cambios para %1$s: %2$d</string>
<string name="flow_save_for">Guardar cambios para</string>
<string name="flow_save_for_hint">Los cambios de un juego se aplican sobre su perfil.</string>
<string name="flow_all_games">Todos los juegos</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Predeterminado para</string>
<string name="flow_both_modes">Ambos modos</string>
<string name="flow_no_mode">Ninguno</string>
<string name="flow_used_games">Fijado por %1$d juegos</string>
<string name="flow_used_games">Juegos que lo fijan: %1$d</string>
<string name="flow_mine">Míos</string>
<string name="flow_community">Comunidad</string>
<string name="flow_community_hint">Diseños compartidos por jugadores de Winlator. Sus botones envían teclas de teclado y ratón.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Ohjaimet</string>
<string name="flow_default_profile">Oletus (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d muutettu</string>
<string name="flow_game_changes">Muutokset (%1$s): %2$d</string>
<string name="flow_save_for">Tallenna muutokset</string>
<string name="flow_save_for_hint">Yhden pelin muutokset lisätään sen profiilin päälle.</string>
<string name="flow_all_games">Kaikki pelit</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Oletus tilalle</string>
<string name="flow_both_modes">Molemmat tilat</string>
<string name="flow_no_mode">Ei mikään</string>
<string name="flow_used_games">Kiinnittänyt %1$d peliä</string>
<string name="flow_used_games">Sen kiinnittäneet pelit: %1$d</string>
<string name="flow_mine">Omat</string>
<string name="flow_community">Yhteisö</string>
<string name="flow_community_hint">Winlator-pelaajien jakamat asettelut. Niiden painikkeet lähettävät näppäimistön ja hiiren painalluksia.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Commandes</string>
<string name="flow_default_profile">Par défaut (%1$s)</string>
<string name="flow_game_changes">%1$s : %2$d modifiés</string>
<string name="flow_game_changes">Modifications pour %1$s : %2$d</string>
<string name="flow_save_for">Enregistrer les changements pour</string>
<string name="flow_save_for_hint">Les changements pour un jeu s\'ajoutent à son profil.</string>
<string name="flow_all_games">Tous les jeux</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Par défaut pour</string>
<string name="flow_both_modes">Les deux modes</string>
<string name="flow_no_mode">Aucun</string>
<string name="flow_used_games">Épinglé par %1$d jeux</string>
<string name="flow_used_games">Jeux qui l’épinglent : %1$d</string>
<string name="flow_mine">Les miennes</string>
<string name="flow_community">Communauté</string>
<string name="flow_community_hint">Dispositions partagées par des joueurs de Winlator. Leurs boutons envoient des touches de clavier et de souris.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">कंट्रोल</string>
<string name="flow_default_profile">डिफ़ॉल्ट (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d बदले गए</string>
<string name="flow_game_changes">%1$s के बदलाव: %2$d</string>
<string name="flow_save_for">बदलाव इसके लिए सहेजें</string>
<string name="flow_save_for_hint">किसी एक गेम के बदलाव उसकी प्रोफ़ाइल के ऊपर लागू होते हैं।</string>
<string name="flow_all_games">सभी गेम</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">इसके लिए डिफ़ॉल्ट</string>
<string name="flow_both_modes">दोनों मोड</string>
<string name="flow_no_mode">कोई नहीं</string>
<string name="flow_used_games">%1$d गेम में पिन</string>
<string name="flow_used_games">पिन करने वाले गेम: %1$d</string>
<string name="flow_mine">मेरे</string>
<string name="flow_community">कम्युनिटी</string>
<string name="flow_community_hint">Winlator खिलाड़ियों के साझा किए लेआउट। इनके बटन कीबोर्ड और माउस कुंजियाँ भेजते हैं।</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Irányítás</string>
<string name="flow_default_profile">Alapértelmezett (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d módosítva</string>
<string name="flow_game_changes">Módosítások (%1$s): %2$d</string>
<string name="flow_save_for">Változások mentése ehhez:</string>
<string name="flow_save_for_hint">Egy játék változásai a profilja fölé kerülnek.</string>
<string name="flow_all_games">Összes játék</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Alapértelmezett ehhez</string>
<string name="flow_both_modes">Mindkét mód</string>
<string name="flow_no_mode">Egyik sem</string>
<string name="flow_used_games">%1$d játék rögzítette</string>
<string name="flow_used_games">Rögzítő játékok: %1$d</string>
<string name="flow_mine">Sajátok</string>
<string name="flow_community">Közösség</string>
<string name="flow_community_hint">Winlator-játékosok által megosztott elrendezések. A gombjaik billentyűzet- és egérgombokat küldenek.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Kontrol</string>
<string name="flow_default_profile">Default (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d diubah</string>
<string name="flow_game_changes">Perubahan untuk %1$s: %2$d</string>
<string name="flow_save_for">Simpan perubahan untuk</string>
<string name="flow_save_for_hint">Perubahan untuk satu game ditumpuk di atas profilnya.</string>
<string name="flow_all_games">Semua game</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Default untuk</string>
<string name="flow_both_modes">Kedua mode</string>
<string name="flow_no_mode">Tidak ada</string>
<string name="flow_used_games">Disematkan oleh %1$d game</string>
<string name="flow_used_games">Game yang menyematkannya: %1$d</string>
<string name="flow_mine">Milik saya</string>
<string name="flow_community">Komunitas</string>
<string name="flow_community_hint">Tata letak yang dibagikan pemain Winlator. Tombolnya mengirim tombol keyboard dan mouse.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Controlli</string>
<string name="flow_default_profile">Predefinito (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d modificati</string>
<string name="flow_game_changes">Modifiche per %1$s: %2$d</string>
<string name="flow_save_for">Salva le modifiche per</string>
<string name="flow_save_for_hint">Le modifiche per un gioco si aggiungono al suo profilo.</string>
<string name="flow_all_games">Tutti i giochi</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Predefinito per</string>
<string name="flow_both_modes">Entrambe le modalità</string>
<string name="flow_no_mode">Nessuna</string>
<string name="flow_used_games">Fissato da %1$d giochi</string>
<string name="flow_used_games">Giochi che lo fissano: %1$d</string>
<string name="flow_mine">Miei</string>
<string name="flow_community">Community</string>
<string name="flow_community_hint">Layout condivisi dai giocatori di Winlator. I loro pulsanti inviano tasti di tastiera e mouse.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">操作</string>
<string name="flow_default_profile">デフォルト (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d 件変更</string>
<string name="flow_game_changes">%1$s の変更: %2$d</string>
<string name="flow_save_for">変更の保存先</string>
<string name="flow_save_for_hint">ゲームごとの変更はそのプロファイルの上に重ねて適用されます。</string>
<string name="flow_all_games">すべてのゲーム</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">デフォルトにするモード</string>
<string name="flow_both_modes">両方のモード</string>
<string name="flow_no_mode">なし</string>
<string name="flow_used_games">%1$d 本のゲームで固定</string>
<string name="flow_used_games">固定しているゲーム: %1$d</string>
<string name="flow_mine">自分</string>
<string name="flow_community">コミュニティ</string>
<string name="flow_community_hint">Winlator プレイヤーが共有したレイアウトです。ボタンはキーボードとマウスのキーを送ります。</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">컨트롤</string>
<string name="flow_default_profile">기본값 (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d개 변경됨</string>
<string name="flow_game_changes">%1$s 변경 사항: %2$d</string>
<string name="flow_save_for">변경 사항 저장 대상</string>
<string name="flow_save_for_hint">한 게임의 변경 사항은 해당 프로필 위에 적용됩니다.</string>
<string name="flow_all_games">모든 게임</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">기본값 모드</string>
<string name="flow_both_modes">두 모드 모두</string>
<string name="flow_no_mode">없음</string>
<string name="flow_used_games">게임 %1$d개에 고정됨</string>
<string name="flow_used_games">고정한 게임: %1$d</string>
<string name="flow_mine">내 레이아웃</string>
<string name="flow_community">커뮤니티</string>
<string name="flow_community_hint">Winlator 플레이어들이 공유한 레이아웃입니다. 버튼은 키보드와 마우스 키를 보냅니다.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Kawalan</string>
<string name="flow_default_profile">Lalai (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d diubah</string>
<string name="flow_game_changes">Perubahan untuk %1$s: %2$d</string>
<string name="flow_save_for">Simpan perubahan untuk</string>
<string name="flow_save_for_hint">Perubahan untuk satu permainan ditambah di atas profilnya.</string>
<string name="flow_all_games">Semua permainan</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Lalai untuk</string>
<string name="flow_both_modes">Kedua-dua mod</string>
<string name="flow_no_mode">Tiada</string>
<string name="flow_used_games">Dipin oleh %1$d permainan</string>
<string name="flow_used_games">Permainan yang memin: %1$d</string>
<string name="flow_mine">Saya</string>
<string name="flow_community">Komuniti</string>
<string name="flow_community_hint">Susun atur yang dikongsi pemain Winlator. Butangnya menghantar kekunci papan kekunci dan tetikus.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Kontroller</string>
<string name="flow_default_profile">Standard (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d endret</string>
<string name="flow_game_changes">Endringer for %1$s: %2$d</string>
<string name="flow_save_for">Lagre endringer for</string>
<string name="flow_save_for_hint">Endringer for ett spill legges oppå profilen til spillet.</string>
<string name="flow_all_games">Alle spill</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Standard for</string>
<string name="flow_both_modes">Begge moduser</string>
<string name="flow_no_mode">Ingen</string>
<string name="flow_used_games">Festet av %1$d spill</string>
<string name="flow_used_games">Spill som har festet den: %1$d</string>
<string name="flow_mine">Mine</string>
<string name="flow_community">Fellesskap</string>
<string name="flow_community_hint">Oppsett delt av Winlator-spillere. Knappene sender tastatur- og musetaster.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Besturing</string>
<string name="flow_default_profile">Standaard (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d gewijzigd</string>
<string name="flow_game_changes">Wijzigingen voor %1$s: %2$d</string>
<string name="flow_save_for">Wijzigingen opslaan voor</string>
<string name="flow_save_for_hint">Wijzigingen voor één game komen bovenop zijn profiel.</string>
<string name="flow_all_games">Alle games</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Standaard voor</string>
<string name="flow_both_modes">Beide modi</string>
<string name="flow_no_mode">Geen</string>
<string name="flow_used_games">Vastgezet door %1$d games</string>
<string name="flow_used_games">Games die hem vastzetten: %1$d</string>
<string name="flow_mine">Van mij</string>
<string name="flow_community">Community</string>
<string name="flow_community_hint">Indelingen gedeeld door Winlator-spelers. Hun knoppen sturen toetsenbord- en muistoetsen.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Sterowanie</string>
<string name="flow_default_profile">Domyślny (%1$s)</string>
<string name="flow_game_changes">%1$s: zmieniono %2$d</string>
<string name="flow_game_changes">Zmiany dla %1$s: %2$d</string>
<string name="flow_save_for">Zapisuj zmiany dla</string>
<string name="flow_save_for_hint">Zmiany dla jednej gry nakładają się na jej profil.</string>
<string name="flow_all_games">Wszystkich gier</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Domyślny dla</string>
<string name="flow_both_modes">Obu trybów</string>
<string name="flow_no_mode">Żadnego</string>
<string name="flow_used_games">Przypięty przez gry: %1$d</string>
<string name="flow_used_games">Gry, które go przypięły: %1$d</string>
<string name="flow_mine">Moje</string>
<string name="flow_community">Społeczność</string>
<string name="flow_community_hint">Układy udostępnione przez graczy Winlatora. Ich przyciski wysyłają klawisze klawiatury i myszy.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Controlos</string>
<string name="flow_default_profile">Predefinido (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d alterados</string>
<string name="flow_game_changes">Alterações em %1$s: %2$d</string>
<string name="flow_save_for">Guardar alterações para</string>
<string name="flow_save_for_hint">As alterações de um jogo ficam por cima do respetivo perfil.</string>
<string name="flow_all_games">Todos os jogos</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Predefinido para</string>
<string name="flow_both_modes">Ambos os modos</string>
<string name="flow_no_mode">Nenhum</string>
<string name="flow_used_games">Fixado por %1$d jogos</string>
<string name="flow_used_games">Jogos que o fixam: %1$d</string>
<string name="flow_mine">Os meus</string>
<string name="flow_community">Comunidade</string>
<string name="flow_community_hint">Disposições partilhadas por jogadores do Winlator. Os botões enviam teclas de teclado e rato.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Controles</string>
<string name="flow_default_profile">Padrão (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d alterados</string>
<string name="flow_game_changes">Alterações em %1$s: %2$d</string>
<string name="flow_save_for">Salvar alterações para</string>
<string name="flow_save_for_hint">As alterações de um jogo ficam por cima do perfil dele.</string>
<string name="flow_all_games">Todos os jogos</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Padrão para</string>
<string name="flow_both_modes">Ambos os modos</string>
<string name="flow_no_mode">Nenhum</string>
<string name="flow_used_games">Fixado por %1$d jogos</string>
<string name="flow_used_games">Jogos que o fixam: %1$d</string>
<string name="flow_mine">Meus</string>
<string name="flow_community">Comunidade</string>
<string name="flow_community_hint">Layouts compartilhados por jogadores do Winlator. Os botões enviam teclas de teclado e mouse.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Comenzi</string>
<string name="flow_default_profile">Implicit (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d modificate</string>
<string name="flow_game_changes">Modificări pentru %1$s: %2$d</string>
<string name="flow_save_for">Salvează modificările pentru</string>
<string name="flow_save_for_hint">Modificările pentru un joc se adaugă peste profilul lui.</string>
<string name="flow_all_games">Toate jocurile</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Implicit pentru</string>
<string name="flow_both_modes">Ambele moduri</string>
<string name="flow_no_mode">Niciunul</string>
<string name="flow_used_games">Fixat de %1$d jocuri</string>
<string name="flow_used_games">Jocuri care îl fixează: %1$d</string>
<string name="flow_mine">Ale mele</string>
<string name="flow_community">Comunitate</string>
<string name="flow_community_hint">Aranjamente partajate de jucătorii Winlator. Butoanele lor trimit taste de tastatură și mouse.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Управление</string>
<string name="flow_default_profile">По умолчанию (%1$s)</string>
<string name="flow_game_changes">%1$s: изменено %2$d</string>
<string name="flow_game_changes">Изменения для %1$s: %2$d</string>
<string name="flow_save_for">Сохранять изменения для</string>
<string name="flow_save_for_hint">Изменения для одной игры накладываются на её профиль.</string>
<string name="flow_all_games">Всех игр</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">По умолчанию для</string>
<string name="flow_both_modes">Обоих режимов</string>
<string name="flow_no_mode">Ни для какого</string>
<string name="flow_used_games">Закреплён в играх: %1$d</string>
<string name="flow_used_games">Игр, где он закреплён: %1$d</string>
<string name="flow_mine">Мои</string>
<string name="flow_community">Сообщество</string>
<string name="flow_community_hint">Раскладки от игроков Winlator. Их кнопки отправляют клавиши клавиатуры и мыши.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Kontroller</string>
<string name="flow_default_profile">Standard (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d ändrade</string>
<string name="flow_game_changes">Ändringar för %1$s: %2$d</string>
<string name="flow_save_for">Spara ändringar för</string>
<string name="flow_save_for_hint">Ändringar för ett spel läggs ovanpå dess profil.</string>
<string name="flow_all_games">Alla spel</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Standard för</string>
<string name="flow_both_modes">Båda lägena</string>
<string name="flow_no_mode">Inget</string>
<string name="flow_used_games">Fäst av %1$d spel</string>
<string name="flow_used_games">Spel som fäst den: %1$d</string>
<string name="flow_mine">Mina</string>
<string name="flow_community">Gemenskap</string>
<string name="flow_community_hint">Layouter som Winlator-spelare delat. Deras knappar skickar tangentbords- och mustangenter.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">การควบคุม</string>
<string name="flow_default_profile">ค่าเริ่มต้น (%1$s)</string>
<string name="flow_game_changes">%1$s: เปลี่ยน %2$d รายการ</string>
<string name="flow_game_changes">การเปลี่ยนแปลงของ %1$s: %2$d</string>
<string name="flow_save_for">บันทึกการเปลี่ยนแปลงสำหรับ</string>
<string name="flow_save_for_hint">การเปลี่ยนแปลงของเกมหนึ่งจะซ้อนทับโปรไฟล์ของเกมนั้น</string>
<string name="flow_all_games">ทุกเกม</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">ค่าเริ่มต้นสำหรับ</string>
<string name="flow_both_modes">ทั้งสองโหมด</string>
<string name="flow_no_mode">ไม่มี</string>
<string name="flow_used_games">ปักหมุดโดย %1$d เกม</string>
<string name="flow_used_games">เกมที่ปักหมุด: %1$d</string>
<string name="flow_mine">ของฉัน</string>
<string name="flow_community">ชุมชน</string>
<string name="flow_community_hint">เลย์เอาต์ที่ผู้เล่น Winlator แชร์ไว้ ปุ่มจะส่งปุ่มคีย์บอร์ดและเมาส์</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Kontroller</string>
<string name="flow_default_profile">Varsayılan (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d değişti</string>
<string name="flow_game_changes">%1$s için değişiklik: %2$d</string>
<string name="flow_save_for">Değişiklikleri kaydet:</string>
<string name="flow_save_for_hint">Bir oyunun değişiklikleri profilinin üstüne eklenir.</string>
<string name="flow_all_games">Tüm oyunlar</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Varsayılan olduğu mod</string>
<string name="flow_both_modes">İki mod da</string>
<string name="flow_no_mode">Hiçbiri</string>
<string name="flow_used_games">%1$d oyun sabitledi</string>
<string name="flow_used_games">Sabitleyen oyunlar: %1$d</string>
<string name="flow_mine">Benimkiler</string>
<string name="flow_community">Topluluk</string>
<string name="flow_community_hint">Winlator oyuncularının paylaştığı düzenler. Düğmeleri klavye ve fare tuşları gönderir.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Керування</string>
<string name="flow_default_profile">Типовий (%1$s)</string>
<string name="flow_game_changes">%1$s: змінено %2$d</string>
<string name="flow_game_changes">Зміни для %1$s: %2$d</string>
<string name="flow_save_for">Зберігати зміни для</string>
<string name="flow_save_for_hint">Зміни для однієї гри накладаються на її профіль.</string>
<string name="flow_all_games">Усіх ігор</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Типовий для</string>
<string name="flow_both_modes">Обох режимів</string>
<string name="flow_no_mode">Жодного</string>
<string name="flow_used_games">Закріплено в іграх: %1$d</string>
<string name="flow_used_games">Ігор, де його закріплено: %1$d</string>
<string name="flow_mine">Мої</string>
<string name="flow_community">Спільнота</string>
<string name="flow_community_hint">Розташування від гравців Winlator. Їхні кнопки надсилають клавіші клавіатури та миші.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Điều khiển</string>
<string name="flow_default_profile">Mặc định (%1$s)</string>
<string name="flow_game_changes">%1$s: đã đổi %2$d</string>
<string name="flow_game_changes">Thay đổi cho %1$s: %2$d</string>
<string name="flow_save_for">Lưu thay đổi cho</string>
<string name="flow_save_for_hint">Thay đổi cho một trò chơi được đặt chồng lên hồ sơ của nó.</string>
<string name="flow_all_games">Mọi trò chơi</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">Mặc định cho</string>
<string name="flow_both_modes">Cả hai chế độ</string>
<string name="flow_no_mode">Không</string>
<string name="flow_used_games">Được %1$d trò chơi ghim</string>
<string name="flow_used_games">Trò chơi ghim: %1$d</string>
<string name="flow_mine">Của tôi</string>
<string name="flow_community">Cộng đồng</string>
<string name="flow_community_hint">Bố cục do người chơi Winlator chia sẻ. Các nút gửi phím bàn phím và chuột.</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">控制</string>
<string name="flow_default_profile">默认(%1$s)</string>
<string name="flow_game_changes">%1$s:已更改 %2$d 项</string>
<string name="flow_game_changes">%1$s 的更改:%2$d</string>
<string name="flow_save_for">更改保存到</string>
<string name="flow_save_for_hint">单个游戏的更改叠加在其配置文件之上。</string>
<string name="flow_all_games">所有游戏</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">默认用于</string>
<string name="flow_both_modes">两种模式</string>
<string name="flow_no_mode">无</string>
<string name="flow_used_games">已被 %1$d 个游戏固定</string>
<string name="flow_used_games">固定它的游戏:%1$d</string>
<string name="flow_mine">我的</string>
<string name="flow_community">社区</string>
<string name="flow_community_hint">Winlator 玩家分享的布局。它们的按钮发送键盘和鼠标按键。</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">控制</string>
<string name="flow_default_profile">預設(%1$s)</string>
<string name="flow_game_changes">%1$s:已變更 %2$d 項</string>
<string name="flow_game_changes">%1$s 的變更:%2$d</string>
<string name="flow_save_for">變更儲存至</string>
<string name="flow_save_for_hint">單一遊戲的變更會疊加在其設定檔之上。</string>
<string name="flow_all_games">所有遊戲</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">預設用於</string>
<string name="flow_both_modes">兩種模式</string>
<string name="flow_no_mode">無</string>
<string name="flow_used_games">已被 %1$d 個遊戲固定</string>
<string name="flow_used_games">固定它的遊戲:%1$d</string>
<string name="flow_mine">我的</string>
<string name="flow_community">社群</string>
<string name="flow_community_hint">Winlator 玩家分享的佈局。其按鈕會傳送鍵盤及滑鼠按鍵。</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">控制</string>
<string name="flow_default_profile">預設(%1$s)</string>
<string name="flow_game_changes">%1$s:已變更 %2$d 項</string>
<string name="flow_game_changes">%1$s 的變更:%2$d</string>
<string name="flow_save_for">變更儲存至</string>
<string name="flow_save_for_hint">單一遊戲的變更會疊加在其設定檔之上。</string>
<string name="flow_all_games">所有遊戲</string>
@@ -30,7 +30,7 @@
<string name="flow_default_for">預設用於</string>
<string name="flow_both_modes">兩種模式</string>
<string name="flow_no_mode">無</string>
<string name="flow_used_games">已被 %1$d 個遊戲固定</string>
<string name="flow_used_games">固定它的遊戲:%1$d</string>
<string name="flow_mine">我的</string>
<string name="flow_community">社群</string>
<string name="flow_community_hint">Winlator 玩家分享的版面配置。其按鈕會傳送鍵盤和滑鼠按鍵。</string>
@@ -2,7 +2,7 @@
<resources>
<string name="flow_controls">Controls</string>
<string name="flow_default_profile">Default (%1$s)</string>
<string name="flow_game_changes">%1$s: %2$d changed</string>
<string name="flow_game_changes">Changes for %1$s: %2$d</string>
<string name="flow_save_for">Save changes for</string>
<string name="flow_save_for_hint">Changes for one game sit on top of its profile.</string>
<string name="flow_all_games">All games</string>
@@ -31,7 +31,7 @@
<string name="flow_default_for">Default for</string>
<string name="flow_both_modes">Both modes</string>
<string name="flow_no_mode">Neither</string>
<string name="flow_used_games">Pinned by %1$d games</string>
<string name="flow_used_games">Games pinning it: %1$d</string>
<string name="flow_mine">Mine</string>
<string name="flow_community">Community</string>
<string name="flow_community_hint">Layouts shared by Winlator players. Their buttons send keyboard and mouse keys.</string>
@@ -87,6 +87,26 @@ class InputLibraryGamesTest {
assertTrue(cleared.games.getValue("620").parts.isEmpty())
}
@Test fun changesAreCountedAgainstTheGamesPinnedProfile() {
val base = library().duplicateProfile(InputProfile.GAME, "Racing", "racing")
val racing = base.profile("racing").binding(InputRole.PHYSICAL)
val pinned = base.withPreset(base.preset(racing).let { it.copy(controls = it.controls + (InputControl.A to InputAction.Keys(listOf(18)))) })
.withGameProfile("620", "Portal 2", "racing")
val forked = pinned.withGamePart(false, "620", "Portal 2", InputRole.PHYSICAL)
assertEquals(0, forked.gameChanges(false, "620"))
val own = forked.activePart(false, InputRole.PHYSICAL, "620").bindings
val native = forked.withPreset(forked.preset(own).let { it.copy(controls = it.controls + (InputControl.A to InputAction.Native())) })
assertEquals(1, native.gameChanges(false, "620"))
}
@Test fun hidingAQuickButtonInAGamesLayoutCountsAsAChange() {
val forked = library().withGamePart(false, "620", "Portal 2", InputRole.PRIMARY)
val layout = forked.activeLayout(false, InputRole.PRIMARY, "620")!!
if (!layout.editable) return
val hidden = forked.withLayout(layout.withQuickButton(InputCommand.KEYBOARD, false))
assertEquals(1, hidden.gameChanges(false, "620", InputRole.PRIMARY))
}
@Test fun aGamesCopiesCantBeDeletedFromUnderIt() {
val forked = library().withGamePart(false, "620", "Portal 2", InputRole.PHYSICAL)
val id = forked.activePart(false, InputRole.PHYSICAL, "620").bindings
@@ -75,6 +75,17 @@ class WinlatorLayoutsTest {
WinlatorLayouts.fileUrl("Dark Souls 2.icp"))
}
@Test fun multiKeyButtonsBecomeChordsAndOldModifierNamesWork() {
val raw = """{"cursorSpeed":1,"elements":[
{"type":"BUTTON","shape":"RECT","bindings":["KEY_CTRL_L","KEY_C","NONE","NONE"],"scale":1,"x":0.5,"y":0.5,"text":""},
{"type":"BUTTON","shape":"CIRCLE","bindings":["KEY_SHIFT","NONE","NONE","NONE"],"scale":1,"x":0.2,"y":0.5,"text":""},
{"type":"BUTTON","shape":"CIRCLE","bindings":["KEY_ALT","KEY_CTRL","NONE","NONE"],"scale":1,"x":0.8,"y":0.5,"text":""}]}"""
val (layout, bindings) = WinlatorLayouts.import(raw, "x", InputLayoutScreen.MAIN, 1920, 1080)!!
val actions = layout.elements.map { bindings.elements.getValue(it.id) }
assertEquals(listOf(InputAction.Keys(listOf(29, 46)), InputAction.Keys(listOf(42)), InputAction.Keys(listOf(56, 29))), actions)
assertEquals("Ctrl l+C", layout.elements[0].name)
}
@Test fun rejectsAFileWithNothingToPlace() {
assertNull(WinlatorLayouts.import("""{"cursorSpeed":1,"elements":[]}""", "x", InputLayoutScreen.MAIN, 100, 100))
}
@@ -30,7 +30,6 @@ import com.droiddeck.launcher.input.InputProfile
import com.droiddeck.launcher.input.InputRole
import com.droiddeck.launcher.input.InputElementKind
import com.droiddeck.launcher.input.InputSurfaceElement
import com.droiddeck.launcher.input.InputSurfaceStyle
import com.droiddeck.launcher.input.InputControl
import org.junit.Assert.assertSame
import org.junit.Assert.assertNotNull
@@ -271,10 +270,10 @@ class SessionSecondScreenTest {
shown.value = true
ReflectionHelpers.setField(panel, "imeSeen", true)
val controls = descendants(panel.window!!.decorView).filterIsInstance<InputSurfaceView>().single()
val element = InputSurfaceElement(InputControl.A, .3f, .2f, .2f, .2f, "updated")
val element = InputSurfaceElement(InputControl.A, .3f, .2f, .2f, .2f, "updated", opacity = .35f)
InputLibraries.update(activity) { library ->
val layout = library.activeLayout(false, InputRole.SECONDARY)!!
library.withLayout(layout.copy(elements = listOf(element), style = InputSurfaceStyle(opacity = 35)))
library.withLayout(layout.copy(elements = listOf(element)))
}
panel.refreshControls()
assertSame(controls, descendants(panel.window!!.decorView).filterIsInstance<InputSurfaceView>().single())