diff options
Diffstat (limited to 'backends/graphics/openglsdl')
| -rw-r--r-- | backends/graphics/openglsdl/openglsdl-graphics.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index 9b25f43f39..ccb2572d33 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -625,7 +625,10 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) { if (event.kbd.keycode == Common::KEYCODE_s) { Common::String filename; - Common::String screenshotsPath = ((OSystem_SDL *)g_system)->getScreenshotsPath(); + Common::String screenshotsPath; + OSystem_SDL *sdl_g_system = dynamic_cast<OSystem_SDL*>(g_system); + if (sdl_g_system) + screenshotsPath = sdl_g_system->getScreenshotsPath(); for (int n = 0;; n++) { SDL_RWops *file; |
