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
This commit is contained in:
parent
d0f96a7673
commit
798130a40d
@ -17,6 +17,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "tracks/track_manager.hpp"
|
#include "tracks/track_manager.hpp"
|
||||||
|
#include "graphics/irr_driver.hpp"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
@ -207,6 +208,10 @@ bool TrackManager::loadTrack(const std::string& dirname)
|
|||||||
m_tracks.push_back(track);
|
m_tracks.push_back(track);
|
||||||
m_track_avail.push_back(true);
|
m_track_avail.push_back(true);
|
||||||
updateGroups(track);
|
updateGroups(track);
|
||||||
|
|
||||||
|
//Populate the texture cache with track screenshots
|
||||||
|
irr_driver->getTexture(track->getScreenshotFile());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} // loadTrack
|
} // loadTrack
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user