Previous 15994 Revisions Next

r2446 Wednesday 23rd April, 2008 at 11:30:28 UTC by Nathan Woods
[Windows GUI] Fixed bug #1585
[src/mess/osd/winui]messui.c

src/mess/osd/winui/messui.c
r2445r2446
400400
401401
402402
403static int is_null_or_empty(const char *s)
404{
405   return (s == NULL) || (s[0] == '\0');
406}
407
408
409
403410// Places the specified image in the specified slot; nID = -1 means don't matter
404411static void MessSpecifyImage(int drvindex, const device_config *device, LPCSTR pszFilename)
405412{
r2445r2446
423430      }
424431   }
425432
426   // still not found?  find an image using the same file extension
433   // still not found?  find an empty slot for which the device uses the
434   // same file extension
427435   if (device == NULL)
428436   {
429437      const char *file_extension;     
r2445r2446
436444      {
437445         for (device = image_device_first(config); device != NULL; device = image_device_next(device))
438446         {
439            if (image_device_uses_file_extension(device, file_extension))
447            s = GetSelectedSoftware(drvindex, config, device);
448            if (is_null_or_empty(s) && image_device_uses_file_extension(device, file_extension))
440449               break;
441450         }
442451      }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team