Previous 15994 Revisions Next

r7352 Sunday 14th February, 2010 at 14:16:35 UTC by Miodrag Milanović
Made uimodekey default to "auto" and let OSD decide about default key. (no credit)
[src/emu]emuopts.c
[src/osd/sdl]input.c

src/osd/sdl/input.c
r7351r7352
15841584{
15851585   int mameid_code ,ui_code;
15861586   input_type_desc *typedesc;
1587   const char*  uimode;
15871588
15881589   // loop over the defaults
15891590   for (typedesc = typelist; typedesc != NULL; typedesc = typedesc->next)
r7351r7352
15911592      switch (typedesc->type)
15921593      {
15931594         // configurable UI mode switch
1594         case IPT_UI_TOGGLE_UI:
1595            mameid_code = lookup_mame_code((const char *)options_get_string(mame_options(), SDLOPTION_UIMODEKEY));
1595         case IPT_UI_TOGGLE_UI:           
1596            uimode = (const char *)options_get_string(mame_options(), SDLOPTION_UIMODEKEY);
1597            if(!strcmp(uimode,"auto")) {
1598               #if defined(__APPLE__) && defined(__MACH__)
1599               mameid_code = lookup_mame_code("ITEM_ID_INSERT");
1600               #else
1601               mameid_code = lookup_mame_code("ITEM_ID_SCRLOCK");
1602               #endif
1603            } else {
1604               mameid_code = lookup_mame_code(uimode);
1605            }
15961606            ui_code = INPUT_CODE(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, mameid_code);
15971607            input_seq_set_1(&typedesc->seq[SEQ_TYPE_STANDARD], ui_code);
15981608            break;
src/emu/emuopts.c
r7351r7352
130130   { "joystick_deadzone;joy_deadzone;jdz",      "0.3",  0,          "center deadzone range for joystick where change is ignored (0.0 center, 1.0 end)" },
131131   { "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)" },
132132   { "natural;nat",             "0",        OPTION_BOOLEAN,    "specifies whether to use a natural keyboard or not" },
133   #if defined(__APPLE__) && defined(__MACH__)
134   { "uimodekey;umk",              "ITEM_ID_INSERT",  0,           "specifies the key used to toggle between full and partial UI mode" },
135   #else
136   { "uimodekey;umk",              "ITEM_ID_SCRLOCK", 0,           "specifies the key used to toggle between full and partial UI mode" },
137   #endif
133   { "uimodekey;umk",               "auto",       0,               "specifies the key used to toggle between full and partial UI mode" },
138134   
139135
140136   /* input autoenable options */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team