mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 11:44:53 +01:00
Added error handling when hook fails
This commit is contained in:
parent
71d3e301c2
commit
d06fbba104
12 changed files with 122 additions and 43 deletions
|
|
@ -38,9 +38,9 @@ protected:
|
|||
|
||||
Hook_Manager();
|
||||
virtual ~Hook_Manager();
|
||||
|
||||
void UnHookAllRendererDetector();
|
||||
|
||||
void UnHookAllRendererDetector();
|
||||
// Setup opengl device
|
||||
void hook_opengl();
|
||||
|
||||
void HookLoadLibrary();
|
||||
|
|
@ -52,13 +52,21 @@ protected:
|
|||
bool _dx9_hooked; // DX9 Present and PresentEx Hooked ?
|
||||
bool _dxgi_hooked; // DXGI Present is hooked ? (DX10, DX11, DX12)
|
||||
|
||||
// DXGIPresent will be used to detect if DX10, DX11 or DX12 should be used for overlay
|
||||
void HookDXGIPresent();
|
||||
// DX9 Present and PresentEx will be used to detect if DX9 should be used for overlay
|
||||
void HookDX9Present();
|
||||
// wglMakeCurrent will be used to detect if OpenGL3 should be used for overlay
|
||||
void HookwglMakeCurrent();
|
||||
// Setup DX9 Device and get vtable
|
||||
void hook_dx9();
|
||||
// Setup DX10 Device and get vtable
|
||||
void hook_dx10();
|
||||
// Setup DX11 Device and get vtable
|
||||
void hook_dx11();
|
||||
// Setup DX12 Device and get vtable
|
||||
void hook_dx12();
|
||||
|
||||
void create_hookA(const char* libname);
|
||||
void create_hookW(const wchar_t* libname);
|
||||
|
||||
|
|
@ -66,9 +74,12 @@ protected:
|
|||
static HMODULE WINAPI MyLoadLibraryW(LPCWSTR lpLibFileName);
|
||||
static HMODULE WINAPI MyLoadLibraryExA(LPCTSTR lpLibFileName, HANDLE hFile, DWORD dwFlags);
|
||||
static HMODULE WINAPI MyLoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags);
|
||||
// If this is called, then DX10, DX11 or DX12 will be used to render overlay
|
||||
static HRESULT STDMETHODCALLTYPE MyIDXGISwapChain_Present(IDXGISwapChain* _this, UINT SyncInterval, UINT Flags);
|
||||
// If any of theses is called, then DX9 will be used to render overlay
|
||||
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);
|
||||
// If this is called, then OpenGL 3 will be used to render overlay
|
||||
static BOOL WINAPI MywglMakeCurrent(HDC hDC, HGLRC hGLRC);
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue