aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2003-07-20 15:31:47 +0000
committerTravis Howell2003-07-20 15:31:47 +0000
commita4b5891dd15b85fbdca322e88cea19cddf652cdc (patch)
treed8315caa08565e227a967264c25e12a8fb7b2199
parent82f90bb6cf061159e5d86ef408c5e1d657088b81 (diff)
downloadscummvm-rg350-a4b5891dd15b85fbdca322e88cea19cddf652cdc.tar.gz
scummvm-rg350-a4b5891dd15b85fbdca322e88cea19cddf652cdc.tar.bz2
scummvm-rg350-a4b5891dd15b85fbdca322e88cea19cddf652cdc.zip
Use automatic dirty rect code for simon games for now to reduce CPU usage
svn-id: r9093
-rw-r--r--backends/sdl/sdl-common.cpp4
-rw-r--r--common/system.h3
-rw-r--r--simon/simon.cpp3
3 files changed, 9 insertions, 1 deletions
diff --git a/backends/sdl/sdl-common.cpp b/backends/sdl/sdl-common.cpp
index 1fa453e5c8..af809591fc 100644
--- a/backends/sdl/sdl-common.cpp
+++ b/backends/sdl/sdl-common.cpp
@@ -895,6 +895,10 @@ void OSystem_SDL_Common::clear_sound_proc() {
uint32 OSystem_SDL_Common::property(int param, Property *value) {
switch(param) {
+ case PROP_WANT_RECT_OPTIM:
+ _mode_flags |= DF_WANT_RECT_OPTIM;
+ break;
+
case PROP_GET_FULLSCREEN:
return _full_screen;
diff --git a/common/system.h b/common/system.h
index ecf0d4c05c..357a512d68 100644
--- a/common/system.h
+++ b/common/system.h
@@ -95,7 +95,8 @@ public:
PROP_GET_FULLSCREEN = 7,
PROP_GET_FMOPL_ENV_BITS = 8,
PROP_GET_FMOPL_EG_ENT = 9,
- PROP_TOGGLE_ASPECT_RATIO = 10
+ PROP_TOGGLE_ASPECT_RATIO = 10,
+ PROP_WANT_RECT_OPTIM = 11
};
union Property {
const char *caption;
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 3358267dfb..56be85d26c 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -458,6 +458,9 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
_language = detector->_language;
_noSubtitles = detector->_noSubtitles;
+ // FIXME Use auto dirty rects cleanup code to reduce CPU usage
+ _system->property(OSystem::PROP_WANT_RECT_OPTIM,0);
+
// Override global scaler with any game-specific define
if (g_config->get("gfx_mode")) {
prop.gfx_mode = detector->parseGraphicsMode(g_config->get("gfx_mode"));