From d2d9977f1153b5222b34859a2cb22b957bfe3221 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 20 Nov 2009 13:01:45 +0000 Subject: Native glx is compiling and running now (although no acceleration is happening... to be investigated further) --- xorg-server/hw/xwin/winprefs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'xorg-server/hw/xwin/winprefs.c') diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c index 7059ffd6d..4333d5fd4 100644 --- a/xorg-server/hw/xwin/winprefs.c +++ b/xorg-server/hw/xwin/winprefs.c @@ -784,16 +784,15 @@ LoadPreferences (void) /* Setup a DISPLAY environment variable, need to allocate on heap */ /* because putenv doesn't copy the argument... */ - snprintf (szDisplay, 512, "DISPLAY=127.0.0.1:%s.0", display); - szEnvDisplay = (char *)(malloc (strlen(szDisplay)+1)); + winGetDisplayName(szDisplay, atoi(display)); + szEnvDisplay = (char *)(malloc(strlen(szDisplay)+strlen("DISPLAY=")+1)); if (szEnvDisplay) { - strcpy (szEnvDisplay, szDisplay); + snprintf(szEnvDisplay, 512, "DISPLAY=%s", szDisplay); putenv (szEnvDisplay); } /* Replace any "%display%" in menu commands with display string */ - snprintf (szDisplay, 512, "127.0.0.1:%s.0", display); for (i=0; i