Fixed resolution change (it got broken while fixing leaked textures).

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8518 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-05-05 01:55:26 +00:00
parent 68bb78ca36
commit 24a11c5b8b

View File

@ -373,6 +373,9 @@ void IrrDriver::applyResolutionSettings()
// Clear the pointer stored in the file manager
file_manager->dropFileSystem();
delete material_manager;
material_manager = NULL;
m_device->drop();
m_device = NULL;
m_video_driver = NULL;
@ -389,7 +392,9 @@ void IrrDriver::applyResolutionSettings()
// Re-init GUI engine
GUIEngine::init(m_device, m_video_driver, StateManager::get());
material_manager->reInit();
//material_manager->reInit();
material_manager = new MaterialManager();
material_manager->loadMaterial();
input_manager = new InputManager ();
input_manager->setMode(InputManager::MENU);
@ -399,7 +404,7 @@ void IrrDriver::applyResolutionSettings()
const std::string materials_file = file_manager->getModelFile("materials.xml");
if (materials_file != "")
{
material_manager->pushTempMaterial(materials_file);
material_manager->addSharedMaterial(materials_file);
}
powerup_manager -> loadAllPowerups ();
@ -407,11 +412,6 @@ void IrrDriver::applyResolutionSettings()
projectile_manager -> loadData();
GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getGUIDir() + "/gift.png") );
if (materials_file != "")
{
material_manager->popTempMaterial();
}
file_manager->popTextureSearchPath();
kart_properties_manager -> loadAllKarts();