Mark the display for screenless systems as changed whenever an output has changed. [Wilbert Pol]

This commit is contained in:
Wilbert Pol 2012-11-22 19:36:52 +00:00
parent 9046ce0dc5
commit aa278cd3da
2 changed files with 15 additions and 1 deletions

View File

@ -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;

View File

@ -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