From a4b5891dd15b85fbdca322e88cea19cddf652cdc Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 20 Jul 2003 15:31:47 +0000 Subject: Use automatic dirty rect code for simon games for now to reduce CPU usage svn-id: r9093 --- backends/sdl/sdl-common.cpp | 4 ++++ common/system.h | 3 ++- simon/simon.cpp | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) 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")); -- cgit v1.2.3