From 06719df868aa934db7d99bed92567dd67e70c383 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Fri, 11 Dec 2015 15:59:16 +0100 Subject: [PATCH] Use the standard cursor if the custom cursor can't be used Signed-off-by: Paul Cercueil --- components/sdlutil/sdlcursormanager.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/sdlutil/sdlcursormanager.cpp b/components/sdlutil/sdlcursormanager.cpp index 26b0510dc..40b87d905 100644 --- a/components/sdlutil/sdlcursormanager.cpp +++ b/components/sdlutil/sdlcursormanager.cpp @@ -217,14 +217,17 @@ namespace SDLUtil void SDLCursorManager::_createCursorFromResource(const std::string& name, int rotDegrees, osg::Image* image, Uint8 size_x, Uint8 size_y, Uint8 hotspot_x, Uint8 hotspot_y) { - #ifdef ANDROID - return; - #endif + osg::ref_ptr decompressed; if (mCursorMap.find(name) != mCursorMap.end()) return; - osg::ref_ptr decompressed = decompress(image, static_cast(rotDegrees)); + try { + decompressed = decompress(image, static_cast(rotDegrees)); + } catch (...) { + osg::notify(osg::NOTICE)<<"Using default cursor."<