aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2003-11-01 19:12:11 +0000
committerMax Horn2003-11-01 19:12:11 +0000
commit235047d526667a7b124a51108446e56d4debf9f6 (patch)
tree0e30e8ed27429a787dd17d9eaf3e56cc64f881de /backends
parentae9fe77479fb7722bda25beb1baaf6507b55862a (diff)
downloadscummvm-rg350-235047d526667a7b124a51108446e56d4debf9f6.tar.gz
scummvm-rg350-235047d526667a7b124a51108446e56d4debf9f6.tar.bz2
scummvm-rg350-235047d526667a7b124a51108446e56d4debf9f6.zip
made SDL backend use config manager
svn-id: r11028
Diffstat (limited to 'backends')
-rw-r--r--backends/intern.h4
-rw-r--r--backends/sdl/sdl-common.cpp21
-rw-r--r--backends/sdl/sdl-common.h4
3 files changed, 15 insertions, 14 deletions
diff --git a/backends/intern.h b/backends/intern.h
index f3fbf07f71..0717357c3d 100644
--- a/backends/intern.h
+++ b/backends/intern.h
@@ -27,9 +27,9 @@
/* Factory functions. This means we don't have to include the headers for
* all backends.
*/
-extern OSystem *OSystem_SDL_create(int gfx_driver, bool full_screen, bool aspect_ratio, int joystick_num);
+extern OSystem *OSystem_SDL_create(int gfx_driver);
extern OSystem *OSystem_NULL_create();
-extern OSystem *OSystem_MorphOS_create(int game_id, int gfx_driver, bool full_screen);
+extern OSystem *OSystem_MorphOS_create(int gfx_driver, bool full_screen);
extern OSystem *OSystem_Dreamcast_create();
extern OSystem *OSystem_WINCE3_create();
extern OSystem *OSystem_X11_create();
diff --git a/backends/sdl/sdl-common.cpp b/backends/sdl/sdl-common.cpp
index 8dbc25e517..d5aff962b5 100644
--- a/backends/sdl/sdl-common.cpp
+++ b/backends/sdl/sdl-common.cpp
@@ -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;
diff --git a/backends/sdl/sdl-common.h b/backends/sdl/sdl-common.h
index 482e2ca8c7..f369a9b2c3 100644
--- a/backends/sdl/sdl-common.h
+++ b/backends/sdl/sdl-common.h
@@ -117,7 +117,7 @@ public:
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 @@ protected:
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;