diff options
author | 2010-10-27 05:16:06 +0000 | |
---|---|---|
committer | 2010-10-27 05:16:06 +0000 | |
commit | 354eec3124fc79f572ef517d9022636dac93a558 (patch) | |
tree | 4204c2b6109a4bc49f05fc98e38fd02a8711957d /src/emu/ui.c | |
parent | e56b4c9c02b0b02476226b4ae23beab3f75d27f2 (diff) |
C++-ified the cheat engine.
Diffstat (limited to 'src/emu/ui.c')
-rw-r--r-- | src/emu/ui.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/emu/ui.c b/src/emu/ui.c index 72e07ac432d..19aa346ede6 100644 --- a/src/emu/ui.c +++ b/src/emu/ui.c @@ -385,7 +385,8 @@ void ui_update_and_render(running_machine *machine, render_container *container) } /* render any cheat stuff at the bottom */ - cheat_render_text(machine, container); + if (machine->phase() >= MACHINE_PHASE_RESET) + machine->cheat().render_text(*container); /* call the current UI handler */ assert(ui_handler_callback != NULL); @@ -726,7 +727,7 @@ void ui_draw_text_box(render_container *container, const char *text, int justify float max_width = 2.0f * ((xpos <= 0.5f) ? xpos : 1.0f - xpos) - 2.0f * UI_BOX_LR_BORDER; float target_width = max_width; float target_height = line_height; - float target_x, target_y; + float target_x = 0, target_y = 0; float last_target_height = 0; // limit this iteration to a finite number of passes @@ -1427,7 +1428,7 @@ static UINT32 handler_ingame(running_machine *machine, render_container *contain /* handle a toggle cheats request */ if (ui_input_pressed(machine, IPT_UI_TOGGLE_CHEAT)) - cheat_set_global_enable(machine, !cheat_get_global_enable(machine)); + machine->cheat().set_enable(!machine->cheat().enabled()); /* toggle movie recording */ if (ui_input_pressed(machine, IPT_UI_RECORD_MOVIE)) |