[Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl.cpp,1.44,1.45 sdl_gl.cpp,1.52,1.53 sdl-common.cpp,1.80,1.81 sdl-common.h,1.35,1.36

Max Horn fingolfin at users.sourceforge.net
Sat Sep 6 13:23:04 CEST 2003


Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory sc8-pr-cvs1:/tmp/cvs-serv15889/backends/sdl

Modified Files:
	sdl.cpp sdl_gl.cpp sdl-common.cpp sdl-common.h 
Log Message:
added EVENT_SCREEN_CHANGED; small tweak to the way quit is handled in NewGui

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- sdl.cpp	22 Aug 2003 07:40:40 -0000	1.44
+++ sdl.cpp	6 Sep 2003 20:21:54 -0000	1.45
@@ -204,8 +204,11 @@
 	free(old_tmpscreen->pixels);
 	SDL_FreeSurface(old_tmpscreen);
 
-	// Finally, blit everything to the screen
+	// Blit everything to the screen
 	update_screen();
+	
+	// Make sure that an EVENT_SCREEN_CHANGED gets sent later
+	_modeChanged = true;
 }
 
 void OSystem_SDL::update_screen() {

Index: sdl_gl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl_gl.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- sdl_gl.cpp	22 Aug 2003 07:40:40 -0000	1.52
+++ sdl_gl.cpp	6 Sep 2003 20:21:54 -0000	1.53
@@ -343,8 +343,11 @@
 	free(old_tmpscreen->pixels);
 	SDL_FreeSurface(old_tmpscreen);
 
-	// Finally, blit everything to the screen
+	// Blit everything to the screen
 	update_screen();
+	
+	// Make sure that an EVENT_SCREEN_CHANGED gets sent later
+	_modeChanged = true;
 }
 
 void OSystem_SDL_OpenGL::update_screen() {

Index: sdl-common.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- sdl-common.cpp	22 Aug 2003 07:40:40 -0000	1.80
+++ sdl-common.cpp	6 Sep 2003 20:21:54 -0000	1.81
@@ -91,7 +91,7 @@
 OSystem_SDL_Common::OSystem_SDL_Common()
 	: _screen(0), _screenWidth(0), _screenHeight(0),
 	_tmpscreen(0), _tmpScreenWidth(0), _overlayVisible(false),
-	_cdrom(0), _dirty_checksums(0),
+	_cdrom(0), _modeChanged(false), _dirty_checksums(0),
 	_mouseVisible(false), _mouseDrawn(false), _mouseData(0),
 	_mouseHotspotX(0), _mouseHotspotY(0),
 	_currentShakePos(0), _newShakePos(0),
@@ -536,6 +536,13 @@
 	byte b = 0;
 	
 	kbd_mouse();
+	
+	// If the screen mode changed, send an EVENT_SCREEN_CHANGED
+	if (_modeChanged) {
+		_modeChanged = false;
+		event->event_code = EVENT_SCREEN_CHANGED;
+		return true;
+	}
 
 	while(SDL_PollEvent(&ev)) {
 		switch(ev.type) {

Index: sdl-common.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- sdl-common.h	22 Aug 2003 07:40:40 -0000	1.35
+++ sdl-common.h	6 Sep 2003 20:21:54 -0000	1.36
@@ -160,6 +160,7 @@
 	int _mode;
 	bool _full_screen;
 	uint32 _mode_flags;
+	bool _modeChanged;
 
 	enum {
 		NUM_DIRTY_RECT = 100,





More information about the Scummvm-git-logs mailing list