X11: Fix renaming at player selection

Due to the new player selection dialog I did, it was possible
to rename your character - but this didn't rename the lock files
and tried to load a save from the wrong name.

This is a bit of a hack, but seems to work and didn't seem to
cause problems for the tty.
This commit is contained in:
Pasi Kallinen
2017-10-31 21:18:24 +02:00
parent 72978d69fa
commit fe9762d1cc
6 changed files with 47 additions and 27 deletions
+1 -8
View File
@@ -1474,18 +1474,11 @@ X11_askname()
{
Widget popup, dialog;
Arg args[1];
char *defplname = (char *)0;
#ifdef UNIX
defplname = get_login_name();
#endif
(void) strncpy(plname, defplname ? defplname : "Mumbles",
sizeof plname - 1);
plname[sizeof plname - 1] = '\0';
if (iflags.wc_player_selection == VIA_DIALOG) {
/* X11_player_selection_dialog() handles name query */
plsel_ask_name = TRUE;
iflags.defer_plname = TRUE;
return;
} /* else iflags.wc_player_selection == VIA_PROMPTS */