diff options
author | 2010-06-04 18:37:22 +0000 | |
---|---|---|
committer | 2010-06-04 18:37:22 +0000 | |
commit | 7d09e1a3d892114e386ef9f14025f628e4d027f3 (patch) | |
tree | 98295f183a9d7915bbc26991a336a51992105544 /src/emu/ui.c | |
parent | 365576b5781ce7467d7cb5a9cea37092867bdc5e (diff) |
small change required by MESS: TAB should not turn on the MAME Internal UI if the user has enabled newui. No effect in MAME and, hence, no whatsnew mention needed.
While at it, I 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.
Diffstat (limited to 'src/emu/ui.c')
-rw-r--r-- | src/emu/ui.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/emu/ui.c b/src/emu/ui.c index 3974e767990..0e12e721389 100644 --- a/src/emu/ui.c +++ b/src/emu/ui.c @@ -1179,6 +1179,21 @@ static UINT32 handler_messagebox_anykey(running_machine *machine, render_contain /*------------------------------------------------- + ui_use_newui - determines if "newui" is in use +-------------------------------------------------*/ + +int ui_use_newui( void ) +{ + #ifdef MESS + #if (defined(WIN32) || defined(_MSC_VER)) && !defined(SDLMAME_WIN32) + if (options_get_bool(mame_options(), "newui")) + return TRUE; + #endif + #endif + return FALSE; +} + +/*------------------------------------------------- process_natural_keyboard - processes any natural keyboard input -------------------------------------------------*/ @@ -1336,12 +1351,12 @@ static UINT32 handler_ingame(running_machine *machine, render_container *contain if (ui_disabled) return ui_disabled; - /* if the user pressed ESC, stop the emulation */ - if (ui_input_pressed(machine, IPT_UI_CANCEL)) + /* if the user pressed ESC, stop the emulation (except in MESS with newui, where ESC toggles the menubar) */ + if (ui_input_pressed(machine, IPT_UI_CANCEL) && !ui_use_newui()) mame_schedule_exit(machine); /* turn on menus if requested */ - if (ui_input_pressed(machine, IPT_UI_CONFIGURE)) + if (ui_input_pressed(machine, IPT_UI_CONFIGURE) && !ui_use_newui()) return ui_set_handler(ui_menu_ui_handler, 0); /* if the on-screen display isn't up and the user has toggled it, turn it on */ |