Skip to content

Commit f687d45

Browse files
authored
Merge pull request #3676 from cmitu/openmsx-bugfix-2
openmsx: update the RetroPie initialization script
2 parents 27c6530 + 52fab44 commit f687d45

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

scriptmodules/emulators/openmsx/retropie-init.tcl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,14 @@ proc init {} {
55
set config_dir [file normalize "$::env(OPENMSX_USER_DATA)/joystick"]
66

77
# Sanitize rom name
8-
regsub -all {[\?\<\>\\\/:\*\|]} $rom_name "" rom_name
8+
regsub -all {[:><?\"\/\\|*]} $rom_name "" rom_name
99

1010
# Auto-configure the 1st plugged in joystick, but only if present
1111
# openMSX automatically loads the plugged in joysticks in 'autoplug.tcl'
1212
if {![info exists ::joystick1_config]} {
1313
return
1414
}
1515

16-
# Disable the OSD menu box added by osd_menu.tcl
17-
osd destroy main_menu_pop_up_button
18-
1916
if { !($rom_name eq "") } {
2017
if { [ file exists "$config_dir/game/$rom_name.tcl" ] } {
2118
load_config_joystick $rom_name "$config_dir/game/$rom_name.tcl"
@@ -26,7 +23,7 @@ proc init {} {
2623
if { [catch {exec udevadm info --name=/dev/input/js0 | grep -q "ID_INPUT_JOYSTICK=1"}] == 0 } {
2724
set path [exec udevadm info --name=/dev/input/js0 --query=name]
2825
set joy_name [exec cat /sys/class/$path/device/name]
29-
regsub -all {[\?\<\>\\\/:\*\|]} $joy_name "" joy_name$
26+
regsub -all {[:><?\"\/\\|*]} $joy_name "" joy_name
3027
if { [file exists "$config_dir/$joy_name.tcl"] } {
3128
load_config_joystick $joy_name "$config_dir/$joy_name.tcl"
3229
}

0 commit comments

Comments
 (0)