ui.c,ui.h,windows/input.c: [Miodrag Milanovic]

- removed ui_use_new_ui check used by MESS code
- moved ui_mess_handler_ingame call in proper place, so device UI callbacks works again
- removed toggle of menu bar (MESS related)
This commit is contained in:
Miodrag Milanovic 2010-02-16 12:45:38 +00:00
parent 6fcc0f634b
commit 3a4544a651
3 changed files with 4 additions and 32 deletions

View File

@ -1178,22 +1178,6 @@ static UINT32 handler_messagebox_anykey(running_machine *machine, render_contain
}
/*-------------------------------------------------
ui_use_new_ui - determines if the "new ui"
is in use
-------------------------------------------------*/
int ui_use_new_ui(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
@ -1300,10 +1284,10 @@ static UINT32 handler_ingame(running_machine *machine, render_container *contain
}
/* determine if we should disable the rest of the UI */
int ui_disabled = ui_use_new_ui() || (input_machine_has_keyboard(machine) && !ui_active);
int ui_disabled = (input_machine_has_keyboard(machine) && !ui_active);
/* is ScrLk UI toggling applicable here? */
if (!ui_use_new_ui() && input_machine_has_keyboard(machine))
if (input_machine_has_keyboard(machine))
{
/* are we toggling the UI with ScrLk? */
if (ui_input_pressed(machine, IPT_UI_TOGGLE_UI))
@ -1339,7 +1323,6 @@ static UINT32 handler_ingame(running_machine *machine, render_container *contain
if (ui_get_use_natural_keyboard(machine) && (mame_get_phase(machine) == MAME_PHASE_RUNNING))
process_natural_keyboard(machine);
/* MESS-specific UI; provided that the UI is not disabled */
if (!ui_disabled)
{
/* paste command */
@ -1347,12 +1330,12 @@ static UINT32 handler_ingame(running_machine *machine, render_container *contain
ui_paste(machine);
}
if (ui_disabled) return ui_disabled;
#ifdef MESS
ui_mess_handler_ingame(machine);
#endif /* MESS */
if (ui_disabled) return ui_disabled;
/* if the user pressed ESC, stop the emulation */
if (ui_input_pressed(machine, IPT_UI_CANCEL))
mame_schedule_exit(machine);

View File

@ -181,8 +181,6 @@ const slider_state *ui_get_slider_list(void);
/* paste */
void ui_paste(running_machine *machine);
int ui_use_new_ui(void);
/* returns whether the natural keyboard is active */
int ui_get_use_natural_keyboard(running_machine *machine);

View File

@ -771,15 +771,6 @@ void osd_customize_input_type_list(input_type_desc *typelist)
input_seq_set_2(&typedesc->seq[SEQ_TYPE_STANDARD], KEYCODE_LALT, KEYCODE_ENTER);
break;
case IPT_OSD_2:
if (ui_use_new_ui())
{
typedesc->token = "TOGGLE_MENUBAR";
typedesc->name = "Toggle Menubar";
input_seq_set_1 (&typedesc->seq[SEQ_TYPE_STANDARD], KEYCODE_SCRLOCK);
}
break;
case IPT_UI_THROTTLE:
input_seq_set_0(&typedesc->seq[SEQ_TYPE_STANDARD]);
break;