summaryrefslogtreecommitdiffstats
path: root/src/emu/machine.cpp
diff options
context:
space:
mode:
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();
}