mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Keep savegame screenshots up-to-date
This commit is contained in:
parent
0d3a1470c9
commit
81c78f5477
@ -427,6 +427,10 @@ namespace MWGui
|
|||||||
|
|
||||||
mInfoText->setCaptionWithReplacing(text.str());
|
mInfoText->setCaptionWithReplacing(text.str());
|
||||||
|
|
||||||
|
// Reset the image for the case we're unable to recover a screenshot
|
||||||
|
mScreenshotTexture.reset();
|
||||||
|
mScreenshot->setRenderItemTexture(nullptr);
|
||||||
|
mScreenshot->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
||||||
|
|
||||||
// Decode screenshot
|
// Decode screenshot
|
||||||
const std::vector<char>& data = mCurrentSlot->mProfile.mScreenshot;
|
const std::vector<char>& data = mCurrentSlot->mProfile.mScreenshot;
|
||||||
@ -463,8 +467,6 @@ namespace MWGui
|
|||||||
texture->setUnRefImageDataAfterApply(true);
|
texture->setUnRefImageDataAfterApply(true);
|
||||||
|
|
||||||
mScreenshotTexture = std::make_unique<osgMyGUI::OSGTexture>(texture);
|
mScreenshotTexture = std::make_unique<osgMyGUI::OSGTexture>(texture);
|
||||||
|
|
||||||
mScreenshot->setRenderItemTexture(mScreenshotTexture.get());
|
mScreenshot->setRenderItemTexture(mScreenshotTexture.get());
|
||||||
mScreenshot->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user