1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 18:09:43 +00:00

Merge branch 'savescreenshots' into 'master'

!2358 follow-up (bug #6661)

Closes #6661

See merge request OpenMW/openmw!2376
This commit is contained in:
psi29a 2022-09-07 20:24:41 +00:00
commit 1943486812
2 changed files with 6 additions and 3 deletions

View file

@ -8,6 +8,7 @@
Bug #5714: Touch spells cast using ExplodeSpell don't always explode
Bug #5977: Fatigueless NPCs' corpse underwater changes animation on game load
Bug #6427: Enemy health bar disappears before damaging effect ends
Bug #6661: Saved games that have no preview screenshot cause issues or crashes
Bug #6937: Divided by Nix Hounds quest is broken
Bug #6939: OpenMW-CS: ID columns are too short
Bug #6949: Sun Damage effect doesn't work in quasi exteriors

View file

@ -429,12 +429,16 @@ 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;
if (!data.size())
{
Log(Debug::Warning) << "Selected save file '" << mCurrentSlot->mPath.filename() << "' has no savegame screenshot";
Log(Debug::Warning) << "Selected save file '" << mCurrentSlot->mPath.filename().string() << "' has no savegame screenshot";
return;
}
@ -465,8 +469,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));
}
}