summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/video.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/video.cpp')
-rw-r--r--src/emu/video.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/emu/video.cpp b/src/emu/video.cpp
index fa0efb88a89..71bc97d6cef 100644
--- a/src/emu/video.cpp
+++ b/src/emu/video.cpp
@@ -451,7 +451,7 @@ void video_manager::begin_recording_mng(const char *name, uint32_t index, screen
if (filerr == osd_file::error::NONE)
{
// start the capture
- int rate = int(screen->frame_period().as_hz());
+ int rate = int(screen ? screen->frame_period().as_hz() : screen_device::DEFAULT_FRAME_RATE);
png_error pngerr = mng_capture_start(*info.m_mng_file, m_snap_bitmap, rate);
if (pngerr != PNGERR_NONE)
{
@@ -487,7 +487,7 @@ void video_manager::begin_recording_avi(const char *name, uint32_t index, screen
// build up information about this new movie
avi_file::movie_info info;
info.video_format = 0;
- info.video_timescale = 1000 * screen->frame_period().as_hz();
+ info.video_timescale = 1000 * (screen ? screen->frame_period().as_hz() : screen_device::DEFAULT_FRAME_RATE);
info.video_sampletime = 1000;
info.video_numsamples = 0;
info.video_width = m_snap_bitmap.width();
@@ -554,7 +554,14 @@ void video_manager::begin_recording(const char *name, movie_format format)
// create a snapshot bitmap so we know what the target size is
screen_device_iterator iterator = screen_device_iterator(machine().root_device());
screen_device_iterator::auto_iterator iter = iterator.begin();
- const uint32_t count = (uint32_t)iterator.count();
+ uint32_t count = (uint32_t)iterator.count();
+ const bool no_screens(!count);
+
+ if (no_screens)
+ {
+ assert(!m_snap_native);
+ count = 1;
+ }
switch (format)
{