mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
video.cpp: create final snapshot on -str runs even for screenless systems. Fixes MT04965 (nw)
This commit is contained in:
parent
b8969272bd
commit
9167349e5e
@ -1081,16 +1081,13 @@ 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);
|
||||
}
|
||||
save_snapshot(nullptr, file);
|
||||
|
||||
//printf("Scheduled exit at %f\n", emutime.as_double());
|
||||
// schedule our demise
|
||||
machine().schedule_exit();
|
||||
|
Loading…
Reference in New Issue
Block a user