Create host device after loading the module if the installer wasn't run.

This commit is contained in:
Skyth 2024-12-11 22:02:00 +03:00
parent 06242223a3
commit 25ff2ca2e5
3 changed files with 14 additions and 13 deletions

View file

@ -222,17 +222,14 @@ void ImFontAtlasSnapshot::GenerateGlyphRanges()
} }
} }
if (App::s_isInit) for (size_t i = XDBF_LANGUAGE_ENGLISH; i <= XDBF_LANGUAGE_ITALIAN; i++)
{ {
for (size_t i = XDBF_LANGUAGE_ENGLISH; i <= XDBF_LANGUAGE_ITALIAN; i++) auto achievements = g_xdbfWrapper.GetAchievements(static_cast<EXDBFLanguage>(i));
for (auto& achievement : achievements)
{ {
auto achievements = g_xdbfWrapper.GetAchievements(static_cast<EXDBFLanguage>(i)); GetGlyphs(glyphs, achievement.Name);
for (auto& achievement : achievements) GetGlyphs(glyphs, achievement.UnlockedDesc);
{ GetGlyphs(glyphs, achievement.LockedDesc);
GetGlyphs(glyphs, achievement.Name);
GetGlyphs(glyphs, achievement.UnlockedDesc);
GetGlyphs(glyphs, achievement.LockedDesc);
}
} }
} }

View file

@ -34,7 +34,7 @@ struct ImDrawDataSnapshot
// Undefine this to generate a font atlas file in working directory. // Undefine this to generate a font atlas file in working directory.
// You also need to do this if you are testing localization, as only // You also need to do this if you are testing localization, as only
// characters in the locale get added to the atlas. // characters in the locale get added to the atlas.
//#define ENABLE_IM_FONT_ATLAS_SNAPSHOT #define ENABLE_IM_FONT_ATLAS_SNAPSHOT
struct ImFontAtlasSnapshot struct ImFontAtlasSnapshot
{ {

View file

@ -156,11 +156,12 @@ int main(int argc, char *argv[])
HostStartup(); HostStartup();
Video::CreateHostDevice();
bool isGameInstalled = Installer::checkGameInstall("."); bool isGameInstalled = Installer::checkGameInstall(".");
if (forceInstaller || forceDLCInstaller || !isGameInstalled) bool runInstallerWizard = forceInstaller || forceDLCInstaller || !isGameInstalled;
if (runInstallerWizard)
{ {
Video::CreateHostDevice();
if (!InstallerWizard::Run(isGameInstalled && forceDLCInstaller)) if (!InstallerWizard::Run(isGameInstalled && forceDLCInstaller))
{ {
return 1; return 1;
@ -173,6 +174,9 @@ int main(int argc, char *argv[])
uint32_t entry = LdrLoadModule(FileSystem::TransformPath(GAME_XEX_PATH)); uint32_t entry = LdrLoadModule(FileSystem::TransformPath(GAME_XEX_PATH));
if (!runInstallerWizard)
Video::CreateHostDevice();
Video::StartPipelinePrecompilation(); Video::StartPipelinePrecompilation();
GuestThread::Start(entry); GuestThread::Start(entry);