mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +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());
|
||||
|
||||
// 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…
x
Reference in New Issue
Block a user