diff options
author | Travis Howell | 2003-08-22 07:40:40 +0000 |
---|---|---|
committer | Travis Howell | 2003-08-22 07:40:40 +0000 |
commit | ab59623930fbc1387bab7eca5c6602da52f6227f (patch) | |
tree | a401a4e6e4b38f9a07c8b9698c7c7830eca5eb74 /backends/sdl/sdl.cpp | |
parent | 8a87b25fdca8c969714f556c00ef4d956f3e2181 (diff) | |
download | scummvm-rg350-ab59623930fbc1387bab7eca5c6602da52f6227f.tar.gz scummvm-rg350-ab59623930fbc1387bab7eca5c6602da52f6227f.tar.bz2 scummvm-rg350-ab59623930fbc1387bab7eca5c6602da52f6227f.zip |
Add screenshot option for sdl backends, patch #590233
svn-id: r9821
Diffstat (limited to 'backends/sdl/sdl.cpp')
-rw-r--r-- | backends/sdl/sdl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp index 24c9cc3f72..af2d30ad5a 100644 --- a/backends/sdl/sdl.cpp +++ b/backends/sdl/sdl.cpp @@ -42,6 +42,7 @@ protected: virtual void load_gfx_mode(); virtual void unload_gfx_mode(); + virtual bool save_screenshot(const char *filename); void hotswap_gfx_mode(); }; @@ -376,3 +377,10 @@ uint32 OSystem_SDL::property(int param, Property *value) { return OSystem_SDL_Common::property(param, value); } +bool OSystem_SDL::save_screenshot(const char *filename) { + assert(_hwscreen != NULL); + + StackLock lock(_graphicsMutex, this); // Lock the mutex until this function ends + SDL_SaveBMP(_hwscreen, filename); + return true; +} |