A new debugger.

Lots of bugs/rough edges/etc - issues will be filed.
Old-style debugging still works (just use --emit_source_annotations to get
the helpful movs back and --break_on_instruction will still fire).
This commit is contained in:
Ben Vanik
2015-09-20 21:31:05 -07:00
parent 8046c19898
commit 5d033f9cb3
90 changed files with 4183 additions and 4651 deletions

View File

@@ -320,6 +320,10 @@ LRESULT CALLBACK Win32Window::WndProcThunk(HWND hWnd, UINT message,
LRESULT Win32Window::WndProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam) {
if (hWnd != hwnd_) {
return DefWindowProc(hWnd, message, wParam, lParam);
}
if (message >= WM_MOUSEFIRST && message <= WM_MOUSELAST) {
if (HandleMouse(message, wParam, lParam)) {
return 0;
@@ -328,7 +332,6 @@ LRESULT Win32Window::WndProc(HWND hWnd, UINT message, WPARAM wParam,
}
} else if (message >= WM_KEYFIRST && message <= WM_KEYLAST) {
if (HandleKeyboard(message, wParam, lParam)) {
SetFocus(hwnd_);
return 0;
} else {
return DefWindowProc(hWnd, message, wParam, lParam);
@@ -363,10 +366,14 @@ LRESULT Win32Window::WndProc(HWND hWnd, UINT message, WPARAM wParam,
case WM_PAINT: {
ValidateRect(hwnd_, nullptr);
auto e = UIEvent(this);
OnPaint(&e);
static bool in_paint = false;
if (!in_paint) {
in_paint = true;
auto e = UIEvent(this);
OnPaint(&e);
in_paint = false;
}
return 0; // Ignored because of custom paint.
break;
}
case WM_ERASEBKGND:
return 0; // Ignored because of custom paint.