mirror of
https://github.com/holub/mame
synced 2025-04-28 19:14:55 +03:00
Made uimodekey default to "auto" and let OSD decide about default key. (no credit)
This commit is contained in:
parent
9621c5bcbc
commit
a347804fe3
@ -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_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)" },
|
{ "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" },
|
{ "natural;nat", "0", OPTION_BOOLEAN, "specifies whether to use a natural keyboard or not" },
|
||||||
#if defined(__APPLE__) && defined(__MACH__)
|
{ "uimodekey;umk", "auto", 0, "specifies the key used to toggle between full and partial UI mode" },
|
||||||
{ "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
|
|
||||||
|
|
||||||
|
|
||||||
/* input autoenable options */
|
/* input autoenable options */
|
||||||
|
@ -1584,6 +1584,7 @@ void osd_customize_input_type_list(input_type_desc *typelist)
|
|||||||
{
|
{
|
||||||
int mameid_code ,ui_code;
|
int mameid_code ,ui_code;
|
||||||
input_type_desc *typedesc;
|
input_type_desc *typedesc;
|
||||||
|
const char* uimode;
|
||||||
|
|
||||||
// loop over the defaults
|
// loop over the defaults
|
||||||
for (typedesc = typelist; typedesc != NULL; typedesc = typedesc->next)
|
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
|
// configurable UI mode switch
|
||||||
case IPT_UI_TOGGLE_UI:
|
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);
|
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);
|
input_seq_set_1(&typedesc->seq[SEQ_TYPE_STANDARD], ui_code);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user