diff --git a/MUNGA_L4/L4MFDVIEW.cpp b/MUNGA_L4/L4MFDVIEW.cpp index c73daf3..abd6d07 100644 --- a/MUNGA_L4/L4MFDVIEW.cpp +++ b/MUNGA_L4/L4MFDVIEW.cpp @@ -371,7 +371,7 @@ void pressedIndex = i; SetCapture((HWND) window); PadRIO::SetScreenButton(button->unit, True); - InvalidateRect((HWND) window, NULL, FALSE); + Repaint(); return; } } @@ -388,16 +388,22 @@ void { ReleaseCapture(); } - InvalidateRect((HWND) window, NULL, FALSE); + Repaint(); } } +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Paint NOW rather than queueing an invalidation: the game loop pumps +// one message per frame, and queued WM_PAINTs (lowest priority) starve +// behind it - panes would freeze on their first frame. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void MFDSplitView::Repaint() { Check_Pointer(this); if (window != NULL) { - InvalidateRect((HWND) window, NULL, FALSE); + RedrawWindow((HWND) window, NULL, NULL, + RDW_INVALIDATE | RDW_UPDATENOW); } } diff --git a/MUNGA_L4/L4PLASMASCREEN.cpp b/MUNGA_L4/L4PLASMASCREEN.cpp index 89de93f..4b13807 100644 --- a/MUNGA_L4/L4PLASMASCREEN.cpp +++ b/MUNGA_L4/L4PLASMASCREEN.cpp @@ -304,7 +304,10 @@ Logical if (dirty && window != NULL) { - InvalidateRect((HWND) window, NULL, FALSE); + // paint now - queued WM_PAINTs starve behind the game loop's + // one-message-per-frame pump + RedrawWindow((HWND) window, NULL, NULL, + RDW_INVALIDATE | RDW_UPDATENOW); } return False; // 'done' - nothing left to stream