diff options
author | Max Horn | 2004-03-28 20:31:18 +0000 |
---|---|---|
committer | Max Horn | 2004-03-28 20:31:18 +0000 |
commit | 39765b0d19fd8409cf4e0e96c9edc2ad5b25f247 (patch) | |
tree | 3f1aef98ad8882a2d1147cc4c7a4a838b60f22ac /backends | |
parent | 09e3fec623c1ecea73a23d12891790569d1baa40 (diff) | |
download | scummvm-rg350-39765b0d19fd8409cf4e0e96c9edc2ad5b25f247.tar.gz scummvm-rg350-39765b0d19fd8409cf4e0e96c9edc2ad5b25f247.tar.bz2 scummvm-rg350-39765b0d19fd8409cf4e0e96c9edc2ad5b25f247.zip |
Remove explicit OSystem parameter from StackLock constructor; added OSystem::displayMessageOnOSD (not yet used; default implementation provided)
svn-id: r13413
Diffstat (limited to 'backends')
-rw-r--r-- | backends/sdl/graphics.cpp | 14 | ||||
-rw-r--r-- | backends/sdl/sdl-common.h | 8 | ||||
-rw-r--r-- | backends/sdl/sdl.cpp | 2 | ||||
-rw-r--r-- | backends/wince/wince-sdl.cpp | 16 | ||||
-rw-r--r-- | backends/wince/wince-sdl.h | 9 |
5 files changed, 25 insertions, 24 deletions
diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp index 6842ab057c..e89151e03e 100644 --- a/backends/sdl/graphics.cpp +++ b/backends/sdl/graphics.cpp @@ -50,7 +50,7 @@ int OSystem_SDL::getDefaultGraphicsMode() const { } bool OSystem_SDL::setGraphicsMode(int mode) { - Common::StackLock lock(_graphicsMutex, this); + Common::StackLock lock(_graphicsMutex); int newScaleFactor = 1; ScalerProc *newScalerProc; @@ -327,7 +327,7 @@ void OSystem_SDL::hotswap_gfx_mode() { } void OSystem_SDL::updateScreen() { - Common::StackLock lock(_graphicsMutex, this); // Lock the mutex until this function ends + Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends internUpdateScreen(); } @@ -490,13 +490,13 @@ void OSystem_SDL::internUpdateScreen() { bool OSystem_SDL::save_screenshot(const char *filename) { assert(_hwscreen != NULL); - Common::StackLock lock(_graphicsMutex, this); // Lock the mutex until this function ends + Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends SDL_SaveBMP(_hwscreen, filename); return true; } void OSystem_SDL::setFullscreenMode(bool enable) { - Common::StackLock lock(_graphicsMutex, this); + Common::StackLock lock(_graphicsMutex); if (_full_screen != enable) { assert(_hwscreen != 0); @@ -536,7 +536,7 @@ void OSystem_SDL::copyRectToScreen(const byte *src, int pitch, int x, int y, int if (_screen == NULL) return; - Common::StackLock lock(_graphicsMutex, this); // Lock the mutex until this function ends + Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends if (((long)src & 3) == 0 && pitch == _screenWidth && x==0 && y==0 && w==_screenWidth && h==_screenHeight && _mode_flags&DF_WANT_RECT_OPTIM) { @@ -755,7 +755,7 @@ void OSystem_SDL::move_screen(int dx, int dy, int height) { if ((dx == 0 && dy == 0) || height <= 0) return; - Common::StackLock lock(_graphicsMutex, this); // Lock the mutex until this function ends + Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends byte *src, *dst; int x, y; @@ -849,7 +849,7 @@ void OSystem_SDL::clearOverlay() { if (!_overlayVisible) return; - Common::StackLock lock(_graphicsMutex, this); // Lock the mutex until this function ends + Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends // hide the mouse undraw_mouse(); diff --git a/backends/sdl/sdl-common.h b/backends/sdl/sdl-common.h index 89a5b750fe..127267f878 100644 --- a/backends/sdl/sdl-common.h +++ b/backends/sdl/sdl-common.h @@ -137,6 +137,10 @@ public: virtual void setFeatureState(Feature f, bool enable); virtual bool getFeatureState(Feature f); +#ifdef USE_OSD + void displayMessageOnOSD(const char *msg); +#endif + protected: void init_intern(); @@ -150,8 +154,6 @@ protected: kOSDColorKey = 1, kOSDInitialAlpha = 80 // Initial alpha level, in percent }; - - void displayMessageOnOSD(const char *msg); #endif // hardware screen @@ -252,7 +254,7 @@ protected: void toggleMouseGrab(); - void internUpdateScreen(); + virtual void internUpdateScreen(); void load_gfx_mode(); void unload_gfx_mode(); diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp index fb798caacb..99093380a4 100644 --- a/backends/sdl/sdl.cpp +++ b/backends/sdl/sdl.cpp @@ -144,7 +144,7 @@ void OSystem_SDL::setFeatureState(Feature f, bool enable) { break; case kFeatureAspectRatioCorrection: if (_screenHeight == 200 && _adjustAspectRatio != enable) { - Common::StackLock lock(_graphicsMutex, this); + Common::StackLock lock(_graphicsMutex); //assert(_hwscreen != 0); _adjustAspectRatio ^= true; diff --git a/backends/wince/wince-sdl.cpp b/backends/wince/wince-sdl.cpp index da6918d3b1..5d0c7e6c59 100644 --- a/backends/wince/wince-sdl.cpp +++ b/backends/wince/wince-sdl.cpp @@ -333,7 +333,7 @@ void OSystem_WINCE3::initSize(uint w, uint h) { else _toolbarHandler.setOffset(400); - OSystem_SDL_Common::initSize(w, h); + OSystem_SDL::initSize(w, h); update_game_settings(); @@ -623,11 +623,9 @@ void OSystem_WINCE3::update_keyboard() { } } -void OSystem_WINCE3::updateScreen() { +void OSystem_WINCE3::internUpdateScreen() { assert(_hwscreen != NULL); - Common::StackLock lock(_graphicsMutex, this); // Lock the mutex until this function ends - update_keyboard(); // If the shake position changed, fill the dirty area with blackness @@ -820,7 +818,7 @@ void OSystem_WINCE3::updateScreen() { uint32 OSystem_WINCE3::property(int param, Property *value) { - Common::StackLock lock(_graphicsMutex, this); // Lock the mutex until this function ends + Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends if (param == PROP_TOGGLE_FULLSCREEN) { // FIXME @@ -898,7 +896,7 @@ uint32 OSystem_WINCE3::property(int param, Property *value) { bool OSystem_WINCE3::save_screenshot(const char *filename) { assert(_hwscreen != NULL); - Common::StackLock lock(_graphicsMutex, this); // Lock the mutex until this function ends + Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends SDL_SaveBMP(_hwscreen, filename); return true; } @@ -928,7 +926,7 @@ static int mapKeyCE(SDLKey key, SDLMod mod, Uint16 unicode) void OSystem_WINCE3::draw_mouse() { // FIXME if (!(_toolbarHandler.visible() && _mouseCurState.y >= _toolbarHandler.getOffset()) && !_forceHideMouse) - OSystem_SDL_Common::draw_mouse(); + OSystem_SDL::draw_mouse(); } void OSystem_WINCE3::fillMouseEvent(Event &event, int x, int y) { @@ -987,7 +985,7 @@ void OSystem_WINCE3::add_dirty_rect(int x, int y, int w, int h) { } } - OSystem_SDL_Common::add_dirty_rect(x, y, w, h); + OSystem_SDL::add_dirty_rect(x, y, w, h); } // FIXME @@ -1305,5 +1303,5 @@ bool OSystem_WINCE3::poll_event(Event *event) { void OSystem_WINCE3::quit() { CEDevice::disableHardwareKeyMapping(); - OSystem_SDL_Common::quit(); + OSystem_SDL::quit(); } diff --git a/backends/wince/wince-sdl.h b/backends/wince/wince-sdl.h index 910cd558d0..a54e0c16fa 100644 --- a/backends/wince/wince-sdl.h +++ b/backends/wince/wince-sdl.h @@ -36,15 +36,16 @@ #include <SDL.h> -class OSystem_WINCE3 : public OSystem_SDL_Common { +class OSystem_WINCE3 : public OSystem_SDL { public: OSystem_WINCE3(); // Update the dirty areas of the screen - void updateScreen(); + void internUpdateScreen(); - // Set a parameter - uint32 property(int param, Property *value); + bool hasFeature(Feature f); + void setFeatureState(Feature f, bool enable); + bool getFeatureState(Feature f); void initSize(uint w, uint h); |