Skip to content

Commit 47a570c

Browse files
committed
update for CP 1.5 and R4E 1.4
1 parent 193cd51 commit 47a570c

File tree

4 files changed

+20
-36
lines changed

4 files changed

+20
-36
lines changed
-1.43 MB
Binary file not shown.

deps/red4ext.sdk

Submodule red4ext.sdk updated 1028 files

src/Main.cpp

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -186,48 +186,32 @@ void LoadInputConfigs() {
186186
return;
187187
}
188188

189-
BOOL APIENTRY DllMain(HMODULE aModule, DWORD aReason, LPVOID aReserved)
189+
RED4EXT_C_EXPORT bool RED4EXT_CALL Main(RED4ext::PluginHandle aHandle, RED4ext::EMainReason aReason, const RED4ext::Sdk* aSdk)
190190
{
191-
switch (aReason)
192-
{
193-
case DLL_PROCESS_ATTACH:
194-
{
195-
DisableThreadLibraryCalls(aModule);
196-
197-
Utils::CreateLogger();
198-
spdlog::info("Starting up");
199-
LoadInputConfigs();
200-
201-
break;
202-
}
203-
case DLL_PROCESS_DETACH:
204-
{
205-
spdlog::info("Shutting down");
206-
spdlog::shutdown();
207-
208-
break;
209-
}
191+
switch (aReason) {
192+
case RED4ext::EMainReason::Load: {
193+
//DisableThreadLibraryCalls(aHandle);
194+
195+
Utils::CreateLogger();
196+
spdlog::info("Starting up");
197+
LoadInputConfigs();
198+
break;
199+
}
200+
case RED4ext::EMainReason::Unload: {
201+
spdlog::info("Shutting down");
202+
spdlog::shutdown();
203+
break;
204+
}
210205
}
211206

212-
return TRUE;
213-
}
214-
215-
RED4EXT_C_EXPORT bool RED4EXT_CALL Load(RED4ext::PluginHandle aHandle, const RED4ext::IRED4ext* aInterface)
216-
{
217-
218-
return true;
219-
}
220-
221-
RED4EXT_C_EXPORT void RED4EXT_CALL Unload()
222-
{
223-
207+
return true;
224208
}
225209

226210
RED4EXT_C_EXPORT void RED4EXT_CALL Query(RED4ext::PluginInfo* aInfo)
227211
{
228212
aInfo->name = L"Input Loader";
229213
aInfo->author = L"Jack Humbert";
230-
aInfo->version = RED4EXT_SEMVER(0, 0, 1);
214+
aInfo->version = RED4EXT_SEMVER(0, 0, 2);
231215
aInfo->runtime = RED4EXT_RUNTIME_LATEST;
232216
aInfo->sdk = RED4EXT_SDK_LATEST;
233217
}

src/input_loader.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
5454
<LinkIncremental>false</LinkIncremental>
5555
<OutDir>$(SolutionDir)build\release\bin\</OutDir>
56-
<IncludePath>../deps/red4ext.sdk/include;../deps/spdlog/include;../deps/detours/include;../deps/pugixml/src;$(IncludePath);</IncludePath>
57-
<LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);../deps/spdlog/build/Release;../deps/detours/lib.X64;../deps/pugixml/src</LibraryPath>
56+
<IncludePath>../deps/red4ext.sdk/include;../deps/spdlog/include;../deps/detours/src;../deps/pugixml/src;$(IncludePath);</IncludePath>
57+
<LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);../deps/spdlog/build/Release;../deps/detours/lib.X64;</LibraryPath>
5858
<SourcePath>$(VC_SourcePath);../deps/pugixml/src;</SourcePath>
5959
</PropertyGroup>
6060
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

0 commit comments

Comments
 (0)