Repository navigation
Don't fault on game keys that can't name a colorization folder - #8
Merged
Merged
Conversation
Some gamelogic engines put a version in their game keys, like game/1.0, and the colorization lookup threw on them, so settings validation faulted the plugin and the game ran without its display. Such games now simply have no colorizations; staging still refuses those keys.
[Medium impact] The PR appears safe to merge. SummaryGames with keys such as
No actionable issues were found. Tests were not run during this review. Reviews (1) · Last reviewed commit: "plugin: don't fault on game keys that ca..." · Reviewed by Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some gamelogic engines put a version in their game keys, like
game/1.0. The DMD plugin uses the key as the game's folder in the colorization library, andColorizationCatalog.ReadthrewInvalid game key.on any key that isn't a plain file name. Settings validation reaches it before a game starts, so the plugin faulted ("Colorization: Invalid game key.") and the game ran without its display.ColorizationCatalog.IsFolderNametells whether a key can name a folder (a file name, not.or.., no invalid file-name characters).Readreturns no colorizations for other keys, asTableMediaPaths.GameDirectoriesalready skips them. Validation, the colorization list and game preparation then simply find none.Stagestill refuses such keys, so the path guard stays where files are written.Keys that are plain names, such as PinMAME ROM names, behave as before.
Tests: a new catalog test covers a versioned key (no colorizations, nothing throws, staging refuses it); the DMD player tests pass (30/30).