src/emu/ui.c
| r8216 | r8217 | |
| 1179 | 1179 | |
| 1180 | 1180 | |
| 1181 | 1181 | /*------------------------------------------------- |
| 1182 | ui_use_newui - determines if "newui" is in use |
| 1183 | -------------------------------------------------*/ |
| 1184 | |
| 1185 | int 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 | /*------------------------------------------------- |
| 1182 | 1197 | process_natural_keyboard - processes any |
| 1183 | 1198 | natural keyboard input |
| 1184 | 1199 | -------------------------------------------------*/ |
| r8216 | r8217 | |
| 1336 | 1351 | |
| 1337 | 1352 | if (ui_disabled) return ui_disabled; |
| 1338 | 1353 | |
| 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()) |
| 1341 | 1356 | mame_schedule_exit(machine); |
| 1342 | 1357 | |
| 1343 | 1358 | /* 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()) |
| 1345 | 1360 | return ui_set_handler(ui_menu_ui_handler, 0); |
| 1346 | 1361 | |
| 1347 | 1362 | /* if the on-screen display isn't up and the user has toggled it, turn it on */ |