From b85b6c7839d2eb181323ae225a0bdaa337a1003b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 12 Jul 2005 23:44:17 +0000 Subject: [PATCH] fixups for upcoming changes --- stepmania/src/archutils/Win32/GraphicsWindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stepmania/src/archutils/Win32/GraphicsWindow.cpp b/stepmania/src/archutils/Win32/GraphicsWindow.cpp index 497eaaaf6a..217e77e099 100644 --- a/stepmania/src/archutils/Win32/GraphicsWindow.cpp +++ b/stepmania/src/archutils/Win32/GraphicsWindow.cpp @@ -391,8 +391,6 @@ RageDisplay::VideoModeParams GraphicsWindow::GetParams() void GraphicsWindow::Update() { - ASSERT( DISPLAY ); - MSG msg; while( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) ) { @@ -406,11 +404,13 @@ void GraphicsWindow::Update() g_bLastHasFocus = g_bHasFocus; } - if( g_bResolutionChanged ) + if( g_bResolutionChanged && DISPLAY != NULL ) { - /* Let DISPLAY know that our resolution has changed. */ - DISPLAY->ResolutionChanged(); + /* Let DISPLAY know that our resolution has changed. (Note that + * ResolutionChanged() can come back here, so reset g_bResolutionChanged + * first.) */ g_bResolutionChanged = false; + DISPLAY->ResolutionChanged(); } }