Previous 15994 Revisions Next

r2080 Sunday 23rd March, 2008 at 22:08:13 UTC by Nathan Woods
Added comments
[src/mess/osd/winui]softwarepicker.c

src/mess/osd/winui/softwarepicker.c
r2079r2080
190190
191191   pPickerInfo = GetSoftwarePickerInfo(hwndPicker);
192192
193   // did the driver change?
193194   if (pPickerInfo->pDriver != pDriver)
194195   {
195      if (pPickerInfo->pHashFile)
196      // is there a hash file loaded?
197      if (pPickerInfo->pHashFile != NULL)
196198      {
199         // close down the file
197200         hashfile_close(pPickerInfo->pHashFile);
198201         pPickerInfo->pHashFile = NULL;
199202
203         // invalidate the hash "realization"
200204         for (i = 0; i < pPickerInfo->nIndexLength; i++)
201205         {
202206            pPickerInfo->ppIndex[i]->pHashInfo = NULL;
r2079r2080
206210      }
207211
208212
213      // change the driver value
209214      pPickerInfo->pDriver = pDriver;
210215
211      if (pDriver)
216      // if we have a driver, we have to load some stuff
217      if (pDriver != NULL)
212218      {
213         while(pDriver && !pPickerInfo->pHashFile)
219         // find a hash file
220         while((pDriver != NULL) && !pPickerInfo->pHashFile)
214221         {
215222            pPickerInfo->pHashFile = hashfile_open_options(MameUIGlobal(), pDriver->name, TRUE, pPickerInfo->pfnErrorProc);
216223            pDriver = mess_next_compatible_driver(pDriver);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team