diff options
author | Max Horn | 2004-02-24 22:39:42 +0000 |
---|---|---|
committer | Max Horn | 2004-02-24 22:39:42 +0000 |
commit | d158280425efac5f4ec72e00fb2b7389cdfb5a75 (patch) | |
tree | f1bdab69e381b2a28320fdeb30936482565e5099 /backends/sdl/sdl.cpp | |
parent | 70f910cbe19e9c7320a56fa48669f7a5e9df00e6 (diff) | |
download | scummvm-rg350-d158280425efac5f4ec72e00fb2b7389cdfb5a75.tar.gz scummvm-rg350-d158280425efac5f4ec72e00fb2b7389cdfb5a75.tar.bz2 scummvm-rg350-d158280425efac5f4ec72e00fb2b7389cdfb5a75.zip |
the OSystem changes we discussed on the ML (note: renaming of the existing OSystem API is not yet finished); porters will have to fix their ports to get them to compile again
svn-id: r13036
Diffstat (limited to 'backends/sdl/sdl.cpp')
-rw-r--r-- | backends/sdl/sdl.cpp | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp index 456ed2c5bf..384af1673c 100644 --- a/backends/sdl/sdl.cpp +++ b/backends/sdl/sdl.cpp @@ -31,9 +31,6 @@ public: // Update the dirty areas of the screen void update_screen(); - // Set a parameter - uint32 property(int param, Property *value); - protected: SDL_Surface *_hwscreen; // hardware screen @@ -42,7 +39,7 @@ protected: virtual void load_gfx_mode(); virtual void unload_gfx_mode(); virtual bool save_screenshot(const char *filename); - void hotswap_gfx_mode(); + virtual void hotswap_gfx_mode(); }; OSystem_SDL_Common *OSystem_SDL_Common::create_intern() { @@ -363,48 +360,6 @@ void OSystem_SDL::update_screen() { _forceFull = false; } -uint32 OSystem_SDL::property(int param, Property *value) { - - Common::StackLock lock(_graphicsMutex, this); // Lock the mutex until this function ends - - if (param == PROP_TOGGLE_FULLSCREEN) { - assert(_hwscreen != 0); - _full_screen ^= true; -#ifdef MACOSX - // On OS X, SDL_WM_ToggleFullScreen is currently not implemented. Worse, - // it still always returns -1. So we simply don't call it at all and - // use hotswap_gfx_mode() directly to switch to fullscreen mode. - hotswap_gfx_mode(); -#else - if (!SDL_WM_ToggleFullScreen(_hwscreen)) { - // if ToggleFullScreen fails, achieve the same effect with hotswap gfx mode - hotswap_gfx_mode(); - } -#endif - return 1; - } else if (param == PROP_SET_GFX_MODE) { - if (value->gfx_mode > 11) // FIXME! HACK, hard coded threshold, not good - return 0; - - _mode = value->gfx_mode; - hotswap_gfx_mode(); - - return 1; - } else if (param == PROP_TOGGLE_ASPECT_RATIO) { - if (_screenHeight == 200) { - assert(_hwscreen != 0); - _adjustAspectRatio ^= true; - hotswap_gfx_mode(); - } - } else if (param == PROP_HAS_SCALER) { - if (value->gfx_mode <= 11) // FIXME: Hardcoded - return 1; - return 0; - } - - return OSystem_SDL_Common::property(param, value); -} - bool OSystem_SDL::save_screenshot(const char *filename) { assert(_hwscreen != NULL); |