MPQ Support LUS Bump (#5570)
* Adapt to changes to LUS regarding including MPQ support. * CMake compile definitions are stupid. * Don't manually close O2RArchive. * Finish LUS bump, including SoH-side fix for font free crash.
This commit is contained in:
@@ -984,7 +984,6 @@ OTRVersion ReadPortVersionFromOTR(std::string otrPath) {
|
||||
version.minor = reader->ReadUInt16();
|
||||
version.patch = reader->ReadUInt16();
|
||||
}
|
||||
archive->Close();
|
||||
}
|
||||
|
||||
return version;
|
||||
@@ -1679,7 +1678,9 @@ ImFont* OTRGlobals::CreateFontWithSize(float size, std::string fontPath) {
|
||||
initData->Path = fontPath;
|
||||
std::shared_ptr<Ship::Font> fontData = std::static_pointer_cast<Ship::Font>(
|
||||
Ship::Context::GetInstance()->GetResourceManager()->LoadResource(fontPath, false, initData));
|
||||
font = mImGuiIo->Fonts->AddFontFromMemoryTTF(fontData->Data, fontData->DataSize, size);
|
||||
ImFontConfig fontConf;
|
||||
fontConf.FontDataOwnedByAtlas = false;
|
||||
font = mImGuiIo->Fonts->AddFontFromMemoryTTF(fontData->Data, fontData->DataSize, size, &fontConf);
|
||||
}
|
||||
// FontAwesome fonts need to have their sizes reduced by 2.0f/3.0f in order to align correctly
|
||||
float iconFontSize = size * 2.0f / 3.0f;
|
||||
|
||||
Reference in New Issue
Block a user