mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 16:15:36 +00:00
Use the standard cursor if the custom cursor can't be used
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
This commit is contained in:
parent
f1f82af64e
commit
06719df868
1 changed files with 7 additions and 4 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue