Previous 15994 Revisions Next

r5903 Monday 28th September, 2009 at 10:29:28 UTC by Robbbert
[NEWUI] Fixed file extension filter for floppies.
[src/mess/osd/windows]menu.c

src/mess/osd/windows/menu.c
r5902r5903
910910static void build_generic_filter(const device_config *device, int is_save, char *filter, size_t filter_len)
911911{
912912   char *s;
913   image_device_info info = image_device_getinfo(device->machine->config, device);
914913
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;
926915
916   /* copy the string */
917   file_extension = device_get_info_string(device, DEVINFO_STR_IMAGE_FILE_EXTENSIONS);
918
927919   // start writing the filter
928920   s = filter;
929921
930922   // 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);
932924
933925   // all files
934926   s += sprintf(s, "All files (*.*)|*.*|");

Previous 15994 Revisions Next


© 1998-2018 The MESS Team