Usage of CoreGetRomSettings seems weird
jgcodes2020 opened this issue · 2 comments
Currently, CoreGetRomSettings will error with M64ERR_INPUT_NOT_FOUND
if it finds multiple entries. The next best method of getting the ROM settings is to first open the ROM, then call CoreDoCommand(M64CMD_ROM_GET_SETTINGS, ...)
, then close the ROM.
Is the method I mentioned the intended method?
Suggestion
Add a method similar to CoreGetRomSettings, but specifying both MD5 hash and CRCs. This is trivial to add, and allows me to parallelize the file reading on the frontend.
Looking at the code for CoreGetRomSettings()
, it seems like intended behavior, see [1].
Personally in RMG I use the open ROM -> retrieve settings & header -> close ROM method, I do cache those entries though to speed up subsequent loading of the ROM browser.
As for your suggestion, it'd be trivial to add but I wonder what your use case is exactly? i.e do you have a ROM browser in your front-end?
[1] https://github.com/mupen64plus/mupen64plus-core/blob/master/src/main/rom.c#L918