diff options
author | 2010-01-06 16:03:02 +0000 | |
---|---|---|
committer | 2010-01-06 16:03:02 +0000 | |
commit | 49b2d89ab2d259088260d40f64f3b4e0b1ce05f7 (patch) | |
tree | e942f138a7427cf54f2e9c818cd0ee7a78d1f900 /src/emu/ui.c | |
parent | ca5e8764f2e35e649ce6b2571f6544575ceca314 (diff) |
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().
Diffstat (limited to 'src/emu/ui.c')
-rw-r--r-- | src/emu/ui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/ui.c b/src/emu/ui.c index 04daa3c9c21..5787f9ffeb6 100644 --- a/src/emu/ui.c +++ b/src/emu/ui.c @@ -1238,8 +1238,8 @@ static UINT32 handler_ingame(running_machine *machine, UINT32 state) mame_pause(machine, !mame_is_paused(machine)); } - /* handle a toggle cheats request */ - if (ui_input_pressed(machine, IPT_UI_TOGGLE_CHEAT)) + /* handle a toggle cheats request, but only if cheats are on */ + 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)); /* toggle movie recording */ |