Browse Source

Perform some basic initialization before loading game data

pull/5819/head
staphen 3 years ago committed by Anders Jenbo
parent
commit
3c144c7967
  1. 12
      Source/diablo.cpp

12
Source/diablo.cpp

@ -1109,7 +1109,7 @@ void CheckArchivesUpToDate()
}
}
void DiabloInit()
void ApplicationInit()
{
if (*sgOptions.Graphics.showFPS)
EnableFrameCount();
@ -1130,6 +1130,11 @@ void DiabloInit()
SetApplicationVersions();
ReadOnlyTest();
}
void DiabloInit()
{
for (size_t i = 0; i < QUICK_MESSAGE_OPTIONS; i++) {
auto &messages = sgOptions.Chat.szHotKeyMsgs[i];
if (messages.empty()) {
@ -1144,8 +1149,6 @@ void DiabloInit()
UiInitialize();
was_ui_init = true;
ReadOnlyTest();
if (gbIsHellfire && !forceHellfire && *sgOptions.StartUp.gameMode == StartUpGameMode::Ask) {
UiSelStartUpGameOption();
if (!gbIsHellfire) {
@ -2414,6 +2417,9 @@ int DiabloMain(int argc, char **argv)
// Then look for a voice pack file based on the selected translation
LoadLanguageArchive();
ApplicationInit();
SaveOptions();
// Finally load game data
LoadGameArchives();

Loading…
Cancel
Save