mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-05 04:03:49 +01:00
Avoid creating zero-size fonts (seems to be because of an init order problem during app switching)
This commit is contained in:
1 parent
e0a5a3e2bf
commit
771f2b3fe0
2 files changed
+5
No files matched your search
@@ -138,6 +138,10 @@ TextDrawerCocoa::~TextDrawerCocoa() {
|
||||
|
||||
// TODO: Share with other backends.
|
||||
void TextDrawerCocoa::SetOrCreateFont(const FontStyle &style) {
|
||||
if (style.sizePts <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto iter = fontMap_.find(style);
|
||||
if (iter != fontMap_.end()) {
|
||||
fontStyle_ = style;
|
||||
|
||||
@@ -1089,6 +1089,7 @@ const FontStyle *GetTextStyle(const UIContext &dc, TextSize size) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
_dbg_assert_(style->sizePts > 0);
|
||||
return style;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user