From 798130a40da63d2a2e0558b23e4ff7da68153ef7 Mon Sep 17 00:00:00 2001 From: Marc Coll Carrillo Date: Wed, 24 Dec 2014 13:42:22 +0100 Subject: [PATCH] Fix music stop problem when loading track selection screen Populate irrlicht's texture cache on startup with all the track screenshots to avoid the problem --- src/tracks/track_manager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tracks/track_manager.cpp b/src/tracks/track_manager.cpp index fbcd6d43c..e39601f7b 100644 --- a/src/tracks/track_manager.cpp +++ b/src/tracks/track_manager.cpp @@ -17,6 +17,7 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "tracks/track_manager.hpp" +#include "graphics/irr_driver.hpp" #include #include @@ -207,6 +208,10 @@ bool TrackManager::loadTrack(const std::string& dirname) m_tracks.push_back(track); m_track_avail.push_back(true); updateGroups(track); + + //Populate the texture cache with track screenshots + irr_driver->getTexture(track->getScreenshotFile()); + return true; } // loadTrack