Split the atlas into three, well two, but two different cases for the fonts.

Platforms that can use OS fonts don't need font_atlas.zim but they do
need ascii font for debug, so does use asciifont_atlas.zim.
This commit is contained in:
Henrik Rydgård committed 2021-12-10 23:22:08 +01:00
1 parent 204b2a48e4
commit d4237fd542
19 files changed
+54 -3277

No files matched your search

+11 -2
View File
@@ -40,9 +40,18 @@ void UIContext::BeginFrame() {
uitexture_ = CreateTextureFromFile(draw_, "ui_atlas.zim", ImageFileType::ZIM, false);
_dbg_assert_msg_(uitexture_, "Failed to load ui_atlas.zim.\n\nPlace it in the directory \"assets\" under your PPSSPP directory.");
if (!fontTexture_) {
#if PPSSPP_PLATFORM(WINDOWS) || PPSSPP_PLATFORM(ANDROID)
// Don't bother with loading font_atlas.zim
#else
fontTexture_ = CreateTextureFromFile(draw_, "font_atlas.zim", ImageFileType::ZIM, false);
if (!fontTexture_)
WARN_LOG(SYSTEM, "Failed to load font_atlas.zim");
#endif
if (!fontTexture_) {
// Load the smaller ascii font only, like on Android. For debug ui etc.
fontTexture_ = CreateTextureFromFile(draw_, "asciifont_atlas.zim", ImageFileType::ZIM, false);
if (!fontTexture_) {
WARN_LOG(SYSTEM, "Failed to load font_atlas.zim");
}
}
}
}
uidrawbufferTop_->SetCurZ(0.0f);