From a1f5e733b2b63c3abea95e89e71fddd11219a903 Mon Sep 17 00:00:00 2001 From: HW12Dev <26612968+HW12Dev@users.noreply.github.com> Date: Sat, 25 Feb 2023 13:21:10 +1100 Subject: [PATCH] Update main.cpp --- DInputProxy/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DInputProxy/main.cpp b/DInputProxy/main.cpp index 40bb18d..88dae5e 100644 --- a/DInputProxy/main.cpp +++ b/DInputProxy/main.cpp @@ -27,8 +27,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) if (fdwReason == DLL_PROCESS_ATTACH) { if (std::filesystem::exists("./Retail/AchievementHandler.dll")) { - SteamAPI_Init(); - g_AchievementHandler =LoadLibrary("AchievementHandler"); + if (SteamAPI_Init()) { + g_AchievementHandler = LoadLibrary("AchievementHandler"); + } } if (!GetSystemDirectoryW(s_PathBuffer, sizeof(s_PathBuffer) / sizeof(wchar_t))) return false;