From ed78df90944bbe6b7de7308bda2bf3a7f1bc3de6 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 5 Nov 2021 18:10:01 +0800 Subject: *misc --- Editor/GUI/GUIWindow.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Editor/GUI/GUIWindow.cpp') diff --git a/Editor/GUI/GUIWindow.cpp b/Editor/GUI/GUIWindow.cpp index cd49445..6bf7fd8 100644 --- a/Editor/GUI/GUIWindow.cpp +++ b/Editor/GUI/GUIWindow.cpp @@ -25,9 +25,13 @@ static bool RedirectMouseWheel(HWND window, WPARAM wParam, LPARAM lParam) return true; } -static PAINTSTRUCT ps; LRESULT CALLBACK GUIWindow::GUIViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { +#if GAMELAB_DEBUG + static int _event_count = 0; + log_info_tag("WndProc", "GUIWindow Event %d", ++_event_count); +#endif + GUIWindow* self = (GUIWindow*)GetWindowLongPtr(hWnd, GWLP_USERDATA); if (!self) { @@ -35,8 +39,6 @@ LRESULT CALLBACK GUIWindow::GUIViewWndProc(HWND hWnd, UINT message, WPARAM wPara return DefWindowProcW(hWnd, message, wParam, lParam); } - //log_info_tag("WndProc", "GUIWindow::GUIViewWndProc(), GUIWindow name is %s", self->GetName()); - switch (message) { case WM_ERASEBKGND: @@ -45,6 +47,8 @@ LRESULT CALLBACK GUIWindow::GUIViewWndProc(HWND hWnd, UINT message, WPARAM wPara case WM_PAINT: { + static PAINTSTRUCT ps; + log_info_tag("WndProc", "WM_PAINT"); self->SetAsRenderContext(); -- cgit v1.1-26-g67d0