Skip to content

Fix crash when launching at 720p or lower resolutions#981

Merged
codeHusky merged 1 commit intosmartcmd:mainfrom
MrTheShy:fix-all-resolutions
Mar 8, 2026
Merged

Fix crash when launching at 720p or lower resolutions#981
codeHusky merged 1 commit intosmartcmd:mainfrom
MrTheShy:fix-all-resolutions

Conversation

@MrTheShy
Copy link
Contributor

@MrTheShy MrTheShy commented Mar 8, 2026

Description

Fix crash on startup when the game window is at 720p or below on Windows64.

Changes

Previous Behavior

Launching the game at 1280x720 or any resolution with height ≤720 caused an immediate crash during UI initialization. Iggy reported "Attempted to import undefined library platformskinHD.swf", followed by "Failed to load iggy scene!" and a __debugbreak() in UIScene::loadMovie().

Root Cause

In UIController::loadSkins(), the platform skin path and its Iggy registration name were chosen based on a runtime check (m_fScreenHeight > 720.0f). At 720p this evaluates to false, so the skin was loaded from skinWin.swf and registered as "platformskin.swf". Below 720p, the same non-HD path was taken.

However, further down in the same function, the HD skin libraries (skinHD.swf, skinHDHud.swf, skinHDInGame.swf, etc.) are loaded unconditionally on Win64/Durango/Orbis — there is no resolution gate around them. These SWFs internally import platformskinHD.swf, which was never registered at ≤720p, causing Iggy to fail the import and every dependent scene to fail loading.

This is an original 4J bug — the HD block was written assuming these platforms always run above 720p, which is true for consoles but not for PC where the window can be any size.

New Behavior

The game starts and runs correctly at any resolution on Windows64, including 720p and 480p.

Fix Implementation

Removed the runtime resolution conditional for the platform skin path on Win64/Durango/Orbis. These platforms now always load the HD variant (skinHDWin.swf / skinHDDurango.swf / skinHDOrbis.swf) and always register it as "platformskinHD.swf", matching what the unconditionally-loaded HD skin libraries expect. The registration was changed from a runtime if to a compile-time #if to make the platform split explicit. PS3/PSVita are unaffected as they have their own separate non-HD skin loading path.

AI Use Disclosure

No AI was used to write the code in this PR.

Related Issues

The HD skin libraries (skinHD.swf, skinHDHud.swf, etc.) are loaded
unconditionally on Win64/Durango/Orbis, and they import the Iggy
library "platformskinHD.swf" by name. However, the platform skin
path and registration name were gated behind a runtime resolution
check (m_fScreenHeight > 720.0f), so at exactly 720p the skin was
registered as "platformskin.swf" instead, and below 720p the non-HD
.swf file was loaded entirely. This caused Iggy to fail resolving
the import, which cascaded into a failed scene load and hit a
__debugbreak().

Always use the HD platform skin on these platforms since the HD
libraries that depend on it are always loaded regardless of
resolution. PS3/PSVita are unaffected as they have their own
non-HD skin loading path.
@MrTheShy
Copy link
Contributor Author

MrTheShy commented Mar 8, 2026

@codeHusky to be merged, really easy to review, tested

@codeHusky
Copy link
Collaborator

are you sure forcing HD makes sense? you can still play consoles at 720p

@MrTheShy
Copy link
Contributor Author

MrTheShy commented Mar 8, 2026

For now yes, it would me much more invasive doing otherwise, i also have in program to address this better, for now it's good, provides good visibility at pretty much any resolutions from my tests

@codeHusky codeHusky merged commit 3c52436 into smartcmd:main Mar 8, 2026
1 check passed
@codeHusky
Copy link
Collaborator

@MrTheShy We have multiple players reporting that at non-HD resolutions the HD textures are blurry. realistically you need to fix whatever the root cause was in sub-HD resolutions as iggy scales things super blurry with HD assets.
image
image

piebotc pushed a commit to piebotc/LegacyEvolved that referenced this pull request Mar 9, 2026
The HD skin libraries (skinHD.swf, skinHDHud.swf, etc.) are loaded
unconditionally on Win64/Durango/Orbis, and they import the Iggy
library "platformskinHD.swf" by name. However, the platform skin
path and registration name were gated behind a runtime resolution
check (m_fScreenHeight > 720.0f), so at exactly 720p the skin was
registered as "platformskin.swf" instead, and below 720p the non-HD
.swf file was loaded entirely. This caused Iggy to fail resolving
the import, which cascaded into a failed scene load and hit a
__debugbreak().

Always use the HD platform skin on these platforms since the HD
libraries that depend on it are always loaded regardless of
resolution. PS3/PSVita are unaffected as they have their own
non-HD skin loading path.
Kamenkovic pushed a commit to Kamenkovic/FpsLimit that referenced this pull request Mar 9, 2026
The HD skin libraries (skinHD.swf, skinHDHud.swf, etc.) are loaded
unconditionally on Win64/Durango/Orbis, and they import the Iggy
library "platformskinHD.swf" by name. However, the platform skin
path and registration name were gated behind a runtime resolution
check (m_fScreenHeight > 720.0f), so at exactly 720p the skin was
registered as "platformskin.swf" instead, and below 720p the non-HD
.swf file was loaded entirely. This caused Iggy to fail resolving
the import, which cascaded into a failed scene load and hit a
__debugbreak().

Always use the HD platform skin on these platforms since the HD
libraries that depend on it are always loaded regardless of
resolution. PS3/PSVita are unaffected as they have their own
non-HD skin loading path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Running the game at 1280x720 causes issues

2 participants