Skip to content

Commit 5b74709

Browse files
feat: configure button mapping right in Grout closes #200
1 parent 2e0a396 commit 5b74709

17 files changed

Lines changed: 252 additions & 20 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ site/
4545

4646
/save_slots.json
4747
/create-conflict
48+
/input_mapping.json

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@
3636
3737
---
3838

39-
## Features at a Glance
40-
41-
- Download games wirelessly from your RomM instance
42-
- Download box art
43-
- Download and verify BIOS files
44-
- Save Sync
45-
- Platform directory mapping configurable on device
46-
47-
---
48-
4939
## Documentation
5040

5141
Full documentation is available at **[grout.romm.app](https://grout.romm.app)**.

app/setup.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ func setup() SetupResult {
5858
}
5959

6060
func setupInputMapping(currentCFW cfw.CFW) {
61-
gaba.SetLogFilename("grout.log")
62-
63-
if environment.IsDevelopment() {
64-
return
65-
}
66-
6761
cwd, err := os.Getwd()
6862
if err != nil {
6963
return
@@ -75,6 +69,10 @@ func setupInputMapping(currentCFW cfw.CFW) {
7569
return
7670
}
7771

72+
if environment.IsDevelopment() {
73+
return
74+
}
75+
7876
var mappingBytes []byte
7977
var mappingErr error
8078
switch currentCFW {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.25.6
44

55
require (
66
github.com/BrandonKowalski/certifiable v1.3.0
7-
github.com/BrandonKowalski/gabagool/v2 v2.15.0
7+
github.com/BrandonKowalski/gabagool/v2 v2.17.0
88
github.com/beevik/etree v1.6.0
99
github.com/bodgit/sevenzip v1.6.1
1010
github.com/nicksnyder/go-i18n/v2 v2.6.1

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ github.com/BrandonKowalski/gabagool/v2 v2.14.0 h1:e6uc9MPY16ig7SWDrmzYneU6cN4XoI
88
github.com/BrandonKowalski/gabagool/v2 v2.14.0/go.mod h1:Iq/YFTz7+w8O78IE21kOkHbg3a4ZD2mjcd0S/jVhI94=
99
github.com/BrandonKowalski/gabagool/v2 v2.15.0 h1:zjsxiWFnE6z24KtZMCZGJI1CQFhSMZrVnSFx7YuStwc=
1010
github.com/BrandonKowalski/gabagool/v2 v2.15.0/go.mod h1:Iq/YFTz7+w8O78IE21kOkHbg3a4ZD2mjcd0S/jVhI94=
11+
github.com/BrandonKowalski/gabagool/v2 v2.16.0 h1:TdXwKyP5v8JBesp941JfKmvo0IxGC5A3xPfuZwFrIcg=
12+
github.com/BrandonKowalski/gabagool/v2 v2.16.0/go.mod h1:Iq/YFTz7+w8O78IE21kOkHbg3a4ZD2mjcd0S/jVhI94=
13+
github.com/BrandonKowalski/gabagool/v2 v2.17.0 h1:OaGnrGXpKUR3r2xcmsSUChZbfWgCRNZAzeXTBJuYw3A=
14+
github.com/BrandonKowalski/gabagool/v2 v2.17.0/go.mod h1:Iq/YFTz7+w8O78IE21kOkHbg3a4ZD2mjcd0S/jVhI94=
1115
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
1216
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
1317
github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ=

resources/locales/active.de.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,30 @@ other = "Benutzer"
454454
hash = "sha1-2da600bf9404843107a9531694f654e5662959e0"
455455
other = "Version"
456456

457+
[input_capture_complete]
458+
hash = "sha1-810a04f2906b40e820edc03bc4674572c244cbfc"
459+
other = "Eingabe-Mapping abgeschlossen!"
460+
461+
[input_capture_instruction]
462+
hash = "sha1-75b83210644feefbdf43ba55f8f2d6cb060f3cbc"
463+
other = "Taste gedrückt halten, wenn aufgefordert."
464+
465+
[input_capture_released_early]
466+
hash = "sha1-3d9191b67ab8025c99014b2917effed8d9445abc"
467+
other = "Zu früh losgelassen!"
468+
469+
[input_capture_title]
470+
hash = "sha1-b167509bc65ae322b3838b115fbbc0b914337a30"
471+
other = "Grout Eingabe-Mapping"
472+
473+
[input_mapping_reset]
474+
hash = "sha1-e6c1aa60c76e7878543a9bb32e6f49e48366aaa9"
475+
other = "Eingabe-Mapping zurückgesetzt.\nGrout muss neu starten."
476+
477+
[input_mapping_saved]
478+
hash = "sha1-d9a25e2dd90b3d04a5faab8a8ff4ac7303fea893"
479+
other = "Eingabe-Mapping gespeichert.\nGrout muss neu starten."
480+
457481
[log_level_debug]
458482
hash = "sha1-bd604d99e75e45d38bc7ac8fc714cde0097d901f"
459483
other = "Debug"
@@ -870,10 +894,18 @@ other = "Log-Level"
870894
hash = "sha1-1c4cc869d6c5c6fe0a49516c220a1f67ae5acc12"
871895
other = "Cache neu aufbauen"
872896

897+
[settings_input_mapping]
898+
hash = "sha1-e6440268de38ea4ad967835f250b6784af4abc80"
899+
other = "Eingabe-Mapping"
900+
873901
[settings_release_channel]
874902
hash = "sha1-ddb05bbae80d35657c69e0ff93b186f6c7c92ce2"
875903
other = "Veröffentlichungskanal"
876904

905+
[settings_reset_input_mapping]
906+
hash = "sha1-183dd9fdc86acd17acfa7540ffd59e7db45bf6ec"
907+
other = "Eingabe-Mapping zurücksetzen"
908+
877909
[settings_save_sync]
878910
hash = "sha1-3caa02c76bc2b97f136e706433de562fd060f48d"
879911
other = "Spielstand-Synchronisierung"

resources/locales/active.en.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ games_list_no_games = "No games found for {{.Name}}"
100100
games_list_no_results = "No results found for \"{{.Query}}\""
101101
games_list_search_prefix = "[Search: \"{{.Query}}\"]"
102102
help_exit_text = "Press any button to close help"
103+
input_capture_complete = "Input Mapping Complete!"
104+
input_capture_instruction = "Press and hold each button when prompted."
105+
input_capture_released_early = "Released too early!"
106+
input_capture_title = "Grout Input Mapping"
107+
input_mapping_reset = "Input mapping reset.\nGrout needs to restart to apply changes."
108+
input_mapping_saved = "Input mapping saved.\nGrout needs to restart to apply changes."
103109
info_build_date = "Build Date"
104110
info_cfw = "CFW"
105111
info_commit = "Commit"
@@ -215,8 +221,10 @@ settings_language_portuguese = "Português"
215221
settings_language_russian = "Русский"
216222
settings_language_spanish = "Español"
217223
settings_log_level = "Log Level"
224+
settings_input_mapping = "Input Mapping"
218225
settings_rebuild_cache = "Rebuild Cache"
219226
settings_release_channel = "Release Channel"
227+
settings_reset_input_mapping = "Reset Input Mapping"
220228
settings_save_sync = "Save Sync"
221229
settings_server_address = "Server Address"
222230
settings_show_collections = "Collections"

resources/locales/active.es.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,30 @@ other = "Usuario"
454454
hash = "sha1-2da600bf9404843107a9531694f654e5662959e0"
455455
other = "Versión"
456456

457+
[input_capture_complete]
458+
hash = "sha1-810a04f2906b40e820edc03bc4674572c244cbfc"
459+
other = "¡Mapeo de entrada completo!"
460+
461+
[input_capture_instruction]
462+
hash = "sha1-75b83210644feefbdf43ba55f8f2d6cb060f3cbc"
463+
other = "Mantén pulsado cada botón cuando se indique."
464+
465+
[input_capture_released_early]
466+
hash = "sha1-3d9191b67ab8025c99014b2917effed8d9445abc"
467+
other = "¡Soltado demasiado pronto!"
468+
469+
[input_capture_title]
470+
hash = "sha1-b167509bc65ae322b3838b115fbbc0b914337a30"
471+
other = "Mapeo de entrada de Grout"
472+
473+
[input_mapping_reset]
474+
hash = "sha1-e6c1aa60c76e7878543a9bb32e6f49e48366aaa9"
475+
other = "Mapeo restablecido.\nGrout necesita reiniciarse."
476+
477+
[input_mapping_saved]
478+
hash = "sha1-d9a25e2dd90b3d04a5faab8a8ff4ac7303fea893"
479+
other = "Mapeo guardado.\nGrout necesita reiniciarse."
480+
457481
[log_level_debug]
458482
hash = "sha1-bd604d99e75e45d38bc7ac8fc714cde0097d901f"
459483
other = "Depuración"
@@ -870,10 +894,18 @@ other = "Nivel de Registro"
870894
hash = "sha1-1c4cc869d6c5c6fe0a49516c220a1f67ae5acc12"
871895
other = "Reconstruir Caché"
872896

897+
[settings_input_mapping]
898+
hash = "sha1-e6440268de38ea4ad967835f250b6784af4abc80"
899+
other = "Mapeo de entrada"
900+
873901
[settings_release_channel]
874902
hash = "sha1-ddb05bbae80d35657c69e0ff93b186f6c7c92ce2"
875903
other = "Canal de lanzamiento"
876904

905+
[settings_reset_input_mapping]
906+
hash = "sha1-183dd9fdc86acd17acfa7540ffd59e7db45bf6ec"
907+
other = "Restablecer mapeo de entrada"
908+
877909
[settings_save_sync]
878910
hash = "sha1-3caa02c76bc2b97f136e706433de562fd060f48d"
879911
other = "Sincronización de Guardados"

resources/locales/active.fr.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,30 @@ other = "Utilisateur"
454454
hash = "sha1-2da600bf9404843107a9531694f654e5662959e0"
455455
other = "Version"
456456

457+
[input_capture_complete]
458+
hash = "sha1-810a04f2906b40e820edc03bc4674572c244cbfc"
459+
other = "Mappage des entrées terminé !"
460+
461+
[input_capture_instruction]
462+
hash = "sha1-75b83210644feefbdf43ba55f8f2d6cb060f3cbc"
463+
other = "Maintenez chaque bouton appuyé quand demandé."
464+
465+
[input_capture_released_early]
466+
hash = "sha1-3d9191b67ab8025c99014b2917effed8d9445abc"
467+
other = "Relâché trop tôt !"
468+
469+
[input_capture_title]
470+
hash = "sha1-b167509bc65ae322b3838b115fbbc0b914337a30"
471+
other = "Mappage des entrées Grout"
472+
473+
[input_mapping_reset]
474+
hash = "sha1-e6c1aa60c76e7878543a9bb32e6f49e48366aaa9"
475+
other = "Mappage réinitialisé.\nGrout doit redémarrer."
476+
477+
[input_mapping_saved]
478+
hash = "sha1-d9a25e2dd90b3d04a5faab8a8ff4ac7303fea893"
479+
other = "Mappage sauvegardé.\nGrout doit redémarrer."
480+
457481
[log_level_debug]
458482
hash = "sha1-bd604d99e75e45d38bc7ac8fc714cde0097d901f"
459483
other = "Debug"
@@ -870,10 +894,18 @@ other = "Niveau de log"
870894
hash = "sha1-1c4cc869d6c5c6fe0a49516c220a1f67ae5acc12"
871895
other = "Reconstruire le Cache"
872896

897+
[settings_input_mapping]
898+
hash = "sha1-e6440268de38ea4ad967835f250b6784af4abc80"
899+
other = "Mappage des entrées"
900+
873901
[settings_release_channel]
874902
hash = "sha1-ddb05bbae80d35657c69e0ff93b186f6c7c92ce2"
875903
other = "Canal de diffusion"
876904

905+
[settings_reset_input_mapping]
906+
hash = "sha1-183dd9fdc86acd17acfa7540ffd59e7db45bf6ec"
907+
other = "Réinitialiser le mappage"
908+
877909
[settings_save_sync]
878910
hash = "sha1-3caa02c76bc2b97f136e706433de562fd060f48d"
879911
other = "Synchronisation des Sauvegardes"

resources/locales/active.it.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,30 @@ other = "Utente"
454454
hash = "sha1-2da600bf9404843107a9531694f654e5662959e0"
455455
other = "Versione"
456456

457+
[input_capture_complete]
458+
hash = "sha1-810a04f2906b40e820edc03bc4674572c244cbfc"
459+
other = "Mappatura input completata!"
460+
461+
[input_capture_instruction]
462+
hash = "sha1-75b83210644feefbdf43ba55f8f2d6cb060f3cbc"
463+
other = "Tieni premuto ogni tasto quando richiesto."
464+
465+
[input_capture_released_early]
466+
hash = "sha1-3d9191b67ab8025c99014b2917effed8d9445abc"
467+
other = "Rilasciato troppo presto!"
468+
469+
[input_capture_title]
470+
hash = "sha1-b167509bc65ae322b3838b115fbbc0b914337a30"
471+
other = "Mappatura input Grout"
472+
473+
[input_mapping_reset]
474+
hash = "sha1-e6c1aa60c76e7878543a9bb32e6f49e48366aaa9"
475+
other = "Mappatura ripristinata.\nGrout deve riavviarsi."
476+
477+
[input_mapping_saved]
478+
hash = "sha1-d9a25e2dd90b3d04a5faab8a8ff4ac7303fea893"
479+
other = "Mappatura salvata.\nGrout deve riavviarsi."
480+
457481
[log_level_debug]
458482
hash = "sha1-bd604d99e75e45d38bc7ac8fc714cde0097d901f"
459483
other = "Debug"
@@ -870,10 +894,18 @@ other = "Livello Log"
870894
hash = "sha1-1c4cc869d6c5c6fe0a49516c220a1f67ae5acc12"
871895
other = "Ricostruisci Cache"
872896

897+
[settings_input_mapping]
898+
hash = "sha1-e6440268de38ea4ad967835f250b6784af4abc80"
899+
other = "Mappatura input"
900+
873901
[settings_release_channel]
874902
hash = "sha1-ddb05bbae80d35657c69e0ff93b186f6c7c92ce2"
875903
other = "Canale di rilascio"
876904

905+
[settings_reset_input_mapping]
906+
hash = "sha1-183dd9fdc86acd17acfa7540ffd59e7db45bf6ec"
907+
other = "Ripristina mappatura input"
908+
877909
[settings_save_sync]
878910
hash = "sha1-3caa02c76bc2b97f136e706433de562fd060f48d"
879911
other = "Sincronizzazione Salvataggi"

0 commit comments

Comments
 (0)