Previous 15994 Revisions Next

r8200 Wednesday 2nd June, 2010 at 12:15:49 UTC by Miodrag Milanović
[MESSUI] Initial softlist support, will automatically add a folders for software lists assigned to driver to the software picker.
[src/mess/osd/winui]messui.c

src/mess/osd/winui/messui.c
r8199r8200
349349   const game_driver *drv;
350350   HWND hwndSoftwarePicker;
351351   HWND hwndSoftwareDevView;
352
352   char softListDir[256];
353   
353354   // do we have to do anything?
354355   if (!bForce)
355356   {
r8199r8200
389390      drv = driver_get_compatible(drv);
390391   }
391392   AddSoftwarePickerDirs(hwndSoftwarePicker, GetExtraSoftwarePaths(drvindex), NULL);
393   
394   /* allocate the machine config */
395   machine_config *config = machine_config_alloc( drivers[drvindex]->machine_config );
396
397   for (const device_config *dev = config->devicelist.first(); dev != NULL; dev = dev->next)
398   {
399      if ( ! strcmp( dev->tag(), __SOFTWARE_LIST_TAG ) )
400      {
401         software_list_config *swlist = (software_list_config *)dev->inline_config;
402
403         for ( int i = 0; i < DEVINFO_STR_SWLIST_MAX - DEVINFO_STR_SWLIST_0; i++ )
404         {
405            if ( swlist->list_name[i] && *swlist->list_name[i] )
406               sprintf(softListDir,"roms\\%s",swlist->list_name[i]);
407               AddSoftwarePickerDirs(hwndSoftwarePicker, softListDir, NULL);
408         }
409      }
410   }
411
412   /* free the machine config */
413   machine_config_free( config );   
392414}
393415
394416

Previous 15994 Revisions Next


© 1998-2018 The MESS Team