src/mess/image.c
| r7777 | r7778 | |
| 563 | 563 | using this device's partial hash if appropriate |
| 564 | 564 | -------------------------------------------------*/ |
| 565 | 565 | |
| 566 | | void image_device_compute_hash(char *dest, running_device *device, |
| 566 | void image_device_compute_hash(char *dest, const device_config *device, |
| 567 | 567 | const void *data, size_t length, unsigned int functions) |
| 568 | 568 | { |
| 569 | | device_image_partialhash_func partialhash; |
| 569 | // device_image_partialhash_func partialhash; |
| 570 | 570 | |
| 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); |
| 573 | 573 | |
| 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); |
| 579 | 579 | } |
| 580 | 580 | |
| 581 | 581 | |
src/mess/image.h
| r7777 | r7778 | |
| 179 | 179 | int image_device_uses_file_extension(const device_config *device, const char *file_extension); |
| 180 | 180 | |
| 181 | 181 | /* compute a hash, using this device's partial hash if appropriate */ |
| 182 | | void image_device_compute_hash(char *dest, running_device *device, |
| 182 | void image_device_compute_hash(char *dest, const device_config *device, |
| 183 | 183 | const void *data, size_t length, unsigned int functions); |
| 184 | 184 | |
| 185 | 185 | /* ----- creation formats ----- */ |