[Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl.cpp,1.36,1.37 sdl_gl.cpp,1.38,1.39

Travis Howell kirben at users.sourceforge.net
Sun Jun 22 07:19:17 CEST 2003


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

Modified Files:
	sdl.cpp sdl_gl.cpp 
Log Message:

Add opengl filter option
for opengl backend
Enable poll_event in opengl backend


Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- sdl.cpp	22 Jun 2003 11:55:39 -0000	1.36
+++ sdl.cpp	22 Jun 2003 14:18:33 -0000	1.37
@@ -112,6 +112,7 @@
 		_scaler_proc = DotMatrix;
 		break;
 
+	case GFX_BILINEAR:
 	case GFX_DOUBLESIZE:
 		_scaleFactor = 2;
 		_scaler_proc = Normal2x;

Index: sdl_gl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl_gl.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- sdl_gl.cpp	22 Jun 2003 12:30:58 -0000	1.38
+++ sdl_gl.cpp	22 Jun 2003 14:18:33 -0000	1.39
@@ -47,7 +47,7 @@
 
 	// Get the next event.
 	// Returns true if an event was retrieved.	
-//	bool poll_event(Event *event);
+	bool poll_event(Event *event);
 
 protected:
 	FB2GL fb2gl;
@@ -119,6 +119,10 @@
 	_tmpScreenWidth = (_screenWidth + 3);
 
 	switch(_mode) {
+	case GFX_BILINEAR:
+		_usingOpenGL = true;
+		_mode = GFX_NORMAL;
+		break;
 	case GFX_2XSAI:
 		_scaleFactor = 2;
 		_scaler_proc = _2xSaI;
@@ -501,14 +505,13 @@
 	_forceFull = false;
 }
 
-/*
 bool OSystem_SDL_OpenGL::poll_event(Event *event) {
 	SDL_Event ev;
 	ev.type = 0;
 
 	SDL_PeepEvents(&ev, 1, SDL_GETEVENT, SDL_VIDEORESIZEMASK);
 
-	if (ev.type == SDL_VIDEORESIZE) {
+	if (_usingOpenGL && ev.type == SDL_VIDEORESIZE) {
 	      int w = ev.resize.w; 
 	      int h = ev.resize.h;
 	      glViewport(0, 0, (GLsizei)w, (GLsizei)h);
@@ -521,7 +524,6 @@
 
 	return OSystem_SDL_Common::poll_event(event);
 }
-*/
 
 uint32 OSystem_SDL_OpenGL::property(int param, Property *value) {
 





More information about the Scummvm-git-logs mailing list