Previous 15994 Revisions Next

r8217 Friday 4th June, 2010 at 18:39:47 UTC by Fabio Priuli
[NEWUI] TAB should not turn on the Old UI if the user has enabled newui. While at it, also associated ESC to Menu bar toggling when in newui (like many other emulators for Windows), given that user would quit MESS with File > Exit in the menu bar.
[src/emu]ui.c ui.h
[src/osd/windows]input.c

src/osd/windows/input.c
r8216r8217
771771            input_seq_set_2(&typedesc->seq[SEQ_TYPE_STANDARD], KEYCODE_LALT, KEYCODE_ENTER);
772772            break;
773773
774         case IPT_OSD_2:
775            if (ui_use_newui())
776            {
777               typedesc->token = "TOGGLE_MENUBAR";
778               typedesc->name = "Toggle Menu Bar";
779               input_seq_set_1(&typedesc->seq[SEQ_TYPE_STANDARD], KEYCODE_ESC);
780            }
781            break;
782
774783#ifdef MESS
775784         case IPT_UI_THROTTLE:
776785            input_seq_set_0(&typedesc->seq[SEQ_TYPE_STANDARD]);
src/emu/ui.c
r8216r8217
11791179
11801180
11811181/*-------------------------------------------------
1182    ui_use_newui - determines if "newui" is in use
1183-------------------------------------------------*/
1184
1185int ui_use_newui( void )
1186{
1187   #ifdef MESS
1188   #if (defined(WIN32) || defined(_MSC_VER)) && !defined(SDLMAME_WIN32)
1189      if (options_get_bool(mame_options(), "newui"))
1190         return TRUE;
1191   #endif
1192   #endif
1193   return FALSE;
1194}
1195
1196/*-------------------------------------------------
11821197    process_natural_keyboard - processes any
11831198    natural keyboard input
11841199-------------------------------------------------*/
r8216r8217
13361351
13371352   if (ui_disabled) return ui_disabled;
13381353
1339   /* if the user pressed ESC, stop the emulation */
1340   if (ui_input_pressed(machine, IPT_UI_CANCEL))
1354   /* if the user pressed ESC, stop the emulation (except in MESS with newui, where ESC toggles the menubar) */
1355   if (ui_input_pressed(machine, IPT_UI_CANCEL) && !ui_use_newui())
13411356      mame_schedule_exit(machine);
13421357
13431358   /* turn on menus if requested */
1344   if (ui_input_pressed(machine, IPT_UI_CONFIGURE))
1359   if (ui_input_pressed(machine, IPT_UI_CONFIGURE) && !ui_use_newui())
13451360      return ui_set_handler(ui_menu_ui_handler, 0);
13461361
13471362   /* if the on-screen display isn't up and the user has toggled it, turn it on */
src/emu/ui.h
r8216r8217
181181/* paste */
182182void ui_paste(running_machine *machine);
183183
184int ui_use_newui(void);
185
184186/* returns whether the natural keyboard is active */
185187int ui_get_use_natural_keyboard(running_machine *machine);
186188

Previous 15994 Revisions Next


© 1998-2018 The MESS Team