Fix gif animation speed reproduction.

This commit is contained in:
Martín Lucas Golini
2024-11-24 02:03:35 -03:00
parent f0b0f53a46
commit 5afa37f784

View File

@@ -2138,7 +2138,9 @@ void App::loadImageFromMedium( const std::string& path, bool isMemory ) {
IOStream* stream = isMemory
? (IOStream*)new IOStreamMemory( path.c_str(), path.size() )
: (IOStream*)new IOStreamFile( path );
image = Sprite::fromGif( *stream );
Sprite* sprite = Sprite::fromGif( *stream );
sprite->setAutoAnimate( false );
image = sprite;
delete stream;
}