diff options
author | 2008-03-07 14:34:04 +0000 | |
---|---|---|
committer | 2008-03-07 14:34:04 +0000 | |
commit | d0870c69364b189efb6f59b5ac0bee9eed361cda (patch) | |
tree | 664d1166562c1f2ecc3b544f5cc1205f046a7f13 /src/emu/cheat.c | |
parent | d0f5196025a62f1c20db6a59818118ff4a2f5c08 (diff) |
Moves 'refresh' from public to internal video state and renames it to 'frame_period'
Changes all drivers that previously accessed 'refresh' to use video_screen_get_frame_period()
Diffstat (limited to 'src/emu/cheat.c')
-rw-r--r-- | src/emu/cheat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emu/cheat.c b/src/emu/cheat.c index ebcdcc466b5..7c0c19ebdc4 100644 --- a/src/emu/cheat.c +++ b/src/emu/cheat.c @@ -1500,7 +1500,7 @@ void cheat_init(running_machine *machine) InitStringTable(); periodic_timer = timer_alloc(cheat_periodic, NULL); - timer_adjust_periodic(periodic_timer, attotime_make(0, machine->screen[0].refresh), 0, attotime_make(0, machine->screen[0].refresh)); + timer_adjust_periodic(periodic_timer, video_screen_get_frame_period(0), 0, video_screen_get_frame_period(0)); add_exit_callback(machine, cheat_exit); } @@ -11403,7 +11403,7 @@ static void cheat_periodicAction(running_machine *machine, CheatAction * action) /* ----- keep if one shot + restore prevous value + delay !=0 ----- */ cheat_periodicOperation(action); - if(action->frameTimer >= (parameter * ATTOSECONDS_TO_HZ(machine->screen[0].refresh))) + if(action->frameTimer >= (parameter * ATTOSECONDS_TO_HZ(video_screen_get_frame_period(0).attoseconds))) { action->frameTimer = 0; @@ -11415,7 +11415,7 @@ static void cheat_periodicAction(running_machine *machine, CheatAction * action) else { /* ----- otherwise, delay ----- */ - if(action->frameTimer >= (parameter * ATTOSECONDS_TO_HZ(machine->screen[0].refresh))) + if(action->frameTimer >= (parameter * ATTOSECONDS_TO_HZ(video_screen_get_frame_period(0).attoseconds))) { action->frameTimer = 0; @@ -11454,7 +11454,7 @@ static void cheat_periodicAction(running_machine *machine, CheatAction * action) if(currentValue != action->lastValue) { - action->frameTimer = parameter * ATTOSECONDS_TO_HZ(machine->screen[0].refresh); + action->frameTimer = parameter * ATTOSECONDS_TO_HZ(video_screen_get_frame_period(0).attoseconds); action->flags |= kActionFlag_WasModified; } |