Fix crash when launching at 720p or lower resolutions (#981)
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.
This commit is contained in:
@@ -529,43 +529,24 @@ void UIController::loadSkins()
|
|||||||
#elif defined __PSVITA__
|
#elif defined __PSVITA__
|
||||||
platformSkinPath = L"skinVita.swf";
|
platformSkinPath = L"skinVita.swf";
|
||||||
#elif defined _WINDOWS64
|
#elif defined _WINDOWS64
|
||||||
if(m_fScreenHeight>720.0f)
|
// Windows64/Durango/Orbis always load HD skin libraries unconditionally,
|
||||||
{
|
// which import "platformskinHD.swf" by name. The platform skin must
|
||||||
|
// therefore always be the HD variant regardless of screen resolution.
|
||||||
platformSkinPath = L"skinHDWin.swf";
|
platformSkinPath = L"skinHDWin.swf";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
platformSkinPath = L"skinWin.swf";
|
|
||||||
}
|
|
||||||
#elif defined _DURANGO
|
#elif defined _DURANGO
|
||||||
if(m_fScreenHeight>720.0f)
|
|
||||||
{
|
|
||||||
platformSkinPath = L"skinHDDurango.swf";
|
platformSkinPath = L"skinHDDurango.swf";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
platformSkinPath = L"skinDurango.swf";
|
|
||||||
}
|
|
||||||
#elif defined __ORBIS__
|
#elif defined __ORBIS__
|
||||||
if(m_fScreenHeight>720.0f)
|
|
||||||
{
|
|
||||||
platformSkinPath = L"skinHDOrbis.swf";
|
platformSkinPath = L"skinHDOrbis.swf";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
platformSkinPath = L"skinOrbis.swf";
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// Every platform has one of these, so nothing shared
|
// Every platform has one of these, so nothing shared.
|
||||||
if(m_fScreenHeight>720.0f)
|
// On HD platforms (Win64/Durango/Orbis) the skin libraries always import
|
||||||
{
|
// "platformskinHD.swf", so we must register under that name at any resolution.
|
||||||
|
#if defined(_WINDOWS64) || defined(_DURANGO) || defined(__ORBIS__)
|
||||||
m_iggyLibraries[eLibrary_Platform] = loadSkin(platformSkinPath, L"platformskinHD.swf");
|
m_iggyLibraries[eLibrary_Platform] = loadSkin(platformSkinPath, L"platformskinHD.swf");
|
||||||
}
|
#else
|
||||||
else
|
|
||||||
{
|
|
||||||
m_iggyLibraries[eLibrary_Platform] = loadSkin(platformSkinPath, L"platformskin.swf");
|
m_iggyLibraries[eLibrary_Platform] = loadSkin(platformSkinPath, L"platformskin.swf");
|
||||||
}
|
#endif
|
||||||
|
|
||||||
#if defined(__PS3__) || defined(__PSVITA__)
|
#if defined(__PS3__) || defined(__PSVITA__)
|
||||||
m_iggyLibraries[eLibrary_GraphicsDefault] = loadSkin(L"skinGraphics.swf", L"skinGraphics.swf");
|
m_iggyLibraries[eLibrary_GraphicsDefault] = loadSkin(L"skinGraphics.swf", L"skinGraphics.swf");
|
||||||
|
|||||||
Reference in New Issue
Block a user