GNOME Bugzilla – Bug 777777
Game Boy games not detected
Last modified: 2017-02-22 20:48:43 UTC
To check if a game is a Game Boy game we first look for some magic value in the header of the game file. We compare the magic value and the file's content as if they were strings, though it may not work because the magic value contains the 0 value. Comparing them as raw data fields should work.
Created attachment 344292 [details] [review] nes: Check magic value as raw data Use DataInputStream instead of StringInputStream to check the Game Boy magic value. This fixes the magic value being incorrectly not found in a valid game file.
Created attachment 344293 [details] [review] utils: Add DataInputStream This will be used in the next commit to check if some data is in an input stream.
Created attachment 344294 [details] [review] nes: Check magic value as raw data Use DataInputStream instead of StringInputStream to check the Game Boy magic value. This fixes the magic value being incorrectly not found in a valid game file.
Attachment 344293 [details] pushed as 824eefd - utils: Add DataInputStream Attachment 344294 [details] pushed as 536c7ed - nes: Check magic value as raw data
Created attachment 344303 [details] [review] Remove DataInputStream and Game Boy magic check DataInputStream has been added in the previous commit to help fix a bug in the GameBoyHeader, though it broke the compilation: it clashed with Glib.DataInputStream. Remove DataInputStream and don't check the Game Boy header as it's already done by shared-mime-info. This fixes compilation and makes the code simpler.
Comment on attachment 344303 [details] [review] Remove DataInputStream and Game Boy magic check Attachment 344303 [details] pushed as f783f90 - Remove DataInputStream and Game Boy magic check
Not the right way to spend bug #777777. :(
I didn't demand it. :|
And Michael, https://wiki.gnome.org/Initiatives/EveryDetailMatters :)