-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathWndProc.cpp
More file actions
39 lines (30 loc) · 962 Bytes
/
Copy pathWndProc.cpp
File metadata and controls
39 lines (30 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "base.h"
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK Base::Hooks::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (uMsg == WM_ACTIVATEAPP)
{
if (Base::Data::init)
{
ImGui_ImplDX9_Shutdown();
ImGui_ImplWin32_Shutdown();
ImGui::DestroyContext();
Base::Data::init = false;
Base::Init(false);
}
if (kiero::pDxDevice9)
{
kiero::pDxDevice9->Reset(&kiero::d3dpp);
}
}
ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam);
if (ImGui::GetCurrentContext() != NULL)
{
ImGuiIO& io = ImGui::GetIO();
if (io.WantCaptureMouse || io.WantCaptureKeyboard)
{
return TRUE;
}
}
return CallWindowProc(Base::Data::oWndProc, hWnd, uMsg, wParam, lParam);
}