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

@ -182,8 +182,19 @@ void gfx_ctx_get_video_size(unsigned *width, unsigned *height)
{ {
if (!g_dpy || g_win == None) if (!g_dpy || g_win == None)
{ {
*width = 0; Display *dpy = XOpenDisplay(NULL);
*height = 0; if (dpy)
{
int screen = DefaultScreen(dpy);
*width = DisplayWidth(dpy, screen);
*height = DisplayHeight(dpy, screen);
XCloseDisplay(dpy);
}
else
{
*width = 0;
*height = 0;
}
} }
else else
{ {