mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-29 15:41:31 +00:00
Keep savegame screenshots up-to-date
This commit is contained in:
parent
0d3a1470c9
commit
81c78f5477
1 changed files with 4 additions and 2 deletions
|
@ -427,6 +427,10 @@ namespace MWGui
|
|||
|
||||
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
|
||||
const std::vector<char>& data = mCurrentSlot->mProfile.mScreenshot;
|
||||
|
@ -463,8 +467,6 @@ namespace MWGui
|
|||
texture->setUnRefImageDataAfterApply(true);
|
||||
|
||||
mScreenshotTexture = std::make_unique<osgMyGUI::OSGTexture>(texture);
|
||||
|
||||
mScreenshot->setRenderItemTexture(mScreenshotTexture.get());
|
||||
mScreenshot->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue