ウェンストニー
-
Автор темы
- #1
Код:
ResetFn oReset;
long __stdcall Hooks::Reset(IDirect3DDevice9* pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters)
{
ImGui_ImplDX9_InvalidateDeviceObjects();
long hr = oReset(pDevice, pPresentationParameters);
G.Window = pPresentationParameters->hDeviceWindow;
ImGui_ImplDX9_CreateDeviceObjects();
return hr;
}
WNDPROC oWndProc;
IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT __stdcall Hooks::WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (G.MenuOpen)
{
if (ImGui::GetCurrentContext())
ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam);
return true;
}
return CallWindowProc(oWndProc, hWnd, uMsg, wParam, lParam);
}