mirror of
https://github.com/holub/mame
synced 2025-10-05 16:50:57 +03:00
uiimage.c: when creating a new file from the File Manager, require the user to
enter an extension too [Fabio Priuli] this matches the behavior from command line where launching files of a create-able media (e.g. tapes or memory cards) without extension is always interpreted like launching from softlist, while launching it with an extension actually creates the file if it does not exist yet.
This commit is contained in:
parent
1dfb058b17
commit
8ed7d024d9
@ -295,8 +295,14 @@ void ui_menu_file_create::handle()
|
||||
case IPT_UI_SELECT:
|
||||
if ((event->itemref == ITEMREF_CREATE) || (event->itemref == ITEMREF_NEW_IMAGE_NAME))
|
||||
{
|
||||
current_file.cpy(filename_buffer);
|
||||
ui_menu::stack_pop(machine());
|
||||
astring tmp_file(filename_buffer);
|
||||
if (tmp_file.find(".") != -1 && tmp_file.find(".") < tmp_file.len() - 1)
|
||||
{
|
||||
current_file.cpy(filename_buffer);
|
||||
ui_menu::stack_pop(machine());
|
||||
}
|
||||
else
|
||||
ui_popup_time(1, "Please enter a file extension too");
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user