src/mess/osd/winui/softwarepicker.c
| r2079 | r2080 | |
| 190 | 190 | |
| 191 | 191 | pPickerInfo = GetSoftwarePickerInfo(hwndPicker); |
| 192 | 192 | |
| 193 | // did the driver change? |
| 193 | 194 | if (pPickerInfo->pDriver != pDriver) |
| 194 | 195 | { |
| 195 | | if (pPickerInfo->pHashFile) |
| 196 | // is there a hash file loaded? |
| 197 | if (pPickerInfo->pHashFile != NULL) |
| 196 | 198 | { |
| 199 | // close down the file |
| 197 | 200 | hashfile_close(pPickerInfo->pHashFile); |
| 198 | 201 | pPickerInfo->pHashFile = NULL; |
| 199 | 202 | |
| 203 | // invalidate the hash "realization" |
| 200 | 204 | for (i = 0; i < pPickerInfo->nIndexLength; i++) |
| 201 | 205 | { |
| 202 | 206 | pPickerInfo->ppIndex[i]->pHashInfo = NULL; |
| r2079 | r2080 | |
| 206 | 210 | } |
| 207 | 211 | |
| 208 | 212 | |
| 213 | // change the driver value |
| 209 | 214 | pPickerInfo->pDriver = pDriver; |
| 210 | 215 | |
| 211 | | if (pDriver) |
| 216 | // if we have a driver, we have to load some stuff |
| 217 | if (pDriver != NULL) |
| 212 | 218 | { |
| 213 | | while(pDriver && !pPickerInfo->pHashFile) |
| 219 | // find a hash file |
| 220 | while((pDriver != NULL) && !pPickerInfo->pHashFile) |
| 214 | 221 | { |
| 215 | 222 | pPickerInfo->pHashFile = hashfile_open_options(MameUIGlobal(), pDriver->name, TRUE, pPickerInfo->pfnErrorProc); |
| 216 | 223 | pDriver = mess_next_compatible_driver(pDriver); |