device won't be reset twice when entering full screen

This commit is contained in:
spacy51 2007-12-07 17:10:33 +00:00
parent 9a282c5d90
commit 8dce4a7fc3
1 changed files with 4 additions and 5 deletions

View File

@ -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();
}
}