mirror of
https://github.com/holub/mame
synced 2025-05-21 13:18:56 +03:00
Fix for MT03621: Hitting F6 without -cheat trigger causes crash
now cheat toggling has no effect if there is no OPTION_CHEAT among mame_options().
This commit is contained in:
parent
ca5e8764f2
commit
49b2d89ab2
@ -1238,8 +1238,8 @@ static UINT32 handler_ingame(running_machine *machine, UINT32 state)
|
|||||||
mame_pause(machine, !mame_is_paused(machine));
|
mame_pause(machine, !mame_is_paused(machine));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* handle a toggle cheats request */
|
/* handle a toggle cheats request, but only if cheats are on */
|
||||||
if (ui_input_pressed(machine, IPT_UI_TOGGLE_CHEAT))
|
if (options_get_bool(mame_options(), OPTION_CHEAT) && ui_input_pressed(machine, IPT_UI_TOGGLE_CHEAT))
|
||||||
cheat_set_global_enable(machine, !cheat_get_global_enable(machine));
|
cheat_set_global_enable(machine, !cheat_get_global_enable(machine));
|
||||||
|
|
||||||
/* toggle movie recording */
|
/* toggle movie recording */
|
||||||
|
@ -1221,8 +1221,8 @@ static void ui_menu_handle_keys(ui_menu *menu, UINT32 flags)
|
|||||||
if (!ignorepause && exclusive_input_pressed(menu, IPT_UI_PAUSE, 0))
|
if (!ignorepause && exclusive_input_pressed(menu, IPT_UI_PAUSE, 0))
|
||||||
mame_pause(menu->machine, !mame_is_paused(menu->machine));
|
mame_pause(menu->machine, !mame_is_paused(menu->machine));
|
||||||
|
|
||||||
/* handle a toggle cheats request */
|
/* handle a toggle cheats request, but only if cheats are on */
|
||||||
if (ui_input_pressed_repeat(menu->machine, IPT_UI_TOGGLE_CHEAT, 0))
|
if (options_get_bool(mame_options(), OPTION_CHEAT) && ui_input_pressed_repeat(menu->machine, IPT_UI_TOGGLE_CHEAT, 0))
|
||||||
cheat_set_global_enable(menu->machine, !cheat_get_global_enable(menu->machine));
|
cheat_set_global_enable(menu->machine, !cheat_get_global_enable(menu->machine));
|
||||||
|
|
||||||
/* see if any other UI keys are pressed */
|
/* see if any other UI keys are pressed */
|
||||||
|
Loading…
Reference in New Issue
Block a user