Cleanup again

merge-requests/28/head
Nemirtingas 2019-08-27 16:29:20 +02:00
parent 04847abeb7
commit 36e8966223
9 changed files with 6 additions and 45 deletions

View File

@ -1,16 +1,11 @@
#include "Base_Hook.h" #include "Base_Hook.h"
#include "Hook_Manager.h"
#ifndef NO_OVERLAY #ifndef NO_OVERLAY
#include <algorithm> #include <algorithm>
#include "Hook_Manager.h"
#include "../detours/detours.h" #include "../detours/detours.h"
#define WIN32_LEAN_AND_MEAN
#define VC_EXTRALEAN
#include <Windows.h>
Base_Hook::Base_Hook(): Base_Hook::Base_Hook():
_library(nullptr) _library(nullptr)
{} {}

View File

@ -1,13 +1,13 @@
#ifndef __INCLUDED_BASE_HOOK_H__ #ifndef __INCLUDED_BASE_HOOK_H__
#define __INCLUDED_BASE_HOOK_H__ #define __INCLUDED_BASE_HOOK_H__
#include "../dll/base.h"
#ifndef NO_OVERLAY #ifndef NO_OVERLAY
#include <vector> #include <vector>
#include <utility> #include <utility>
#include "../dll/base.h"
class Base_Hook class Base_Hook
{ {
protected: protected:

View File

@ -36,13 +36,6 @@ private:
decltype(&IDXGISwapChain::ResizeBuffers) ResizeBuffers; decltype(&IDXGISwapChain::ResizeBuffers) ResizeBuffers;
decltype(&IDXGISwapChain::ResizeTarget) ResizeTarget; 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: public:
virtual ~DX10_Hook(); virtual ~DX10_Hook();

View File

@ -36,13 +36,6 @@ private:
decltype(&IDXGISwapChain::ResizeBuffers) ResizeBuffers; decltype(&IDXGISwapChain::ResizeBuffers) ResizeBuffers;
decltype(&IDXGISwapChain::ResizeTarget) ResizeTarget; 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: public:
virtual ~DX11_Hook(); virtual ~DX11_Hook();

View File

@ -42,11 +42,6 @@ private:
decltype(&ID3D12CommandQueue::ExecuteCommandLists) ExecuteCommandLists; decltype(&ID3D12CommandQueue::ExecuteCommandLists) ExecuteCommandLists;
decltype(&ID3D12GraphicsCommandList::Close) Close; decltype(&ID3D12GraphicsCommandList::Close) Close;
// Hook functions so we know we use DX11
//static decltype(D3D12CreateDevice) MyD3D12CreateDevice;
//decltype(D3D12CreateDevice)* D3D12CreateDevice;
public: public:
virtual ~DX12_Hook(); virtual ~DX12_Hook();

View File

@ -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 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); 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: public:
virtual ~DX9_Hook(); virtual ~DX9_Hook();

View File

@ -10,7 +10,6 @@ public:
static constexpr const char *DLL_NAME = "opengl32.dll"; static constexpr const char *DLL_NAME = "opengl32.dll";
using wglSwapBuffers_t = BOOL(WINAPI*)(HDC); using wglSwapBuffers_t = BOOL(WINAPI*)(HDC);
//using wglMakeCurrent_t = BOOL(WINAPI*)(HDC, HGLRC);
private: private:
static OpenGL_Hook* _inst; static OpenGL_Hook* _inst;
@ -29,11 +28,6 @@ private:
static BOOL WINAPI MywglSwapBuffers(HDC hDC); static BOOL WINAPI MywglSwapBuffers(HDC hDC);
wglSwapBuffers_t wglSwapBuffers; wglSwapBuffers_t wglSwapBuffers;
// Hook functions so we know we use OGL
//static BOOL WINAPI MywglMakeCurrent(HDC hDC, HGLRC hGLRC);
//wglMakeCurrent_t wglMakeCurrent;
public: public:
virtual ~OpenGL_Hook(); virtual ~OpenGL_Hook();

View File

@ -1,6 +1,4 @@
#include "Renderer_Detector.h" #include "Renderer_Detector.h"
#include "../detours/detours.h"
#include "Hook_Manager.h" #include "Hook_Manager.h"
#ifdef STEAM_WIN32 #ifdef STEAM_WIN32

View File

@ -2,11 +2,11 @@
#define __INCLUDED_RENDERER_DETECTOR_H__ #define __INCLUDED_RENDERER_DETECTOR_H__
#include "Base_Hook.h" #include "Base_Hook.h"
#include <thread>
#ifndef NO_OVERLAY #ifndef NO_OVERLAY
#if defined(_WIN32) || defined(WIN32) #ifdef STEAM_WIN32
#include <Windows.h>
struct IDXGISwapChain; struct IDXGISwapChain;
struct IDirect3DDevice9; struct IDirect3DDevice9;
struct IDirect3DDevice9Ex; struct IDirect3DDevice9Ex;