Previous 199869 Revisions Next

r19109 Thursday 22nd November, 2012 at 19:36:52 UTC by Wilbert Pol
Mark the display for screenless systems as changed whenever an output has changed.  [Wilbert Pol]
[src/emu]video.c video.h

trunk/src/emu/video.c
r19108r19109
4646#include "aviio.h"
4747#include "crsshair.h"
4848#include "rendersw.c"
49#include "output.h"
4950
5051#include "snap.lh"
5152
r19108r19109
8687//  VIDEO MANAGER
8788//**************************************************************************
8889
90static 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
8998//-------------------------------------------------
9099//  video_manager - constructor
91100//-------------------------------------------------
r19108r19109
93102video_manager::video_manager(running_machine &machine)
94103   : m_machine(machine),
95104     m_screenless_frame_timer(NULL),
105     m_output_changed(false),
96106     m_throttle_last_ticks(0),
97107     m_throttle_realtime(attotime::zero),
98108     m_throttle_emutime(attotime::zero),
r19108r19109
175185   {
176186      m_screenless_frame_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(video_manager::screenless_update_callback), this));
177187      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);
178189   }
179190}
180191
r19108r19109
647658      screen->update_partial(screen->visible_area().max_y);
648659
649660   // 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;
651663   for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next())
652664      if (screen->update_quads())
653665         anything_changed = true;
trunk/src/emu/video.h
r19108r19109
9999   void set_frameskip(int frameskip);
100100   void set_throttled(bool throttled = true) { m_throttle = throttled; }
101101   void set_fastforward(bool ffwd = true) { m_fastforward = ffwd; }
102   void set_output_changed() { m_output_changed = true; }
102103
103104   // render a frame
104105   void frame_update(bool debug = false);
r19108r19109
146147
147148   // screenless systems
148149   emu_timer *         m_screenless_frame_timer;   // timer to signal VBLANK start
150   bool            m_output_changed;         // did an output element change?
149151
150152   // throttling calculations
151153   osd_ticks_t         m_throttle_last_ticks;      // osd_ticks the last call to throttle

Previous 199869 Revisions Next


© 1997-2024 The MAME Team