use Player %d when no default player name set

This commit is contained in:
Andy2 2011-05-20 06:51:13 -07:00
parent 3df47f8fe2
commit 13e8667634

View file

@ -228,7 +228,12 @@ public class CommonPrefs {
case 2: id = R.string.key_player3_name; break;
case 3: id = R.string.key_player4_name; break;
}
return getString( context, id );
String result = getString( context, id );
if ( null == result || 0 == result.length() ) {
String fmt = context.getString( R.string.playerf );
result = String.format( fmt, num + 1 );
}
return result;
}
public static CurGameInfo.XWPhoniesChoice