From: Holger Schemel Date: Fri, 16 Mar 2018 16:17:47 +0000 (+0100) Subject: fixed cryptic default player name on Android; instead using "anonymous" now X-Git-Tag: 4.0.1.4^0 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=0c2353284cebd88f2d68cafc2acced0285a00b53;p=rocksndiamonds.git fixed cryptic default player name on Android; instead using "anonymous" now - on first start, the player name is taken from the system's user name - on Android systems, this is usually something cryptic like "ud_a123" - this was changed to use the default player name "anonymous" instead --- diff --git a/src/libgame/misc.c b/src/libgame/misc.c index bddd38d9..3e7719e1 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -571,7 +571,7 @@ char *getLoginName() if (GetUserName(login_name, &buffer_size) == 0) strcpy(login_name, ANONYMOUS_NAME); } -#else +#elif defined(PLATFORM_UNIX) && !defined(PLATFORM_ANDROID) if (login_name == NULL) { struct passwd *pwd; @@ -581,6 +581,8 @@ char *getLoginName() else login_name = getStringCopy(pwd->pw_name); } +#else + login_name = ANONYMOUS_NAME; #endif return login_name;