Commit d688413a authored by mercury233's avatar mercury233

removeTexture tFields on ClearTexture

parent 81df8cac
...@@ -65,6 +65,10 @@ void ImageManager::ClearTexture() { ...@@ -65,6 +65,10 @@ void ImageManager::ClearTexture() {
if(tit->second && tit->second != tLoading) if(tit->second && tit->second != tLoading)
driver->removeTexture(tit->second); driver->removeTexture(tit->second);
} }
for(auto tit = tFields.begin(); tit != tFields.end(); ++tit) {
if(tit->second)
driver->removeTexture(tit->second);
}
if(tBigPicture != nullptr) { if(tBigPicture != nullptr) {
driver->removeTexture(tBigPicture); driver->removeTexture(tBigPicture);
tBigPicture = nullptr; tBigPicture = nullptr;
...@@ -72,13 +76,13 @@ void ImageManager::ClearTexture() { ...@@ -72,13 +76,13 @@ void ImageManager::ClearTexture() {
tMap[0].clear(); tMap[0].clear();
tMap[1].clear(); tMap[1].clear();
tThumb.clear(); tThumb.clear();
tFields.clear();
tThumbLoadingMutex.lock(); tThumbLoadingMutex.lock();
tThumbLoading.clear(); tThumbLoading.clear();
while(!tThumbLoadingCodes.empty()) while(!tThumbLoadingCodes.empty())
tThumbLoadingCodes.pop(); tThumbLoadingCodes.pop();
tThumbLoadingThreadRunning = false; tThumbLoadingThreadRunning = false;
tThumbLoadingMutex.unlock(); tThumbLoadingMutex.unlock();
tFields.clear();
} }
void ImageManager::ResizeTexture() { void ImageManager::ResizeTexture() {
irr::s32 imgWidth = CARD_IMG_WIDTH * mainGame->xScale; irr::s32 imgWidth = CARD_IMG_WIDTH * mainGame->xScale;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment