Case insensitive map file names in missionmd.ini - #2381
Open
FS-21 wants to merge 1 commit into
Open
Conversation
When transitioning between campaign missions (such as when using `SkipMapSelect=yes`), the game engine uppercases `ScenarioClass::Instance->FileName` via `_strupr`.
|
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
Coronia
approved these changes
Sep 1, 2026
Contributor
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.

Text generated with AI for explaining the proposed fix/change:
"When transitioning between campaign missions (such as when using
SkipMapSelect=yes), the game engine uppercasesScenarioClass::Instance->FileNamevia_strupr.Because Westwood's
CCINIClass::GetSectionrelies on a case-sensitive CRC32 hash of section headers, looking up the uppercased scenario path fails ifmissionmd.inidefines the section with mixed casing (e.g.,[Maps/Missions/Red Alert 2/ALL02S.MAP]). As a result,LS800BkgdNameand related loading screen parameters are not read, causing the engine to skip the loading screen background and only render a progress bar over a black screen.Solution
In
ReadScenario_MissionINI(0x6870D7), ifini_missionmd.GetSection(scenarioName)returnsnullptr, iterate through the loaded sections list inmissionmd.iniusing_stricmpto resolve the section name case-insensitively before reading scenario metadata."