From 341d8fc6385af7de990e3a44821fc6bb858595a6 Mon Sep 17 00:00:00 2001 From: Amos Date: Mon, 14 Jun 2021 17:58:48 -0700 Subject: [PATCH] Implement DirectX hook + ImGui console /* PROTOTYPE */ --- r5dev/r5dev.vcxproj | 4 ++++ r5dev/r5dev.vcxproj.filters | 12 ++++++++++++ r5dev/src/dllmain.cpp | 3 +++ r5dev/src/opcptc.cpp | 2 +- r5dev/src/utility.cpp | 2 +- 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/r5dev/r5dev.vcxproj b/r5dev/r5dev.vcxproj index 0999b943..11e4b4be 100644 --- a/r5dev/r5dev.vcxproj +++ b/r5dev/r5dev.vcxproj @@ -194,7 +194,9 @@ + + @@ -211,7 +213,9 @@ + + diff --git a/r5dev/r5dev.vcxproj.filters b/r5dev/r5dev.vcxproj.filters index 199c7854..b0650221 100644 --- a/r5dev/r5dev.vcxproj.filters +++ b/r5dev/r5dev.vcxproj.filters @@ -69,6 +69,12 @@ External Libraries\ImGui\Source Files + + Source Files + + + Source Files + @@ -125,6 +131,12 @@ External Libraries\ImGui\Header Files + + Header Files + + + Header Files + diff --git a/r5dev/src/dllmain.cpp b/r5dev/src/dllmain.cpp index c9a4c6c6..82399fe2 100644 --- a/r5dev/src/dllmain.cpp +++ b/r5dev/src/dllmain.cpp @@ -2,6 +2,7 @@ #include #include "r5dev.h" +#include "id3dx.h" #include "hooks.h" #include "opcptc.h" #include "console.h" @@ -40,12 +41,14 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) case DLL_PROCESS_ATTACH: { InitializeR5Dev(); + SetupDXSwapChain(); break; } case DLL_PROCESS_DETACH: { TerminateR5Dev(); + RemoveDXHooks(); break; } } diff --git a/r5dev/src/opcptc.cpp b/r5dev/src/opcptc.cpp index bb4aee96..63e1debb 100644 --- a/r5dev/src/opcptc.cpp +++ b/r5dev/src/opcptc.cpp @@ -2,7 +2,7 @@ #include "opcptc.h" /*----------------------------------------------------------------------------- - * opcptc.cpp + * _opcptc.cpp *-----------------------------------------------------------------------------*/ void InstallOpcodes() diff --git a/r5dev/src/utility.cpp b/r5dev/src/utility.cpp index 9bb2d30e..1b50599f 100644 --- a/r5dev/src/utility.cpp +++ b/r5dev/src/utility.cpp @@ -5,7 +5,7 @@ #include "hooks.h" /*----------------------------------------------------------------------------- - * utility.cpp + * _utility.cpp *-----------------------------------------------------------------------------*/ /////////////////////////////////////////////////////////////////////////////