diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c index ef73c371708..adf27712942 100644 --- a/src/emu/emuopts.c +++ b/src/emu/emuopts.c @@ -130,11 +130,7 @@ const options_entry mame_core_options[] = { "joystick_deadzone;joy_deadzone;jdz", "0.3", 0, "center deadzone range for joystick where change is ignored (0.0 center, 1.0 end)" }, { "joystick_saturation;joy_saturation;jsat", "0.85", 0, "end of axis saturation range for joystick where change is ignored (0.0 center, 1.0 end)" }, { "natural;nat", "0", OPTION_BOOLEAN, "specifies whether to use a natural keyboard or not" }, - #if defined(__APPLE__) && defined(__MACH__) - { "uimodekey;umk", "ITEM_ID_INSERT", 0, "specifies the key used to toggle between full and partial UI mode" }, - #else - { "uimodekey;umk", "ITEM_ID_SCRLOCK", 0, "specifies the key used to toggle between full and partial UI mode" }, - #endif + { "uimodekey;umk", "auto", 0, "specifies the key used to toggle between full and partial UI mode" }, /* input autoenable options */ diff --git a/src/osd/sdl/input.c b/src/osd/sdl/input.c index 9a5c829344a..9cfdb3e3375 100644 --- a/src/osd/sdl/input.c +++ b/src/osd/sdl/input.c @@ -1584,6 +1584,7 @@ void osd_customize_input_type_list(input_type_desc *typelist) { int mameid_code ,ui_code; input_type_desc *typedesc; + const char* uimode; // loop over the defaults for (typedesc = typelist; typedesc != NULL; typedesc = typedesc->next) @@ -1592,7 +1593,16 @@ void osd_customize_input_type_list(input_type_desc *typelist) { // configurable UI mode switch case IPT_UI_TOGGLE_UI: - mameid_code = lookup_mame_code((const char *)options_get_string(mame_options(), SDLOPTION_UIMODEKEY)); + uimode = (const char *)options_get_string(mame_options(), SDLOPTION_UIMODEKEY); + if(!strcmp(uimode,"auto")) { + #if defined(__APPLE__) && defined(__MACH__) + mameid_code = lookup_mame_code("ITEM_ID_INSERT"); + #else + mameid_code = lookup_mame_code("ITEM_ID_SCRLOCK"); + #endif + } else { + mameid_code = lookup_mame_code(uimode); + } ui_code = INPUT_CODE(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, mameid_code); input_seq_set_1(&typedesc->seq[SEQ_TYPE_STANDARD], ui_code); break;