diff options
Diffstat (limited to 'backends/sdl/sdl_gl.cpp')
-rw-r--r-- | backends/sdl/sdl_gl.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/backends/sdl/sdl_gl.cpp b/backends/sdl/sdl_gl.cpp index 8215672427..15e45c875c 100644 --- a/backends/sdl/sdl_gl.cpp +++ b/backends/sdl/sdl_gl.cpp @@ -64,6 +64,7 @@ protected: virtual void load_gfx_mode(); virtual void unload_gfx_mode(); + virtual bool save_screenshot(const char *filename); void hotswap_gfx_mode(); }; @@ -668,3 +669,15 @@ uint32 OSystem_SDL_OpenGL::property(int param, Property *value) { return OSystem_SDL_Common::property(param, value); } + +bool OSystem_SDL_OpenGL::save_screenshot(const char *filename) { + // FIXME: I don't know how to do this yet. + if (_usingOpenGL) + return false; + + StackLock lock(_graphicsMutex, this); // Lock the mutex until this function ends + + assert(_hwscreen != NULL); + SDL_SaveBMP(_hwscreen, filename); + return true; +} |