trunk/src/emu/video.c
| r19108 | r19109 | |
| 46 | 46 | #include "aviio.h" |
| 47 | 47 | #include "crsshair.h" |
| 48 | 48 | #include "rendersw.c" |
| 49 | #include "output.h" |
| 49 | 50 | |
| 50 | 51 | #include "snap.lh" |
| 51 | 52 | |
| r19108 | r19109 | |
| 86 | 87 | // VIDEO MANAGER |
| 87 | 88 | //************************************************************************** |
| 88 | 89 | |
| 90 | static void video_notifier_callback(const char *outname, INT32 value, void *param) |
| 91 | { |
| 92 | video_manager *vm = (video_manager *)param; |
| 93 | |
| 94 | vm->set_output_changed(); |
| 95 | } |
| 96 | |
| 97 | |
| 89 | 98 | //------------------------------------------------- |
| 90 | 99 | // video_manager - constructor |
| 91 | 100 | //------------------------------------------------- |
| r19108 | r19109 | |
| 93 | 102 | video_manager::video_manager(running_machine &machine) |
| 94 | 103 | : m_machine(machine), |
| 95 | 104 | m_screenless_frame_timer(NULL), |
| 105 | m_output_changed(false), |
| 96 | 106 | m_throttle_last_ticks(0), |
| 97 | 107 | m_throttle_realtime(attotime::zero), |
| 98 | 108 | m_throttle_emutime(attotime::zero), |
| r19108 | r19109 | |
| 175 | 185 | { |
| 176 | 186 | m_screenless_frame_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(video_manager::screenless_update_callback), this)); |
| 177 | 187 | m_screenless_frame_timer->adjust(screen_device::DEFAULT_FRAME_PERIOD, 0, screen_device::DEFAULT_FRAME_PERIOD); |
| 188 | output_set_notifier(NULL, video_notifier_callback, this); |
| 178 | 189 | } |
| 179 | 190 | } |
| 180 | 191 | |
| r19108 | r19109 | |
| 647 | 658 | screen->update_partial(screen->visible_area().max_y); |
| 648 | 659 | |
| 649 | 660 | // now add the quads for all the screens |
| 650 | | bool anything_changed = false; |
| 661 | bool anything_changed = m_output_changed; |
| 662 | m_output_changed = false; |
| 651 | 663 | for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next()) |
| 652 | 664 | if (screen->update_quads()) |
| 653 | 665 | anything_changed = true; |
trunk/src/emu/video.h
| r19108 | r19109 | |
| 99 | 99 | void set_frameskip(int frameskip); |
| 100 | 100 | void set_throttled(bool throttled = true) { m_throttle = throttled; } |
| 101 | 101 | void set_fastforward(bool ffwd = true) { m_fastforward = ffwd; } |
| 102 | void set_output_changed() { m_output_changed = true; } |
| 102 | 103 | |
| 103 | 104 | // render a frame |
| 104 | 105 | void frame_update(bool debug = false); |
| r19108 | r19109 | |
| 146 | 147 | |
| 147 | 148 | // screenless systems |
| 148 | 149 | emu_timer * m_screenless_frame_timer; // timer to signal VBLANK start |
| 150 | bool m_output_changed; // did an output element change? |
| 149 | 151 | |
| 150 | 152 | // throttling calculations |
| 151 | 153 | osd_ticks_t m_throttle_last_ticks; // osd_ticks the last call to throttle |