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:
+1
-8
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user