From 4395d59216d7225e206963deae11cfe8fc229f52 Mon Sep 17 00:00:00 2001 From: 0kmg <9137159+0kmg@users.noreply.github.com> Date: Thu, 30 Sep 2021 12:22:43 -0800 Subject: =?UTF-8?q?emu/video.cpp:=20Set=20file=20names=20via=20-snapname?= =?UTF-8?q?=20when=20exiting=20in=20-seconds=5F=E2=80=A6=20(#8633)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/source/commandline/commandline-all.rst | 4 ++-- src/emu/video.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/commandline/commandline-all.rst b/docs/source/commandline/commandline-all.rst index 5c58c9a345b..aa9cc1dd455 100644 --- a/docs/source/commandline/commandline-all.rst +++ b/docs/source/commandline/commandline-all.rst @@ -1764,8 +1764,8 @@ Core Performance Options benchmarking and automated testing. By combining this with a fixed set of other command line options, you can set up a consistent environment for benchmarking MAME's emulation performance. In addition, upon exit, the - **-str** option will write a screenshot called ``final.png`` to the system's - snapshot directory. + **-str** option will write a screenshot to the system's snapshot directory + with the file name determined by the **-snapname** option. Example: .. code-block:: bash diff --git a/src/emu/video.cpp b/src/emu/video.cpp index 56f877ec8fa..2e63c76e96a 100644 --- a/src/emu/video.cpp +++ b/src/emu/video.cpp @@ -1007,7 +1007,7 @@ void video_manager::recompute_speed(const attotime &emutime) { // create a final screenshot emu_file file(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); - std::error_condition filerr = file.open(machine().basename() + PATH_SEPARATOR "final.png"); + std::error_condition const filerr = open_next(file, "png"); if (!filerr) save_snapshot(nullptr, file); -- cgit v1.2.3