Fix font rendering in GLES.

This commit is contained in:
Themaister 2012-09-16 00:57:39 +02:00
parent 5365087311
commit 282346572d

View File

@ -181,10 +181,21 @@ void gfx_ctx_update_window_title(bool reset)
void gfx_ctx_get_video_size(unsigned *width, unsigned *height) void gfx_ctx_get_video_size(unsigned *width, unsigned *height)
{ {
if (!g_dpy || g_win == None) if (!g_dpy || g_win == None)
{
Display *dpy = XOpenDisplay(NULL);
if (dpy)
{
int screen = DefaultScreen(dpy);
*width = DisplayWidth(dpy, screen);
*height = DisplayHeight(dpy, screen);
XCloseDisplay(dpy);
}
else
{ {
*width = 0; *width = 0;
*height = 0; *height = 0;
} }
}
else else
{ {
XWindowAttributes target; XWindowAttributes target;