ListImporter::get_frame(Surface &surface,Time time, ProgressCallback *cb)
{
// DEBUGPOINT();
- int frame=static_cast<int>(time*fps);
+ int frame=round_to_int(time*fps);
// DEBUGPOINT();
if(!filename_list.size())
// DEBUGPOINT();
// See if that frame is cached
- std::list<std::pair<int,Surface> >::iterator iter;
+ std::list<std::pair<String,Surface> >::iterator iter;
for(iter=frame_cache.begin();iter!=frame_cache.end();++iter)
{
- if(iter->first==frame)
+ if(iter->first==filename_list[frame])
{
// DEBUGPOINT();
surface.mirror(iter->second);
// DEBUGPOINT();
- frame_cache.push_back(std::pair<int,Surface>(frame,surface));
+ frame_cache.push_back(std::pair<String,Surface>(filename_list[frame],surface));
// DEBUGPOINT();