summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author 0kmg <9137159+0kmg@users.noreply.github.com>2021-09-30 12:22:43 -0800
committer GitHub <noreply@github.com>2021-09-30 16:22:43 -0400
commit4395d59216d7225e206963deae11cfe8fc229f52 (patch)
tree3be1fa04fd0f82b71acc24ceb98a2f43f4ca2d9a
parent360d3a5950f0649270822e2db1ea25028eabd18b (diff)
emu/video.cpp: Set file names via -snapname when exiting in -seconds_… (#8633)
-rw-r--r--docs/source/commandline/commandline-all.rst4
-rw-r--r--src/emu/video.cpp2
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);