summaryrefslogtreecommitdiffstats
path: root/src/emu/config.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2016-03-13 13:54:57 +1100
committer Vas Crabb <vas@vastheman.com>2016-03-14 18:55:00 +1100
commit42fbb9c3967fcda37f2d9ae17d5796a79cf027b9 (patch)
treea43047ee00431e5e22bfc5f8f612ff775586e415 /src/emu/config.cpp
parent5fc27747031b6ed6f6c0582502098ebfb960be67 (diff)
Make osd_file a polymorphic class that's held with smart pointers
Make avi_file a class that's held with smart pointers, encapsulate various AVI I/O structures Make zip_file and _7z_file classes rather than having free functions everywhere Hide zip/7z class implementation behind an interface, no longer need to call close() to send back to the cache Don't dump as much crap in global namespace Add solaris PTY implementation Improve variable expansion for SDL OSD - supports ~/$FOO/${BAR} syntax Rearrange stuff so the same things are in file module for all OSDs Move file stuff into its own module 7z/zip open and destruct are still not thread-safe due to lack of interlocks around cache access Directory functions still need to be moved to file module SDL OSD may not initialise WinSock on Windows
Diffstat (limited to 'src/emu/config.cpp')
-rw-r--r--src/emu/config.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/emu/config.cpp b/src/emu/config.cpp
index 691012a4a41..7402341ad32 100644
--- a/src/emu/config.cpp
+++ b/src/emu/config.cpp
@@ -68,9 +68,9 @@ int configuration_manager::load_settings()
{
/* open the config file */
emu_file file(machine().options().ctrlr_path(), OPEN_FLAG_READ);
- file_error filerr = file.open(controller, ".cfg");
+ osd_file::error filerr = file.open(controller, ".cfg");
- if (filerr != FILERR_NONE)
+ if (filerr != osd_file::error::NONE)
throw emu_fatalerror("Could not load controller file %s.cfg", controller);
/* load the XML */
@@ -80,13 +80,13 @@ int configuration_manager::load_settings()
/* next load the defaults file */
emu_file file(machine().options().cfg_directory(), OPEN_FLAG_READ);
- file_error filerr = file.open("default.cfg");
- if (filerr == FILERR_NONE)
+ osd_file::error filerr = file.open("default.cfg");
+ if (filerr == osd_file::error::NONE)
load_xml(file, config_type::CONFIG_TYPE_DEFAULT);
/* finally, load the game-specific file */
filerr = file.open(machine().basename(), ".cfg");
- if (filerr == FILERR_NONE)
+ if (filerr == osd_file::error::NONE)
loaded = load_xml(file, config_type::CONFIG_TYPE_GAME);
/* loop over all registrants and call their final function */
@@ -107,13 +107,13 @@ void configuration_manager::save_settings()
/* save the defaults file */
emu_file file(machine().options().cfg_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- file_error filerr = file.open("default.cfg");
- if (filerr == FILERR_NONE)
+ osd_file::error filerr = file.open("default.cfg");
+ if (filerr == osd_file::error::NONE)
save_xml(file, config_type::CONFIG_TYPE_DEFAULT);
/* finally, save the game-specific file */
filerr = file.open(machine().basename(), ".cfg");
- if (filerr == FILERR_NONE)
+ if (filerr == osd_file::error::NONE)
save_xml(file, config_type::CONFIG_TYPE_GAME);
/* loop over all registrants and call their final function */