From 331c4ee269b4ba5e3ddb30526bb31d5a27dbc471 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 26 Mar 2009 20:52:01 +0000 Subject: [PATCH] [ 2710782 ] win32: saved window position gradually floats around the screen --- desmume/src/windows/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 5c68f5237..f7e5269f4 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -2154,11 +2154,14 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM case WM_MOVING: SendMessage(hwnd, WM_PAINT, 0, 0x12345678); return 0; - case WM_MOVE: - WndY = HIWORD(lParam); - WndX = LOWORD(lParam); + case WM_MOVE: { + RECT rect; + GetWindowRect(MainWindow->getHWnd(),&rect); + WndX = rect.left; + WndY = rect.top; UpdateWndRects(hwnd); return 0; + } case WM_SIZING: { SendMessage(hwnd, WM_PAINT, 0, 0x12345678);