Revert the workaround of loading of hd textures#999
Merged
codeHusky merged 1 commit intosmartcmd:mainfrom Mar 9, 2026
Merged
Conversation
The previous crash fix forced HD skins at every resolution which made everything blurry at 720p and below because Iggy was downscaling 1080p assets. The real problem was that 4J loaded the HD skin libraries (skinHD.swf, skinHDHud.swf etc) unconditionally on Win64 but the HD platform skin was only registered above 720p. At 720p or lower Iggy couldnt find platformskinHD.swf and crashed. Now on Win64 we load both skin sets at startup, HD and non-HD, each with their own registered name so they dont conflict. loadMovie() picks 1080.swf or 720.swf based on actual screen height, and each scene SWF naturally imports the right skin chain. No crash, no blurriness. 4J already had the eLibraryFallback enum slots for this (including eLibraryFallback_Platform) but it was behind a debug-only guard and the platform skin slot was never actually loaded. Removed the guard and added the missing load.
Collaborator
|
Tested and seems to work |
piebotc
pushed a commit
to piebotc/LegacyEvolved
that referenced
this pull request
Mar 9, 2026
The previous crash fix forced HD skins at every resolution which made everything blurry at 720p and below because Iggy was downscaling 1080p assets. The real problem was that 4J loaded the HD skin libraries (skinHD.swf, skinHDHud.swf etc) unconditionally on Win64 but the HD platform skin was only registered above 720p. At 720p or lower Iggy couldnt find platformskinHD.swf and crashed. Now on Win64 we load both skin sets at startup, HD and non-HD, each with their own registered name so they dont conflict. loadMovie() picks 1080.swf or 720.swf based on actual screen height, and each scene SWF naturally imports the right skin chain. No crash, no blurriness. 4J already had the eLibraryFallback enum slots for this (including eLibraryFallback_Platform) but it was behind a debug-only guard and the platform skin slot was never actually loaded. Removed the guard and added the missing load.
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.
Description
Fix blurry UI at sub-HD resolutions on Win64 by loading both HD and non-HD skin sets and picking the right scene SWF based on actual screen height.
Changes
Previous Behavior
The earlier crash fix (from #981) forced HD skins at every resolution to prevent Iggy from failing to resolve
platformskinHD.swf. This fixed the crash but at 720p and below Iggy was downscaling 1080p assets and everything looked blurry.Root Cause
Two issues, both from 4J's original code:
The HD skin libraries (
skinHD.swf,skinHDHud.swf, etc.) are loaded unconditionally on Win64/Durango/Orbis. These SWFs internallyimport platformskinHD.swf. But the platform skin registration was behind a runtime resolution check — at <=720p it registeredskinWin.swfasplatformskin.swfinstead ofplatformskinHD.swf, so Iggy couldn't resolve the import and crashed.loadMovie()on Win64 was hardcoded to always load the 1080p scene SWF variant (*1080.swf), regardless of actual window size. The 1080p scenes import HD skins, so even if you fixed the platform skin you'd still be using HD assets at low resolutions.4J actually started building a solution for this — they defined
eLibraryFallback_*enum slots (includingeLibraryFallback_Platform) and had code to load the non-HD skins into them, but it was gated behind#ifndef _FINAL_BUILD(debug only) and the platform skin slot was never actually loaded. So the fallback was incomplete and non-functional.New Behavior
The game starts and runs correctly at any resolution on Win64. Above 720p it uses 1080p scene SWFs with HD skins (same as before). At 720p and below it uses 720p scene SWFs with non-HD skins — native assets for the resolution, no downscaling, no blurriness. No crash at any resolution.
Fix Implementation
UIController.h: Removed the_FINAL_BUILDpreprocessor guard around theeLibraryFallback_*enum entries so they're available in release builds, not just debug.UIController.cpp—loadSkins(): Rewrote the Win64 path to load both skin sets at startup:eLibrary_Platform=skinHDWin.swfregistered asplatformskinHD.swfeLibraryFallback_Platform=skinWin.swfregistered asplatformskin.swf(this was the 4J bug — slot existed but was never loaded)eLibrary_*= all HD skins (skinHDGraphics.swf,skinHD.swf, etc.)eLibraryFallback_*= all non-HD skins (skinGraphics.swf,skin.swf, etc.)Both sets use distinct registered names so they coexist in the same Iggy session without conflicts.
UIScene.cpp—loadMovie(): On Win64 the scene SWF resolution is now chosen based on actual screen height instead of being hardcoded to 1080p:>720ploads*1080.swf(these import HD skins which importplatformskinHD.swf)<=720ploads*720.swf(these import non-HD skins which importplatformskin.swf)The existing fallback (try 720 if 1080 file is missing) still works as a safety net.
AI Use Disclosure
Ai was used to write this pr description.
Related Issues