summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/emu/video.c14
-rw-r--r--src/emu/video.h2
2 files changed, 15 insertions, 1 deletions
diff --git a/src/emu/video.c b/src/emu/video.c
index 523554279e7..4744ba8128f 100644
--- a/src/emu/video.c
+++ b/src/emu/video.c
@@ -46,6 +46,7 @@
#include "aviio.h"
#include "crsshair.h"
#include "rendersw.c"
+#include "output.h"
#include "snap.lh"
@@ -86,6 +87,14 @@ const UINT8 video_manager::s_skiptable[FRAMESKIP_LEVELS][FRAMESKIP_LEVELS] =
// VIDEO MANAGER
//**************************************************************************
+static void video_notifier_callback(const char *outname, INT32 value, void *param)
+{
+ video_manager *vm = (video_manager *)param;
+
+ vm->set_output_changed();
+}
+
+
//-------------------------------------------------
// video_manager - constructor
//-------------------------------------------------
@@ -93,6 +102,7 @@ const UINT8 video_manager::s_skiptable[FRAMESKIP_LEVELS][FRAMESKIP_LEVELS] =
video_manager::video_manager(running_machine &machine)
: m_machine(machine),
m_screenless_frame_timer(NULL),
+ m_output_changed(false),
m_throttle_last_ticks(0),
m_throttle_realtime(attotime::zero),
m_throttle_emutime(attotime::zero),
@@ -175,6 +185,7 @@ video_manager::video_manager(running_machine &machine)
{
m_screenless_frame_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(video_manager::screenless_update_callback), this));
m_screenless_frame_timer->adjust(screen_device::DEFAULT_FRAME_PERIOD, 0, screen_device::DEFAULT_FRAME_PERIOD);
+ output_set_notifier(NULL, video_notifier_callback, this);
}
}
@@ -647,7 +658,8 @@ bool video_manager::finish_screen_updates()
screen->update_partial(screen->visible_area().max_y);
// now add the quads for all the screens
- bool anything_changed = false;
+ bool anything_changed = m_output_changed;
+ m_output_changed = false;
for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next())
if (screen->update_quads())
anything_changed = true;
diff --git a/src/emu/video.h b/src/emu/video.h
index ca37d63db65..15337e1eb07 100644
--- a/src/emu/video.h
+++ b/src/emu/video.h
@@ -99,6 +99,7 @@ public:
void set_frameskip(int frameskip);
void set_throttled(bool throttled = true) { m_throttle = throttled; }
void set_fastforward(bool ffwd = true) { m_fastforward = ffwd; }
+ void set_output_changed() { m_output_changed = true; }
// render a frame
void frame_update(bool debug = false);
@@ -146,6 +147,7 @@ private:
// screenless systems
emu_timer * m_screenless_frame_timer; // timer to signal VBLANK start
+ bool m_output_changed; // did an output element change?
// throttling calculations
osd_ticks_t m_throttle_last_ticks; // osd_ticks the last call to throttle