Previous 15994 Revisions Next

r7778 Sunday 11th April, 2010 at 08:29:22 UTC by Robbbert
[MESSUI] Details from hsi file showing in Software Picker - Bug #1841. Notes (1) Partialhash not working (2) MESSUI can take longer to start, especially if you have a lot of software. (3) only tested on WinXP 32bit.
[src/mess]image.c image.h
[src/mess/osd/winui]softwarepicker.c swconfig.c

src/mess/image.c
r7777r7778
563563    using this device's partial hash if appropriate
564564-------------------------------------------------*/
565565
566void image_device_compute_hash(char *dest, running_device *device,
566void image_device_compute_hash(char *dest, const device_config *device,
567567    const void *data, size_t length, unsigned int functions)
568568{
569    device_image_partialhash_func partialhash;
569//   device_image_partialhash_func partialhash;
570570
571    /* retrieve the partial hash func */
572    partialhash = (device_image_partialhash_func) device->get_config_string(DEVINFO_FCT_IMAGE_PARTIAL_HASH);
571   /* retrieve the partial hash func */
572//   partialhash = (device_image_partialhash_func) device->get_config_string(DEVINFO_FCT_IMAGE_PARTIAL_HASH);
573573
574    /* compute the hash */
575    if (partialhash != NULL)
576        partialhash(dest, (const unsigned char*)data, length, functions);
577    else
578        hash_compute(dest, (const unsigned char*)data, length, functions);
574   /* compute the hash */
575//   if (partialhash)
576//      partialhash(dest, (const unsigned char*)data, length, functions);
577//   else
578      hash_compute(dest, (const unsigned char*)data, length, functions);
579579}
580580
581581
src/mess/image.h
r7777r7778
179179int image_device_uses_file_extension(const device_config *device, const char *file_extension);
180180
181181/* compute a hash, using this device's partial hash if appropriate */
182void image_device_compute_hash(char *dest, running_device *device,
182void image_device_compute_hash(char *dest, const device_config *device,
183183    const void *data, size_t length, unsigned int functions);
184184
185185/* ----- creation formats ----- */
src/mess/osd/winui/swconfig.c
r7777r7778
2525
2626   // allocate the hash file
2727   driver = drivers[driver_index];
28   while((driver != NULL) && (config->hashfile != NULL))
28   while (driver)
2929   {
3030      config->hashfile = hashfile_open_options(opts, driver->name, TRUE, error_proc);
3131      driver = driver_get_compatible(driver);
src/mess/osd/winui/softwarepicker.c
r7777r7778
226226
227227   // FIXME
228228   // compute the hash
229   //image_device_compute_hash(pFileInfo->hash_string, pFileInfo->device, pBuffer, nLength, functions);
229   image_device_compute_hash(pFileInfo->hash_string, pFileInfo->device, pBuffer, nLength, functions);
230230}
231231
232232

Previous 15994 Revisions Next


© 1998-2018 The MESS Team