From 36e8966223bd5ebce3c4a67b1da218e8b9f0373f Mon Sep 17 00:00:00 2001 From: Nemirtingas Date: Tue, 27 Aug 2019 16:29:20 +0200 Subject: [PATCH] Cleanup again --- overlay_experimental/Base_Hook.cpp | 7 +------ overlay_experimental/Base_Hook.h | 4 ++-- overlay_experimental/DX10_Hook.h | 7 ------- overlay_experimental/DX11_Hook.h | 7 ------- overlay_experimental/DX12_Hook.h | 5 ----- overlay_experimental/DX9_Hook.h | 7 ------- overlay_experimental/OpenGL_Hook.h | 6 ------ overlay_experimental/Renderer_Detector.cpp | 2 -- overlay_experimental/Renderer_Detector.h | 6 +++--- 9 files changed, 6 insertions(+), 45 deletions(-) diff --git a/overlay_experimental/Base_Hook.cpp b/overlay_experimental/Base_Hook.cpp index 6189f2a..34ff4f6 100644 --- a/overlay_experimental/Base_Hook.cpp +++ b/overlay_experimental/Base_Hook.cpp @@ -1,16 +1,11 @@ #include "Base_Hook.h" +#include "Hook_Manager.h" #ifndef NO_OVERLAY #include -#include "Hook_Manager.h" - #include "../detours/detours.h" -#define WIN32_LEAN_AND_MEAN -#define VC_EXTRALEAN -#include - Base_Hook::Base_Hook(): _library(nullptr) {} diff --git a/overlay_experimental/Base_Hook.h b/overlay_experimental/Base_Hook.h index 28fdcdb..55028f7 100644 --- a/overlay_experimental/Base_Hook.h +++ b/overlay_experimental/Base_Hook.h @@ -1,13 +1,13 @@ #ifndef __INCLUDED_BASE_HOOK_H__ #define __INCLUDED_BASE_HOOK_H__ -#include "../dll/base.h" - #ifndef NO_OVERLAY #include #include +#include "../dll/base.h" + class Base_Hook { protected: diff --git a/overlay_experimental/DX10_Hook.h b/overlay_experimental/DX10_Hook.h index 972be00..63921ff 100644 --- a/overlay_experimental/DX10_Hook.h +++ b/overlay_experimental/DX10_Hook.h @@ -36,13 +36,6 @@ private: decltype(&IDXGISwapChain::ResizeBuffers) ResizeBuffers; decltype(&IDXGISwapChain::ResizeTarget) ResizeTarget; - // Hook functions so we know we use DX10 - //static decltype(D3D10CreateDevice) MyD3D10CreateDevice; - //static decltype(D3D10CreateDeviceAndSwapChain) MyD3D10CreateDeviceAndSwapChain; - - //decltype(D3D10CreateDevice)* _D3D10CreateDevice; - //decltype(D3D10CreateDeviceAndSwapChain)* D3D10CreateDeviceAndSwapChain; - public: virtual ~DX10_Hook(); diff --git a/overlay_experimental/DX11_Hook.h b/overlay_experimental/DX11_Hook.h index a56bc66..bf2074d 100644 --- a/overlay_experimental/DX11_Hook.h +++ b/overlay_experimental/DX11_Hook.h @@ -36,13 +36,6 @@ private: decltype(&IDXGISwapChain::ResizeBuffers) ResizeBuffers; decltype(&IDXGISwapChain::ResizeTarget) ResizeTarget; - // Hook functions so we know we use DX11 - //static decltype(D3D11CreateDevice) MyD3D11CreateDevice; - //static decltype(D3D11CreateDeviceAndSwapChain) MyD3D11CreateDeviceAndSwapChain; - - //decltype(D3D11CreateDevice)* D3D11CreateDevice; - //decltype(D3D11CreateDeviceAndSwapChain)* D3D11CreateDeviceAndSwapChain; - public: virtual ~DX11_Hook(); diff --git a/overlay_experimental/DX12_Hook.h b/overlay_experimental/DX12_Hook.h index 7bf7fa4..5cfb7ee 100644 --- a/overlay_experimental/DX12_Hook.h +++ b/overlay_experimental/DX12_Hook.h @@ -42,11 +42,6 @@ private: decltype(&ID3D12CommandQueue::ExecuteCommandLists) ExecuteCommandLists; decltype(&ID3D12GraphicsCommandList::Close) Close; - // Hook functions so we know we use DX11 - //static decltype(D3D12CreateDevice) MyD3D12CreateDevice; - - //decltype(D3D12CreateDevice)* D3D12CreateDevice; - public: virtual ~DX12_Hook(); diff --git a/overlay_experimental/DX9_Hook.h b/overlay_experimental/DX9_Hook.h index 28f35ab..974c8c8 100644 --- a/overlay_experimental/DX9_Hook.h +++ b/overlay_experimental/DX9_Hook.h @@ -37,13 +37,6 @@ private: static HRESULT STDMETHODCALLTYPE MyPresent(IDirect3DDevice9* _this, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion); static HRESULT STDMETHODCALLTYPE MyPresentEx(IDirect3DDevice9Ex* _this, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion, DWORD dwFlags); - // Hook functions so we know we use DX9 - //static decltype(Direct3DCreate9) MyDirect3DCreate9; - //static decltype(Direct3DCreate9Ex) MyDirect3DCreate9Ex; - - //decltype(Direct3DCreate9)* Direct3DCreate9; - //decltype(Direct3DCreate9Ex)* Direct3DCreate9Ex; - public: virtual ~DX9_Hook(); diff --git a/overlay_experimental/OpenGL_Hook.h b/overlay_experimental/OpenGL_Hook.h index bf45754..b0d8a45 100644 --- a/overlay_experimental/OpenGL_Hook.h +++ b/overlay_experimental/OpenGL_Hook.h @@ -10,7 +10,6 @@ public: static constexpr const char *DLL_NAME = "opengl32.dll"; using wglSwapBuffers_t = BOOL(WINAPI*)(HDC); - //using wglMakeCurrent_t = BOOL(WINAPI*)(HDC, HGLRC); private: static OpenGL_Hook* _inst; @@ -29,11 +28,6 @@ private: static BOOL WINAPI MywglSwapBuffers(HDC hDC); wglSwapBuffers_t wglSwapBuffers; - - // Hook functions so we know we use OGL - //static BOOL WINAPI MywglMakeCurrent(HDC hDC, HGLRC hGLRC); - - //wglMakeCurrent_t wglMakeCurrent; public: virtual ~OpenGL_Hook(); diff --git a/overlay_experimental/Renderer_Detector.cpp b/overlay_experimental/Renderer_Detector.cpp index 90495f4..a182899 100644 --- a/overlay_experimental/Renderer_Detector.cpp +++ b/overlay_experimental/Renderer_Detector.cpp @@ -1,6 +1,4 @@ #include "Renderer_Detector.h" - -#include "../detours/detours.h" #include "Hook_Manager.h" #ifdef STEAM_WIN32 diff --git a/overlay_experimental/Renderer_Detector.h b/overlay_experimental/Renderer_Detector.h index 8f72d3c..04f20b2 100644 --- a/overlay_experimental/Renderer_Detector.h +++ b/overlay_experimental/Renderer_Detector.h @@ -2,11 +2,11 @@ #define __INCLUDED_RENDERER_DETECTOR_H__ #include "Base_Hook.h" +#include + #ifndef NO_OVERLAY -#if defined(_WIN32) || defined(WIN32) -#include - +#ifdef STEAM_WIN32 struct IDXGISwapChain; struct IDirect3DDevice9; struct IDirect3DDevice9Ex;