From 8dce4a7fc362f3cc3550b6dcc11193c20966c0e0 Mon Sep 17 00:00:00 2001 From: spacy51 <spacy51@a31d4220-a93d-0410-bf67-fe4944624d44> Date: Fri, 7 Dec 2007 17:10:33 +0000 Subject: [PATCH] device won't be reset twice when entering full screen --- src/win32/Direct3D.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/win32/Direct3D.cpp b/src/win32/Direct3D.cpp index d47c812c..8f1e2d43 100644 --- a/src/win32/Direct3D.cpp +++ b/src/win32/Direct3D.cpp @@ -154,7 +154,7 @@ void Direct3DDisplay::prepareDisplayMode() // D3DPRESENT_INTERVAL_ONE means VSync ON if( theApp.vsync && ( dpp.Windowed == FALSE ) && theApp.menuToggle ) { - // VSync will be disabled when the menu is opened in full screen mode + // HACK: VSync will be disabled when the menu is opened in full screen mode dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; } @@ -459,13 +459,12 @@ void Direct3DDisplay::resize( int w, int h ) return; } - if( (w != dpp.BackBufferWidth) || (h != dpp.BackBufferHeight) ) { + if( (w != dpp.BackBufferWidth) || + (h != dpp.BackBufferHeight) || + (theApp.videoOption > VIDEO_4X) ) { resetDevice(); calculateDestRect(); } - if( theApp.videoOption > VIDEO_4X ) { - resetDevice(); - } }