mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +00:00
X11TK: Even more failsafes for fonts
This commit is contained in:
parent
773db8eb75
commit
7cc477d458
1 changed files with 11 additions and 11 deletions
|
|
@ -377,17 +377,17 @@ static void X11Toolkit_InitWindowFonts(SDL_ToolkitWindowX11 *window)
|
|||
window->font_struct = X11_XLoadQueryFont(window->display, font);
|
||||
SDL_free(font);
|
||||
if (!window->font_struct) {
|
||||
if (window->iscale > 0) {
|
||||
if (window->scale) {
|
||||
window->iscale = (int)SDL_ceilf(window->scale);
|
||||
window->scale = 0;
|
||||
} else {
|
||||
window->iscale--;
|
||||
}
|
||||
goto load_font_traditional;
|
||||
} else {
|
||||
window->font_struct = X11_XLoadQueryFont(window->display, g_ToolkitFontLatin1Fallback);
|
||||
}
|
||||
if (window->iscale > 0) {
|
||||
if (window->scale) {
|
||||
window->iscale = (int)SDL_ceilf(window->scale);
|
||||
window->scale = 0;
|
||||
} else {
|
||||
window->iscale--;
|
||||
}
|
||||
goto load_font_traditional;
|
||||
} else {
|
||||
window->font_struct = X11_XLoadQueryFont(window->display, g_ToolkitFontLatin1Fallback);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue