Previous 15994 Revisions Next

r8235 Sunday 6th June, 2010 at 05:59:57 UTC by Fabio Priuli
[NEWUI] Menu bar toggling is now detected only if ui is active (i.e. after you press ScrlLock), like other ui actions like Pause etc. This fixes conflicts with ESC key of the emulated machines.
[src/emu]mame.c mame.h ui.c
[src/osd/windows]video.c

src/osd/windows/video.c
r8234r8235
383383      winwindow_toggle_full_screen();
384384
385385#ifdef MESS
386   // check for toggling menu bar
387   if (ui_input_pressed(machine, IPT_OSD_2))
386   // check for toggling menu bar (only if ui is active)
387   if (ui_input_pressed(machine, IPT_OSD_2) && machine->ui_active)
388388      win_toggle_menubar();
389389#endif
390390}
src/emu/mame.c
r8234r8235
12691269     priority_bitmap(NULL),
12701270     sample_rate(0),
12711271     debug_flags(0),
1272      ui_active(0),
12721273     mame_data(NULL),
12731274     cpuexec_data(NULL),
12741275     timer_data(NULL),
src/emu/mame.h
r8234r8235
259259   /* debugger-related information */
260260   UINT32               debug_flags;      /* the current debug flags */
261261
262   /* UI-related */
263   int                  ui_active;         /* ui active or not (useful for games / systems with keyboard inputs) */
264   
262265   /* generic pointers */
263266   generic_pointers      generic;         /* generic pointers */
264267
src/emu/ui.c
r8234r8235
122122static slider_state *slider_list;
123123static slider_state *slider_current;
124124
125static int ui_active;
126125/* natural keyboard info */
127126static int ui_use_natural_keyboard;
128127static UINT8 non_char_keys_down[(ARRAY_LENGTH(non_char_keys) + 7) / 8];
r8234r8235
255254   /* reset globals */
256255   single_step = FALSE;
257256   ui_set_handler(handler_messagebox, 0);
258   ui_active = 0;
259257   /* retrieve options */
260258   ui_use_natural_keyboard = options_get_bool(mame_options(), OPTION_NATURAL_KEYBOARD);
261259
r8234r8235
12991297   }
13001298
13011299   /* 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);
13031301
13041302   /* is ScrLk UI toggling applicable here? */
13051303   if (input_machine_has_keyboard(machine))
r8234r8235
13081306      if (ui_input_pressed(machine, IPT_UI_TOGGLE_UI))
13091307      {
13101308         /* toggle the UI */
1311         ui_active = !ui_active;
1309         machine->ui_active = !machine->ui_active;
13121310
13131311         /* display a popup indicating the new status */
1314         if (ui_active)
1312         if (machine->ui_active)
13151313         {
13161314            ui_popup_time(2, "%s\n%s\n%s\n%s\n%s\n%s\n",
13171315               "Keyboard Emulation Status",

Previous 15994 Revisions Next


© 1998-2018 The MESS Team