summaryrefslogtreecommitdiffstats
path: root/src/emu/machine.cpp
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2022-03-15 21:38:01 +1100
committer Robbbert <Robbbert@users.noreply.github.com>2022-03-15 21:38:01 +1100
commit6d9216bf11db6596c07351ff3e191bd97b32a359 (patch)
tree53acadc743eef54bd5602d9af0aeaeda7c28a7ee /src/emu/machine.cpp
parentf2812653ff613e85d6e6af87ac4341bcb3ffb6a9 (diff)
Revert "Revert "Remove fileio.h from emu.h""
This reverts commit ea6d1ae3f4cd36732c2b9a2a6d02a06dc4a97def.
Diffstat (limited to 'src/emu/machine.cpp')
-rw-r--r--src/emu/machine.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index b5683e54dc9..c9cb9cc3e6f 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -16,9 +16,13 @@
#include "debug/debugvw.h"
#include "debugger.h"
#include "dirtc.h"
+<<<<<<< HEAD
#include "emuopts.h"
#include "fileio.h"
#include "http.h"
+=======
+#include "fileio.h"
+>>>>>>> parent of ea6d1ae3f4c (Revert "Remove fileio.h from emu.h")
#include "image.h"
#include "natkeyboard.h"
#include "network.h"
@@ -593,10 +597,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;
@@ -630,10 +634,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;
@@ -1135,8 +1139,13 @@ void running_machine::nvram_load()
emu_file file(options().nvram_directory(), OPEN_FLAG_READ);
if (!file.open(nvram_filename(nvram.device())))
{
+<<<<<<< HEAD
if (!nvram.nvram_load(file))
osd_printf_error("Error reading NVRAM file %s\n", file.filename());
+=======
+ // FIXME: don't swallow errors
+ nvram.nvram_load(file);
+>>>>>>> parent of ea6d1ae3f4c (Revert "Remove fileio.h from emu.h")
file.close();
}
else
@@ -1158,8 +1167,13 @@ 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())))
{
+<<<<<<< HEAD
if (!nvram.nvram_save(file))
osd_printf_error("Error writing NVRAM file %s\n", file.filename());
+=======
+ // FIXME: don't swallow errors
+ nvram.nvram_save(file);
+>>>>>>> parent of ea6d1ae3f4c (Revert "Remove fileio.h from emu.h")
file.close();
}
}