- changed title to Incompatibility with libpng 1.4.x
- changed status to open
Incompatibility with libpng 1.4.x
Original [issue 69](https://code.google.com/p/genplus-gx/issues/detail?id=69) created by joramee on 2010-03-23T19:36:47.000Z:
What steps will reproduce the problem? 1. Grab latest revision of genplus-gx 2. Grab latest version of devkitppc and libpng 1.4.0 3. Attempt to compile.
What is the expected output? What do you see instead? I expected a binary. I got errors from the compiler telling me png\_check\_sig doesn't exist
What version of the emulator are you using? r431
Please provide any additional information below (video settings, console region,...) It seems as libpng has increased to version 1.4.0 from 1.2.40, the png\_check\_sig function has been eliminated. The new (comparable) function seems to be png\_sig\_cmp according to searching on forums. Yet when I try to replace the function
if (!png\_check\_sig (magic, 8))
with
if (!png\_sig\_cmp (magic, 1, 8))
in gx\_video.c, it will compile but once I go to load a game it will kick me out to the loader if I have my hand pointer over a game that I have a screenshot for.
If anyone know coding a little better I think this could be an easy change.
\_J
Comments (3)
-
Account Deleted -
Account Deleted Comment # 3 originally posted by joelwhybrow on 2010-04-11T06:33:58.000Z:
Thank you so much for this, I have been pulling my hair out today trying to figure this out! Tested and working.
-
Account Deleted - changed status to resolved
Comment # 4 originally posted by ekeeke31 on 2010-04-13T12:21:37.000Z:
- Log in to comment
Comment # 2 originally posted by ekeeke31 on 2010-03-24T09:44:15.000Z:
Ok, it should be:
if (!png\_sig\_cmp (magic, 0, 8))
The first parameter is a pointer to the array to look at, the 2nd is the byte index in the array where to start to look at and the last one is the number of bytes to look at. Since the 'magic' array is 8 bytes wide, if you set the start index to 1, the last byte will be read outside the array memory allocated area, which is generally not good.