src/mess/filemngr.c
| r3078 | r3079 | |
| 865 | 865 | } |
| 866 | 866 | menustate = (file_manager_menu_state *) state; |
| 867 | 867 | |
| 868 | | /* update the selected device */ |
| 869 | | menustate->selected_device = (const device_config *) ui_menu_get_selection(menu); |
| 870 | | |
| 871 | 868 | /* if the menu isn't built, populate now */ |
| 872 | 869 | if (!ui_menu_populated(menu)) |
| 873 | 870 | menu_file_manager_populate(machine, menu, state); |
| 874 | 871 | |
| 872 | /* update the selected device */ |
| 873 | menustate->selected_device = (const device_config *) ui_menu_get_selection(menu); |
| 874 | |
| 875 | 875 | /* process the menu */ |
| 876 | 876 | event = ui_menu_process(menu, 0); |
| 877 | 877 | if (event != NULL && event->iptkey == IPT_UI_SELECT) |
| r3078 | r3079 | |
| 887 | 887 | astring_cpyc(menustate->current_file, image_exists(menustate->selected_device) ? image_basename(menustate->selected_device) : ""); |
| 888 | 888 | |
| 889 | 889 | /* reset the existing menu */ |
| 890 | | ui_menu_reset(menu, 0); |
| 890 | ui_menu_reset(menu, UI_MENU_RESET_REMEMBER_POSITION); |
| 891 | 891 | |
| 892 | 892 | /* push the menu */ |
| 893 | 893 | child_menu = ui_menu_alloc(machine, menu_file_selector, NULL); |