src/mess/osd/windows/menu.c
| r5902 | r5903 | |
| 910 | 910 | static void build_generic_filter(const device_config *device, int is_save, char *filter, size_t filter_len) |
| 911 | 911 | { |
| 912 | 912 | char *s; |
| 913 | | image_device_info info = image_device_getinfo(device->machine->config, device); |
| 914 | 913 | |
| 915 | | // make the file extension list be comma delimited |
| 916 | | s = info.file_extensions; |
| 917 | | do |
| 918 | | { |
| 919 | | s += strlen(s); |
| 920 | | if (s[1] != '\0') |
| 921 | | { |
| 922 | | *(s++) = ','; |
| 923 | | } |
| 924 | | } |
| 925 | | while(*s != '\0'); |
| 914 | const char *file_extension; |
| 926 | 915 | |
| 916 | /* copy the string */ |
| 917 | file_extension = device_get_info_string(device, DEVINFO_STR_IMAGE_FILE_EXTENSIONS); |
| 918 | |
| 927 | 919 | // start writing the filter |
| 928 | 920 | s = filter; |
| 929 | 921 | |
| 930 | 922 | // common image types |
| 931 | | s += add_filter_entry(filter, filter_len, "Common image types", info.file_extensions); |
| 923 | s += add_filter_entry(filter, filter_len, "Common image types", file_extension); |
| 932 | 924 | |
| 933 | 925 | // all files |
| 934 | 926 | s += sprintf(s, "All files (*.*)|*.*|"); |