diff --git a/r5dev/r5dev.vcxproj b/r5dev/r5dev.vcxproj index fd871a4a..396ad026 100644 --- a/r5dev/r5dev.vcxproj +++ b/r5dev/r5dev.vcxproj @@ -197,6 +197,7 @@ + @@ -216,6 +217,7 @@ + diff --git a/r5dev/r5dev.vcxproj.filters b/r5dev/r5dev.vcxproj.filters index 9dd551c3..e62156fb 100644 --- a/r5dev/r5dev.vcxproj.filters +++ b/r5dev/r5dev.vcxproj.filters @@ -75,6 +75,9 @@ Source Files + + Source Files + @@ -140,6 +143,9 @@ Header Files + + Header Files + diff --git a/r5dev/src/dllmain.cpp b/r5dev/src/dllmain.cpp index eca872f9..34df4dad 100644 --- a/r5dev/src/dllmain.cpp +++ b/r5dev/src/dllmain.cpp @@ -3,6 +3,7 @@ #include "r5dev.h" #include "id3dx.h" +#include "input.h" #include "hooks.h" #include "opcptc.h" #include "console.h" @@ -10,15 +11,18 @@ /////////////////////////////////////////////////////////////////////////////////// //--------------------------------------------------------------------------------- -// Init +// Initialization //--------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////// void InitializeR5Dev() { - SetupConsole(); + SetupConsole(); InstallHooks(); + InstallIPHooks(); + InstallDXHooks(); InstallOpcodes(); + SetupDXSwapChain(); printf("+-----------------------------------------------------------------------------+\n"); printf("| R5 DEV -- INITIALIZED ------------------------------------------------- |\n"); printf("+-----------------------------------------------------------------------------+\n"); @@ -28,7 +32,9 @@ void InitializeR5Dev() void TerminateR5Dev() { RemoveHooks(); - FreeConsole(); + RemoveIPHooks(); + RemoveDXHooks(); + FreeConsole(); } /////////////////////////////////////////////////////////////////////////////////// @@ -45,14 +51,12 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) case DLL_PROCESS_ATTACH: { InitializeR5Dev(); - SetupDXSwapChain(); break; } case DLL_PROCESS_DETACH: { TerminateR5Dev(); - RemoveDXHooks(); break; } }