summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2016-04-22 15:56:26 +0200
committer Ivan Vangelista <mesgnet@yahoo.it>2016-04-22 15:56:26 +0200
commit9167349e5e54379054ec042e3d102c3bbae6e521 (patch)
tree5b4751e9febe11e186c167768fdc30b777b0aa86
parentb8969272bd6e827d7c3f0f12623eb0c1d8d06ec5 (diff)
video.cpp: create final snapshot on -str runs even for screenless systems. Fixes MT04965 (nw)
-rw-r--r--src/emu/video.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/emu/video.cpp b/src/emu/video.cpp
index 06c6ee4e7e7..90ffa309ac8 100644
--- a/src/emu/video.cpp
+++ b/src/emu/video.cpp
@@ -1082,15 +1082,12 @@ void video_manager::recompute_speed(const attotime &emutime)
// if we're past the "time-to-execute" requested, signal an exit
if (m_seconds_to_run != 0 && emutime.seconds() >= m_seconds_to_run)
{
- screen_device *screen = machine().first_screen();
- if (screen != nullptr)
- {
- // create a final screenshot
- emu_file file(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- osd_file::error filerr = file.open(machine().basename(), PATH_SEPARATOR "final.png");
- if (filerr == osd_file::error::NONE)
- save_snapshot(screen, file);
- }
+ // create a final screenshot
+ emu_file file(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
+ osd_file::error filerr = file.open(machine().basename(), PATH_SEPARATOR "final.png");
+ if (filerr == osd_file::error::NONE)
+ save_snapshot(nullptr, file);
+
//printf("Scheduled exit at %f\n", emutime.as_double());
// schedule our demise
machine().schedule_exit();