JosefNemec / Playnite

Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.
https://playnite.link
MIT License
8.67k stars 483 forks source link

Games imported from SCUMMVM can not calculate installation size #3695

Open k0zyrev opened 4 months ago

k0zyrev commented 4 months ago

Bug Description

Correctly imported SCUMMVM game has installation path that looks like {EmulatorDir}\game\ If I go to Edit Game details->Installations->Install size and click "calculate", the game details window blinks and then nothing happens. In the detail view link that goes to install folder (EmulatorDir}\game) works as intended and opens the correct folder.

To Reproduce

Diagnostics ID

b164ead5-08fc-4bde-96ac-bc39593b1126

Screenshots

No response

JosefNemec commented 4 months ago

ROM field is used to calculate game size if present for all emulated games. We have no idea of knowing if the ROM is valid ROM or not. We would have to maintain implementations for install size calculations for each emulator individually which is not realistic thing to do in a project maintained by a single person.

k0zyrev commented 4 months ago

I don't think it's the size calculation that needs to be changed, but the emulator integration itself. Are those integrations already individually implemented?

If scummvm integration configured the game data in a different way, there'd be no problem with size calculation.

I just manually removed the rom from installation tab and added a launch parameter, it works perfectly. If scummvm parser did the same and added full path into installation folder field, size calculation would work.

Of course, if all emulators work on the same template, the problem goes back to individually maintaining those integrations and I understand it's not feasible or not even good architecture choice, I do not know how it works at the moment. Well, might be worth considering for the future feature or something.

upd. after taking a closer look, roughly describing the process, it seems that the integration parses the scummvm config files and then puts the game names into roms section, from which it later uses the rom name as a launch parameter. Question: is it not possible to put those names directly into the launch parameter without the rom field being populated?

dennisjj5 commented 4 months ago

The real problem here is that the "ROM" does not actually exist for ScummVM games. So, Playnite is most likely failing due to a file not found error trying to calculate size. Playnite should catch that, and fall back to calculating folder size for ScummVM games

k0zyrev commented 4 months ago

"ROM" does not actually exist

that's the point of what I've written above. SCUMMVM emulator integration seems to depend on having "roms" in the installation tab so it later uses as a launch parameter. If the integration worked differently, there'd be no need for that and size calculation would've worked fine provided it could've properly parse path formatted as "{EmulatorDir}\game\"