From 63301568ac1beafc0f07f211fbdc05318158129c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20R=C3=A4nnare?= Date: Mon, 16 Nov 2020 08:41:47 +0100 Subject: [PATCH] Fixed the correct path to load the modio.dll from --- Source/modio/Private/ModioModule.cpp | 6 +++--- Source/modio/Public/ModioModule.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/modio/Private/ModioModule.cpp b/Source/modio/Private/ModioModule.cpp index 8427611..9b8c71d 100644 --- a/Source/modio/Private/ModioModule.cpp +++ b/Source/modio/Private/ModioModule.cpp @@ -84,8 +84,9 @@ void FModioModule::StartupModule() // Load the DLL on windows #if PLATFORM_WINDOWS FString DllPath = IPluginManager::Get().FindPlugin("Modio")->GetBaseDir(); - DllPath.Append("/Source/ThirdParty/mod.io-sdk/bin/win64/modio.dll"); + DllPath.Append("/Source/ThirdParty/mod.io-sdk/bin/msvc/x64/modio.dll"); DLLHandle = FPlatformProcess::GetDllHandle(*DllPath); + check(DLLHandle); // This should only happen in our testing environment the path the dll has changed #endif const UModioSettings *Settings = GetDefault(); @@ -113,7 +114,7 @@ void FModioModule::ShutdownModule() } #if PLATFORM_WINDOWS - if (DLLHandle != NULL) + if (DLLHandle != nullptr) { FPlatformProcess::FreeDllHandle(DLLHandle); } @@ -144,7 +145,6 @@ bool FModioModule::HandleSettingsSaved() Settings->SaveConfig(); } - UE_LOG(LogTemp, Log, TEXT("Settings->bIsLiveEnvironment = %s"), Settings->bIsLiveEnvironment ? TEXT("TRUE") : TEXT("FALSE") ); ModioImp = FModioSubsystem::Create(Settings->RootDirectory, Settings->bRootDirectoryIsInUserSettingsDirectory, Settings->GameId, Settings->ApiKey, Settings->bIsLiveEnvironment, Settings->bInstallOnModDownload, Settings->bRetrieveModsFromOtherGames, Settings->bEnablePolling); return true; diff --git a/Source/modio/Public/ModioModule.h b/Source/modio/Public/ModioModule.h index 28e4e4d..8b3da07 100644 --- a/Source/modio/Public/ModioModule.h +++ b/Source/modio/Public/ModioModule.h @@ -22,6 +22,6 @@ class FModioModule : public IModuleInterface FModioSubsystemPtr ModioImp; #if PLATFORM_WINDOWS - void* DLLHandle; + void* DLLHandle = nullptr; #endif }; \ No newline at end of file