summaryrefslogtreecommitdiffstats
path: root/src/emu/machine.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2022-02-11 23:22:46 -0500
committer AJR <ajrhacker@users.noreply.github.com>2022-02-11 23:22:46 -0500
commit0cb0cfd4c66915b43929d496fb694445fd7ab6ea (patch)
treebf6b5354e06024451554153eb4d60fbc97b47811 /src/emu/machine.cpp
parenta9440352de702cc42c4ac972aeb1e37fe6bd8b2a (diff)
Remove fileio.h from emu.h
Diffstat (limited to 'src/emu/machine.cpp')
-rw-r--r--src/emu/machine.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 633bde66de8..1d8fe872fd1 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -20,6 +20,7 @@
#include "debug/debugvw.h"
#include "debug/debugcpu.h"
#include "dirtc.h"
+#include "fileio.h"
#include "image.h"
#include "network.h"
#include "romload.h"
@@ -590,10 +591,10 @@ void running_machine::schedule_save(std::string &&filename)
// immediate_save - save state.
//-------------------------------------------------
-void running_machine::immediate_save(const char *filename)
+void running_machine::immediate_save(std::string_view filename)
{
// specify the filename to save or load
- set_saveload_filename(filename);
+ set_saveload_filename(std::string(filename));
// set up some parameters for handle_saveload()
m_saveload_schedule = saveload_schedule::SAVE;
@@ -627,10 +628,10 @@ void running_machine::schedule_load(std::string &&filename)
// immediate_load - load state.
//-------------------------------------------------
-void running_machine::immediate_load(const char *filename)
+void running_machine::immediate_load(std::string_view filename)
{
// specify the filename to save or load
- set_saveload_filename(filename);
+ set_saveload_filename(std::string(filename));
// set up some parameters for handle_saveload()
m_saveload_schedule = saveload_schedule::LOAD;
@@ -1121,6 +1122,7 @@ void running_machine::nvram_load()
emu_file file(options().nvram_directory(), OPEN_FLAG_READ);
if (!file.open(nvram_filename(nvram.device())))
{
+ // FIXME: don't swallow errors
nvram.nvram_load(file);
file.close();
}
@@ -1143,6 +1145,7 @@ void running_machine::nvram_save()
emu_file file(options().nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
if (!file.open(nvram_filename(nvram.device())))
{
+ // FIXME: don't swallow errors
nvram.nvram_save(file);
file.close();
}