scummvm icon indicating copy to clipboard operation
scummvm copied to clipboard

DIRECTOR: DETECTION: Set gameID and gameName from winresources

Open nirvairu opened this issue 9 months ago • 8 comments

gameId and gameName are set from WinResources during fallback detection

sanitizeNames is copied from the implementation in detector/AdvancedDetector.cpp

nirvairu avatar Apr 07 '25 12:04 nirvairu

I added my comments. It is still not clear how did you test it. Please explain.

@sev- I temporarily bypassed normal detection for fallback by commenting out the entry of the demos I was testing in the detection table.

Then I add the games in the scummvm UI and see if the correct name and id are set. and verify it and debug output.

Since every demo I could find already used one of the default names that were supposed to be blacklisted I temporarily removed the check to to verify that they were being set correctly and then add the check again to verify that it correctly rejects them

Later I started manually changing the resource data using a hex editor instead

nirvairu avatar Apr 07 '25 20:04 nirvairu

@sev-

Also I a small while ago I noticed that some demos have multiple VersionInfo blocks not just for anything unrelated to Director but there are multiple blocks for Director itself.

They still don't seem to hold much relevant info, Either they are duplicated and in one different name was cryptic like "IML".

There is also a chance of a problem occurring if the first VersionInfo block was of something completely unrelated like for DLLS

nirvairu avatar Apr 07 '25 21:04 nirvairu

@nirvairu Looking forward to changes

sev- avatar Apr 27 '25 12:04 sev-

@sev- I have updated the PR according to your suggestions.

nirvairu avatar Apr 28 '25 15:04 nirvairu

I'm still yet to find a director game or demo that suitably uses WinResources aside from these default values I'll try to look for more demos or games to test and see if there can be some improvements like using other fields

nirvairu avatar Apr 28 '25 15:04 nirvairu

@nirvairu We require every commit to be in accordance to our commit guidelines. Please fix it.

Also, I prefer this to be merged into less commits, ideally two, e.g. you first introduce API in the AdvancedDetector, then you use it in the Director engine. Please, rework the history.

sev- avatar Apr 30 '25 11:04 sev-

@sev- I've fixed the style issues and redundant code and have rebased the PR into two commits as suggested

nirvairu avatar May 05 '25 17:05 nirvairu

Please review our commit guidelines. Your commits do not have the subsystem in upper case.

lephilousophe avatar May 05 '25 18:05 lephilousophe

Merged manually

sev- avatar Jun 19 '25 21:06 sev-