summaryrefslogtreecommitdiffstats
path: root/src/emu/ui/miscmenu.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/ui/miscmenu.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/ui/miscmenu.cpp')
-rw-r--r--src/emu/ui/miscmenu.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/emu/ui/miscmenu.cpp b/src/emu/ui/miscmenu.cpp
index 2145069bfab..e11a416e01d 100644
--- a/src/emu/ui/miscmenu.cpp
+++ b/src/emu/ui/miscmenu.cpp
@@ -588,7 +588,7 @@ ui_menu_misc_options::~ui_menu_misc_options()
{
machine().ui().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string);
}
- else
+ else
{
if (machine().options().bool_value(m_options[d].option) != m_options[d].status)
{
@@ -677,7 +677,7 @@ void ui_menu_misc_options::custom_render(void *selectedref, float top, float bot
// ctor / dtor
//-------------------------------------------------
-ui_menu_export::ui_menu_export(running_machine &machine, render_container *container, std::vector<const game_driver *> drvlist)
+ui_menu_export::ui_menu_export(running_machine &machine, render_container *container, std::vector<const game_driver *> drvlist)
: ui_menu(machine, container), m_list(drvlist)
{
}
@@ -705,11 +705,11 @@ void ui_menu_export::handle()
{
std::string filename("exported");
emu_file infile(machine().ui().options().ui_path(), OPEN_FLAG_READ);
- if (infile.open(filename.c_str(), ".xml") == FILERR_NONE)
+ if (infile.open(filename.c_str(), ".xml") == osd_file::error::NONE)
for (int seq = 0; ; ++seq)
{
std::string seqtext = string_format("%s_%04d", filename, seq);
- if (infile.open(seqtext.c_str(), ".xml") != FILERR_NONE)
+ if (infile.open(seqtext.c_str(), ".xml") != osd_file::error::NONE)
{
filename = seqtext;
break;
@@ -718,7 +718,7 @@ void ui_menu_export::handle()
// attempt to open the output file
emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (file.open(filename.c_str(), ".xml") == FILERR_NONE)
+ if (file.open(filename.c_str(), ".xml") == osd_file::error::NONE)
{
FILE *pfile;
std::string fullpath(file.fullpath());
@@ -745,11 +745,11 @@ void ui_menu_export::handle()
{
std::string filename("exported");
emu_file infile(machine().ui().options().ui_path(), OPEN_FLAG_READ);
- if (infile.open(filename.c_str(), ".txt") == FILERR_NONE)
+ if (infile.open(filename.c_str(), ".txt") == osd_file::error::NONE)
for (int seq = 0; ; ++seq)
{
std::string seqtext = string_format("%s_%04d", filename, seq);
- if (infile.open(seqtext.c_str(), ".txt") != FILERR_NONE)
+ if (infile.open(seqtext.c_str(), ".txt") != osd_file::error::NONE)
{
filename = seqtext;
break;
@@ -758,7 +758,7 @@ void ui_menu_export::handle()
// attempt to open the output file
emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (file.open(filename.c_str(), ".txt") == FILERR_NONE)
+ if (file.open(filename.c_str(), ".txt") == osd_file::error::NONE)
{
// print the header
std::ostringstream buffer;
@@ -829,8 +829,8 @@ void ui_menu_machine_configure::handle()
{
std::string filename(m_drv->name);
emu_file file(machine().options().ini_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE);
- file_error filerr = file.open(filename.c_str(), ".ini");
- if (filerr == FILERR_NONE)
+ osd_file::error filerr = file.open(filename.c_str(), ".ini");
+ if (filerr == osd_file::error::NONE)
{
std::string inistring = machine().options().output_ini();
file.puts(inistring.c_str());
@@ -889,4 +889,4 @@ void ui_menu_machine_configure::custom_render(void *selectedref, float top, floa
// draw the text within it
mui.draw_text_full(container, m_drv->description, x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-} \ No newline at end of file
+}