summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Nathan Woods <npwoods@mess.org>2016-07-10 23:43:16 -0400
committer Nathan Woods <npwoods@mess.org>2016-07-10 23:43:16 -0400
commite1f3bc9b8a875dd211c4b60e54fb4f7f17c1dafc (patch)
tree2bcc6fb41469de60286aae07d6bcdf0105a34a2c
parent09b3fbf52cbaf756b0e3e55773161aa53290b1d0 (diff)
Now using core_filename_extract_base() in menu_file_create ctor
-rw-r--r--src/frontend/mame/ui/filecreate.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/frontend/mame/ui/filecreate.cpp b/src/frontend/mame/ui/filecreate.cpp
index e54692e600f..07f0abdf9c5 100644
--- a/src/frontend/mame/ui/filecreate.cpp
+++ b/src/frontend/mame/ui/filecreate.cpp
@@ -148,12 +148,9 @@ menu_file_create::menu_file_create(mame_ui_manager &mui, render_container &conta
{
m_image = image;
m_ok = true;
- auto const sep = current_file.rfind(PATH_SEPARATOR);
m_filename.reserve(1024);
- m_filename = sep != std::string::npos
- ? current_file.substr(sep + strlen(PATH_SEPARATOR), current_file.size() - sep - strlen(PATH_SEPARATOR))
- : current_file;
+ m_filename = core_filename_extract_base(current_file);
}