stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/stratagus stratagus.c


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src/stratagus stratagus.c
Date: 31 Jan 2004 20:40:05 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       04/01/31 20:40:05

Modified files:
        src/stratagus  : stratagus.c 

Log message:
        Default play name to username on unix systems.

Patches:
Index: stratagus/src/stratagus/stratagus.c
diff -u stratagus/src/stratagus/stratagus.c:1.258 
stratagus/src/stratagus/stratagus.c:1.259
--- stratagus/src/stratagus/stratagus.c:1.258   Sat Jan 24 14:08:08 2004
+++ stratagus/src/stratagus/stratagus.c Sat Jan 31 20:40:04 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: stratagus.c,v 1.258 2004/01/24 03:08:08 jsalmon3 Exp $
+//      $Id: stratagus.c,v 1.259 2004/01/31 09:40:04 nobody_ Exp $
 
 //@{
 
@@ -971,8 +971,17 @@
        CclStartFile = "scripts/stratagus.lua";
        EditorStartFile = "scripts/editor.lua";
 
+       //  Default play name to username on unix systems.
        memset(LocalPlayerName, 0, 16);
+#ifdef USE_WIN32
        strcpy(LocalPlayerName, "Anonymous");
+#else
+       if (getenv("USERNAME")) {
+               strncpy(LocalPlayerName, getenv("USERNAME"), 14);
+       } else {
+               strcpy(LocalPlayerName, "Anonymous");
+       }
+#endif
 
        // FIXME: Parse options before or after scripts?
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]