Skip to content

Commit

Permalink
fix: Block SKSE Plugin Preloader for compatabiliy reasons.
Browse files Browse the repository at this point in the history
  • Loading branch information
Force67 committed Dec 21, 2021
1 parent 8e1d71a commit 0d5d0e4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Code/immersive_launcher/Launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ namespace launcher
{
static LaunchContext* g_context = nullptr;

static void PreloadSystemDlls()
{
auto systemDlls = {L"\\dinput8.dll", // < Skyrim early init hook
L"\\dsound.dll", // breaks DSound init in game code
// X360CE v3 is buggy with COM hooks
L"\\xinput9_1_0.dll", L"\\xinput1_1.dll", L"\\xinput1_2.dll", L"\\xinput1_3.dll",
L"\\xinput1_4.dll", L"\\version.dll"};

for (auto dll : systemDlls)
{
LoadLibraryW(dll);
}
}

LaunchContext* GetLaunchContext()
{
if (!g_context)
Expand All @@ -44,6 +58,8 @@ LaunchContext* GetLaunchContext()

int StartUp(int argc, char** argv)
{
PreloadSystemDlls();

// VK_E
bool askSelect = (GetAsyncKeyState(0x45) & 0x8000);
for (int i = 1; i < argc; i++)
Expand Down

0 comments on commit 0d5d0e4

Please sign in to comment.