Merge branch 'fontainofdreams' into 'master'

Allow bitmap font texture reading to end prematurely (#8378)

See merge request OpenMW/openmw!4564
This commit is contained in:
psi29a 2025-03-05 13:11:10 +00:00
commit 888415059c

View File

@ -425,7 +425,8 @@ namespace Gui
textureData.resize(width * height * 4);
bitmapFile->read(textureData.data(), width * height * 4);
if (!bitmapFile->good())
fail(*bitmapFile, bitmapFilename, "File too small to be a valid bitmap");
Log(Debug::Warning) << "Font bitmap " << bitmapFilename << " ended prematurely, using partial data ("
<< bitmapFile->gcount() << "/" << (width * height * 4) << " bytes)";
bitmapFile.reset();
MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().createTexture(bitmapFilename);