[Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl-common.cpp,1.96,1.97 sdl-common.h,1.43,1.44

Max Horn fingolfin at users.sourceforge.net
Sat Nov 1 11:13:07 CET 2003


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

Modified Files:
	sdl-common.cpp sdl-common.h 
Log Message:
made SDL backend use config manager

Index: sdl-common.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.cpp,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- sdl-common.cpp	9 Oct 2003 14:03:36 -0000	1.96
+++ sdl-common.cpp	1 Nov 2003 19:12:10 -0000	1.97
@@ -21,6 +21,7 @@
 
 #include "sdl-common.h"
 #include "sound/mididrv.h"
+#include "common/config-manager.h"
 #include "common/scaler.h"
 #include "common/util.h"
 
@@ -41,27 +42,27 @@
 #define JOY_BUT_SPACE 4
 #define JOY_BUT_F5 5
 
-OSystem *OSystem_SDL_create(int gfx_mode, bool full_screen, bool aspect_ratio, int joystick_num) {
-	return OSystem_SDL_Common::create(gfx_mode, full_screen, aspect_ratio, joystick_num);
+OSystem *OSystem_SDL_create(int gfx_mode) {
+	return OSystem_SDL_Common::create(gfx_mode);
 }
 
-OSystem *OSystem_SDL_Common::create(int gfx_mode, bool full_screen, bool aspect_ratio, int joystick_num) {
+OSystem *OSystem_SDL_Common::create(int gfx_mode) {
 	OSystem_SDL_Common *syst = OSystem_SDL_Common::create_intern();
 
-	syst->init_intern(gfx_mode, full_screen, aspect_ratio, joystick_num);
+	syst->init_intern(gfx_mode);
 
 	return syst;
 }
 
-void OSystem_SDL_Common::init_intern(int gfx_mode, bool full_screen, bool aspect_ratio, int joystick_num) {
+void OSystem_SDL_Common::init_intern(int gfx_mode) {
+
+	int joystick_num = ConfMan.getInt("joystick_num");
+	uint32 sdlFlags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
 
 	_mode = gfx_mode;
-	_full_screen = full_screen;
-	_adjustAspectRatio = aspect_ratio;
+	_full_screen = ConfMan.getBool("fullscreen");
+	_adjustAspectRatio = ConfMan.getBool("aspect_ratio");
 	_mode_flags = 0;
-	uint32 sdlFlags;
-
-	sdlFlags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
 
 	if (joystick_num > -1)
 		sdlFlags |= SDL_INIT_JOYSTICK;

Index: sdl-common.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- sdl-common.h	5 Oct 2003 14:41:30 -0000	1.43
+++ sdl-common.h	1 Nov 2003 19:12:11 -0000	1.44
@@ -117,7 +117,7 @@
 	virtual int16 RGBToColor(uint8 r, uint8 g, uint8 b);
 	virtual void colorToRGB(int16 color, uint8 &r, uint8 &g, uint8 &b);
 
-	static OSystem *create(int gfx_mode, bool full_screenm, bool aspect_ratio, int joystick_num);
+	static OSystem *create(int gfx_mode);
 
 protected:
 	OSystem_SDL_Common();
@@ -125,7 +125,7 @@
 
 	static OSystem_SDL_Common *create_intern();
 
-	void init_intern(int gfx_mode, bool full_screen, bool aspect_ratio, int joystick_num);
+	void init_intern(int gfx_mode);
 
 	// unseen game screen
 	SDL_Surface *_screen;





More information about the Scummvm-git-logs mailing list