mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 11:44:53 +01:00
Added preprocessor exclusion for linux
This commit is contained in:
parent
f9ee123a05
commit
56b4e6a7c7
14 changed files with 127 additions and 22 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include "../dll/base.h"
|
||||
#include "DX9_Hook.h"
|
||||
|
||||
#ifdef STEAM_WIN32
|
||||
|
||||
#include "Hook_Manager.h"
|
||||
|
||||
#include <imgui.h>
|
||||
|
|
@ -72,6 +74,7 @@ void DX9_Hook::resetRenderState()
|
|||
}
|
||||
}
|
||||
|
||||
// Try to make this function and overlay's proc as short as possible or it might affect game's fps.
|
||||
void DX9_Hook::prepareForOverlay(IDirect3DDevice9 *pDevice)
|
||||
{
|
||||
IDirect3DSwapChain9* pSwapChain;
|
||||
|
|
@ -83,6 +86,7 @@ void DX9_Hook::prepareForOverlay(IDirect3DDevice9 *pDevice)
|
|||
D3DDEVICE_CREATION_PARAMETERS param;
|
||||
pDevice->GetCreationParameters(¶m);
|
||||
|
||||
// Workaround to detect if we changed window.
|
||||
if (param.hFocusWindow != Hook_Manager::Inst().GetOverlay()->GetGameHwnd())
|
||||
resetRenderState();
|
||||
|
||||
|
|
@ -221,4 +225,6 @@ void DX9_Hook::loadFunctions(IDirect3DDevice9Ex* pDeviceEx)
|
|||
LOAD_FUNC(Present);
|
||||
LOAD_FUNC(PresentEx);
|
||||
#undef LOAD_FUNC
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue