[Scummvm-cvs-logs] CVS: scummvm/gui newgui.cpp,1.16,1.17

Max Horn fingolfin at users.sourceforge.net
Fri Sep 27 06:07:05 CEST 2002


Update of /cvsroot/scummvm/scummvm/gui
In directory usw-pr-cvs1:/tmp/cvs-serv26173/gui

Modified Files:
	newgui.cpp 
Log Message:
enabled demo dialog shown during startup; some fixes/cleanup in NewGUI

Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- newgui.cpp	26 Sep 2002 11:44:02 -0000	1.16
+++ newgui.cpp	27 Sep 2002 13:06:58 -0000	1.17
@@ -191,6 +191,8 @@
 		// Delay for a moment
 		_system->delay_msecs(10);
 	}
+	
+	restoreState();
 }
 
 #pragma mark -
@@ -202,14 +204,10 @@
 	
 	_system->show_overlay();
 	// TODO - add getHeight & getWidth methods to OSystem.
-	// Note that this alone is not a sufficient solution, as in the future the screen size
-	// might change. E.g. we start up in 320x200 mode but then go on playing Zak256
-	// which makes us switch to 320x240, or even CMI which uses 640x480...
-	// FIXME - for now just use a dirty HACK
 	_screen = new int16[320 * 240];
 	_screen_pitch = 320;
-//	_screen = new int16[_s->_realWidth * _s->_realHeight];
-//	_screen_pitch = _s->_realWidth;
+//	_screen = new int16[_system->get_width() * _system->get_height()];
+//	_screen_pitch = _system->get_width();
 	_system->grab_overlay(_screen, _screen_pitch);
 }
 
@@ -222,6 +220,8 @@
 		delete _screen;
 		_screen = 0;
 	}
+	
+	_system->update_screen();		
 }
 
 void NewGui::openDialog(Dialog *dialog)
@@ -238,10 +238,7 @@
 	
 	// Remove the dialog from the stack
 	_dialogStack.pop();
-	if (_dialogStack.empty())
-		restoreState();
-	else
-		_need_redraw = true;
+	_need_redraw = true;
 }
 
 





More information about the Scummvm-git-logs mailing list