mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
PPGe: Fallback to atlas text on alloc fail.
This commit is contained in:
parent
c1fa4958d9
commit
47523a0557
1 changed files with 8 additions and 4 deletions
|
@ -913,8 +913,10 @@ void PPGeDrawText(const char *text, float x, float y, const PPGeStyle &style) {
|
|||
|
||||
if (HasTextDrawer()) {
|
||||
PPGeTextDrawerImage im = PPGeGetTextImage(text, style, 480.0f - x, false);
|
||||
PPGeDrawTextImage(im, x, y, style);
|
||||
return;
|
||||
if (im.ptr) {
|
||||
PPGeDrawTextImage(im, x, y, style);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (style.hasShadow) {
|
||||
|
@ -988,8 +990,10 @@ void PPGeDrawTextWrapped(const char *text, float x, float y, float wrapWidth, fl
|
|||
}
|
||||
|
||||
PPGeTextDrawerImage im = PPGeGetTextImage(s.c_str(), adjustedStyle, wrapWidth <= 0 ? 480.0f - x : wrapWidth, true);
|
||||
PPGeDrawTextImage(im, x, y, adjustedStyle);
|
||||
return;
|
||||
if (im.ptr) {
|
||||
PPGeDrawTextImage(im, x, y, adjustedStyle);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int sx = style.hasShadow ? 1 : 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue