|
|
@ -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)
|
|
|
|
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
|
|
|
|
osg::ref_ptr<osg::Image> decompressed;
|
|
|
|
return;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (mCursorMap.find(name) != mCursorMap.end())
|
|
|
|
if (mCursorMap.find(name) != mCursorMap.end())
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
osg::ref_ptr<osg::Image> decompressed = decompress(image, static_cast<float>(rotDegrees));
|
|
|
|
try {
|
|
|
|
|
|
|
|
decompressed = decompress(image, static_cast<float>(rotDegrees));
|
|
|
|
|
|
|
|
} catch (...) {
|
|
|
|
|
|
|
|
osg::notify(osg::NOTICE)<<"Using default cursor."<<std::endl;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SDL_Surface* surf = SDLUtil::imageToSurface(decompressed, false);
|
|
|
|
SDL_Surface* surf = SDLUtil::imageToSurface(decompressed, false);
|
|
|
|
|
|
|
|
|
|
|
|