summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/state.cpp
diff options
context:
space:
mode:
author Vas Crabb <cuavas@users.noreply.github.com>2021-08-22 09:06:15 +1000
committer GitHub <noreply@github.com>2021-08-22 09:06:15 +1000
commite8bbea1fc6e94e14768509d322f6c624403ffb36 (patch)
tree74dd1606a900d83de8aecff17a6737af4113308d /src/frontend/mame/ui/state.cpp
parente319bde5fc3696d7f48f62b15b6366c4377fe5d1 (diff)
formats, osd, util: Started refactoring file I/O stuff. (#8456)
Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives.
Diffstat (limited to 'src/frontend/mame/ui/state.cpp')
-rw-r--r--src/frontend/mame/ui/state.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/frontend/mame/ui/state.cpp b/src/frontend/mame/ui/state.cpp
index 8f911b8f15b..6bb0b9ccdc5 100644
--- a/src/frontend/mame/ui/state.cpp
+++ b/src/frontend/mame/ui/state.cpp
@@ -365,14 +365,16 @@ void menu_load_save_state_base::handle_keys(uint32_t flags, int &iptkey)
machine().options().state_directory(),
machine().get_statename(machine().options().state_name()),
m_confirm_delete->file_name()));
- osd_file::error const err(osd_file::remove(filename));
- if (osd_file::error::NONE != err)
+ std::error_condition const err(osd_file::remove(filename));
+ if (err)
{
osd_printf_error(
- "Error removing file %s for state %s (%d)\n",
+ "Error removing file %s for state %s (%s:%d %s)\n",
filename,
m_confirm_delete->visible_name(),
- std::underlying_type_t<osd_file::error>(err));
+ err.category().name(),
+ err.value(),
+ err.message());
machine().popmessage(_("Error removing saved state file %1$s"), filename);
}