From 8adec34759f86f322cd132e58f1606ff4d0ab8d5 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 19 Dec 2009 19:23:37 +0000 Subject: [PATCH] win32: still fencing with the resizing --- desmume/src/windows/CWindow.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/desmume/src/windows/CWindow.cpp b/desmume/src/windows/CWindow.cpp index caad08104..23e121f34 100644 --- a/desmume/src/windows/CWindow.cpp +++ b/desmume/src/windows/CWindow.cpp @@ -475,10 +475,14 @@ void WINCLASS::sizingMsg(WPARAM wParam, LPARAM lParam, LONG keepRatio) void WINCLASS::setClientSize(int width, int height) { - RECT rect; - SetRect(&rect,0,0,width,height); - AdjustWindowRectEx(&rect,GetWindowStyle(hwnd),TRUE,GetWindowExStyle(hwnd)); - SetWindowPos(hwnd,0,0,0,rect.right-rect.left,rect.bottom-rect.top,SWP_NOMOVE|SWP_NOZORDER); + //yep, do it twice, once in case the menu wraps, and once to accomodate that wrap + for(int i=0;i<2;i++) + { + RECT rect; + SetRect(&rect,0,0,width,height); + MyAdjustWindowRectEx(&rect,hwnd); + SetWindowPos(hwnd,0,0,0,rect.right-rect.left,rect.bottom-rect.top,SWP_NOMOVE|SWP_NOZORDER); + } } //========================================================= Thread class