mirror of
https://github.com/holub/mame
synced 2025-07-03 17:08:39 +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
@ -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 we're past the "time-to-execute" requested, signal an exit
|
||||||
if (m_seconds_to_run != 0 && emutime.seconds() >= m_seconds_to_run)
|
if (m_seconds_to_run != 0 && emutime.seconds() >= m_seconds_to_run)
|
||||||
{
|
{
|
||||||
screen_device *screen = machine().first_screen();
|
// create a final screenshot
|
||||||
if (screen != nullptr)
|
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");
|
||||||
// create a final screenshot
|
if (filerr == osd_file::error::NONE)
|
||||||
emu_file file(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
save_snapshot(nullptr, file);
|
||||||
osd_file::error filerr = file.open(machine().basename(), PATH_SEPARATOR "final.png");
|
|
||||||
if (filerr == osd_file::error::NONE)
|
|
||||||
save_snapshot(screen, file);
|
|
||||||
}
|
|
||||||
//printf("Scheduled exit at %f\n", emutime.as_double());
|
//printf("Scheduled exit at %f\n", emutime.as_double());
|
||||||
// schedule our demise
|
// schedule our demise
|
||||||
machine().schedule_exit();
|
machine().schedule_exit();
|
||||||
|
Loading…
Reference in New Issue
Block a user