fix vsync display env var handling to be right

This commit is contained in:
Carsten Haitzler 2014-07-30 08:38:21 +09:00
parent aea57d7a8e
commit 2be17655fa
2 changed files with 2 additions and 2 deletions

View File

@ -222,7 +222,7 @@ _svr_init(void)
char buf[4096], *disp, *s; char buf[4096], *disp, *s;
disp = getenv("DISPLAY"); disp = getenv("DISPLAY");
if (disp) disp = ":0"; if (!disp) disp = ":0";
snprintf(buf, sizeof(buf), "ecore-x-vsync-%s", disp); snprintf(buf, sizeof(buf), "ecore-x-vsync-%s", disp);
for (s = buf; *s; s++) for (s = buf; *s; s++)
{ {

View File

@ -410,7 +410,7 @@ _glvsync_animator_tick_source_set(void)
ecore_con_init(); ecore_con_init();
} }
disp = getenv("DISPLAY"); disp = getenv("DISPLAY");
if (disp) disp = ":0"; if (!disp) disp = ":0";
snprintf(buf, sizeof(buf), "ecore-x-vsync-%s", disp); snprintf(buf, sizeof(buf), "ecore-x-vsync-%s", disp);
for (s = buf; *s; s++) for (s = buf; *s; s++)
{ {