Fix supprot for zipped Colecovision roms.

This commit is contained in:
gameblabla 2020-09-25 02:46:59 +02:00
parent d80c99668e
commit 81377bab7f
No known key found for this signature in database
GPG Key ID: B24EFBB23B5F76CB

View File

@ -27,6 +27,11 @@ uint8_t *loadFromZipByName(char *archive, char *filename, uint32_t *filesize)
/* Get information about the file */
unzGetCurrentFileInfo(zhandle, &zinfo, &name[0], 0xff, NULL, 0, NULL, 0);
/* Force console if file extension is detected */
if (strcmp(strrchr(&name[0], '.'), ".col") == 0) option.console = 6;
else if (strcmp(strrchr(&name[0], '.'), ".gg") == 0) option.console = 3;
*filesize = zinfo.uncompressed_size;
/* Error: file size is zero */