Skip to content

Commit

Permalink
feat(SKSE): Support new SKSE init procedure.
Browse files Browse the repository at this point in the history
  • Loading branch information
Force67 committed Apr 29, 2022
1 parent 78bd5f1 commit 1928f34
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Code/client/ScriptExtender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,21 @@ void LoadScriptExender()
}
#endif

if (LoadLibraryW(needle->c_str()))
if (auto* pSKSELibraryHandle = LoadLibraryW(needle->c_str()))
{
spdlog::info("Successfully loaded {} {}", needle->string(), skseVersion);
spdlog::info("Be aware that messages that start without a colored [timestamp] prefix are logs from the "
"Script Extender and its loaded mods.");
if (auto* pStartSKSE = reinterpret_cast<void (*)()>(GetProcAddress(pSKSELibraryHandle, "StartSKSE")))
{
spdlog::info(
"Starting SKSE {}... be aware that messages that start without a colored [timestamp] prefix are "
"logs from the "
"Script Extender and its loaded mods.",
skseVersion);

pStartSKSE();
spdlog::info("SKSE is active");
}
else
spdlog::warn("SKSE dll doesn't expose StartSKSE(), it may be outdated.");
}
else
{
Expand Down

0 comments on commit 1928f34

Please sign in to comment.