From e8bbea1fc6e94e14768509d322f6c624403ffb36 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 22 Aug 2021 09:06:15 +1000 Subject: 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. --- src/emu/render.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/emu/render.cpp') diff --git a/src/emu/render.cpp b/src/emu/render.cpp index 1c176929aad..2c4541cb6b9 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -50,7 +50,8 @@ #include "ui/uimain.h" -#include "xmlfile.h" +#include "util/path.h" +#include "util/xmlfile.h" #include @@ -2186,7 +2187,7 @@ bool render_target::load_layout_file(const char *dirname, const char *filename) emu_file layoutfile(m_manager.machine().options().art_path(), OPEN_FLAG_READ); layoutfile.set_restrict_to_mediapath(1); bool result(false); - for (osd_file::error filerr = layoutfile.open(fname); osd_file::error::NONE == filerr; filerr = layoutfile.open_next()) + for (std::error_condition filerr = layoutfile.open(fname); !filerr; filerr = layoutfile.open_next()) { // read the file and parse as XML util::xml::file::ptr const rootnode(util::xml::file::read(layoutfile, &parseopt)); -- cgit v1.2.3-70-g09d2