X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_options.pas;h=cc9a71400bc4a4a7cf159a0392e171f0c8c4cae8;hb=ded89321df07e3f5832331127637375840c25e6f;hp=506fc186424753429b21151925830bb1a0b6376d;hpb=2f2f9c997a76f5394c4deb2fa7d54b99a6186c87;p=d2df-sdl.git diff --git a/src/game/g_options.pas b/src/game/g_options.pas index 506fc18..cc9a714 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -148,8 +148,12 @@ uses begin ASSERT(n >= 1); Result := GetUserName; - if Result = '' then Result := 'Player' + IntToStr(machine MOD 10000); - if n > 1 then Result := Copy(Result, 1, 10) + (' ' + IntToStr(n)) + if Result = '' then + Result := 'Player' + IntToStr(machine MOD 10000); + if n = 1 then + Result := Copy(Result, 1, 12) + ' ' + else + Result := Copy(Result, 1, 10) + ' ' + IntToStr(n) end; procedure g_Options_SetDefaultVideo; @@ -966,6 +970,9 @@ begin config.WriteBool('Video', 'Fullscreen', gFullscreen); config.WriteBool('Video', 'Maximized', gWinMaximized); + config.WriteStr('Player1', 'Name', gPlayer1Settings.Name); + config.WriteStr('Player2', 'Name', gPlayer2Settings.Name); + config.SaveFile(FileName); config.Free(); end;