Previous 15994 Revisions Next

r3203 Sunday 7th September, 2008 at 23:40:53 UTC by Firewave
Only enable Keyboard Mode menu when a keyboard is available
[src/emu]uimenu.c

src/emu/uimenu.c
r3202r3203
14311431   int has_configs = FALSE;
14321432   int has_analog = FALSE;
14331433   int has_dips = FALSE;
1434#ifdef MESS
1435   int has_keyboard = FALSE;
1436#endif
14341437
14351438   /* scan the input port array to see what options we need to enable */
14361439   for (port = machine->portconfig; port != NULL; port = port->next)
r3202r3203
14441447            has_categories = TRUE;
14451448         if (input_type_is_analog(field->type))
14461449            has_analog = TRUE;
1450#ifdef MESS
1451         if (field->type == IPT_KEYBOARD)
1452            has_keyboard = TRUE;         
1453#endif
14471454      }
14481455
14491456   /* add input menu items */
r3202r3203
14821489#endif /* HAS_WAVE */
14831490
14841491     /* add keyboard mode menu */
1485   ui_menu_item_append(menu, "Keyboard Mode", NULL, 0, ui_menu_keyboard_mode);
1492     if( has_keyboard && inputx_can_post(machine) )
1493      ui_menu_item_append(menu, "Keyboard Mode", NULL, 0, ui_menu_keyboard_mode);
14861494#endif /* MESS */
14871495
14881496   /* add sliders menu */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team