src/emu/ui.c
| r8234 | r8235 | |
| 122 | 122 | static slider_state *slider_list; |
| 123 | 123 | static slider_state *slider_current; |
| 124 | 124 | |
| 125 | | static int ui_active; |
| 126 | 125 | /* natural keyboard info */ |
| 127 | 126 | static int ui_use_natural_keyboard; |
| 128 | 127 | static UINT8 non_char_keys_down[(ARRAY_LENGTH(non_char_keys) + 7) / 8]; |
| r8234 | r8235 | |
| 255 | 254 | /* reset globals */ |
| 256 | 255 | single_step = FALSE; |
| 257 | 256 | ui_set_handler(handler_messagebox, 0); |
| 258 | | ui_active = 0; |
| 259 | 257 | /* retrieve options */ |
| 260 | 258 | ui_use_natural_keyboard = options_get_bool(mame_options(), OPTION_NATURAL_KEYBOARD); |
| 261 | 259 | |
| r8234 | r8235 | |
| 1299 | 1297 | } |
| 1300 | 1298 | |
| 1301 | 1299 | /* determine if we should disable the rest of the UI */ |
| 1302 | | int ui_disabled = (input_machine_has_keyboard(machine) && !ui_active); |
| 1300 | int ui_disabled = (input_machine_has_keyboard(machine) && !machine->ui_active); |
| 1303 | 1301 | |
| 1304 | 1302 | /* is ScrLk UI toggling applicable here? */ |
| 1305 | 1303 | if (input_machine_has_keyboard(machine)) |
| r8234 | r8235 | |
| 1308 | 1306 | if (ui_input_pressed(machine, IPT_UI_TOGGLE_UI)) |
| 1309 | 1307 | { |
| 1310 | 1308 | /* toggle the UI */ |
| 1311 | | ui_active = !ui_active; |
| 1309 | machine->ui_active = !machine->ui_active; |
| 1312 | 1310 | |
| 1313 | 1311 | /* display a popup indicating the new status */ |
| 1314 | | if (ui_active) |
| 1312 | if (machine->ui_active) |
| 1315 | 1313 | { |
| 1316 | 1314 | ui_popup_time(2, "%s\n%s\n%s\n%s\n%s\n%s\n", |
| 1317 | 1315 | "Keyboard Emulation Status", |