From ba1850dbbe7b731396e7ebd7b9fcff6947adb2d6 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Fri, 7 Dec 2007 19:04:30 +0000 Subject: [PATCH] When resizing the window to a smaller size, the emulated image will now be updated as well. git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@182 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/win32/MainWnd.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/win32/MainWnd.cpp b/src/win32/MainWnd.cpp index 10e08a6d..e4518130 100644 --- a/src/win32/MainWnd.cpp +++ b/src/win32/MainWnd.cpp @@ -769,6 +769,8 @@ void MainWnd::OnSize(UINT nType, int cx, int cy) { CWnd::OnSize(nType, cx, cy); + bool redraw = ( ( cx < theApp.surfaceSizeX ) || ( cy < theApp.surfaceSizeY ) ); + if(!theApp.changingVideoSize) { if(this) { if(!IsIconic()) { @@ -784,6 +786,12 @@ void MainWnd::OnSize(UINT nType, int cx, int cy) theApp.adjustDestRect(); if(theApp.display) theApp.display->resize(theApp.dest.right-theApp.dest.left, theApp.dest.bottom-theApp.dest.top); + if( redraw && emulating ) { + theApp.painting = true; + systemDrawScreen(); + theApp.painting = false; + theApp.renderedFrames--; + } } } else { if(emulating) {