Skip to content

Commit

Permalink
load global settings before modulemanager
Browse files Browse the repository at this point in the history
this will totally not break anything
  • Loading branch information
Imrglop committed Aug 25, 2024
1 parent 5f4d0c6 commit 0d428ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/client/Latite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ DWORD __stdcall startThread(HINSTANCE dll) {
Logger::Info(XOR_STRING("Loaded master config"));
}


Latite::get().initSettings();
Latite::getConfigManager().applyGlobalConfig();

new (mmgrBuf) ModuleManager;
new (commandMgrBuf) CommandManager;
Expand Down Expand Up @@ -287,9 +288,6 @@ DWORD __stdcall startThread(HINSTANCE dll) {
std::this_thread::sleep_for(10ms);
}

Latite::get().initSettings();
Latite::getConfigManager().applyGlobalConfig();

Latite::get().initialize(dll);

Logger::Info(XOR_STRING("Initialized Latite Client"));
Expand Down
5 changes: 3 additions & 2 deletions src/client/script/class/impl/JsModuleClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,10 @@ JsValueRef JsModuleClass::moduleAddEnumSetting(JsValueRef callee, bool isConstru
for (int i = 0; i < Chakra::GetIntProperty(values, L"length"); i++) {
JsValueRef obj = JS_INVALID_REFERENCE;
JS::JsGetIndexedProperty(values, Chakra::MakeInt(i), &obj);
auto entryName = Chakra::GetStringProperty(obj, L"name");
auto entryDesc = Chakra::GetStringProperty(obj, L"desc");

if (obj != JS_INVALID_REFERENCE) {
auto entryName = Chakra::GetStringProperty(obj, L"name");
auto entryDesc = Chakra::GetStringProperty(obj, L"desc");
set->enumData->addEntry(EnumEntry{ i, entryName, entryDesc });
}
}
Expand Down

0 comments on commit 0d428ae

Please sign in to comment.