X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_menu.pas;h=11dd664dd078e80d4103dc8bed63e66d190ade31;hb=96f8e6b190e94847ab2527cc07ee8b19589c05fa;hp=53a1cbc6bae3cca965e73a2c6dfdd3ea144ccca3;hpb=414f2873efa0cce84499f64774db7000e6268971;p=d2df-sdl.git diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index 53a1cbc..11dd664 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -375,7 +375,7 @@ begin if g_Game_IsClient then MC_SEND_PlayerSettings; - s := e_GetDir(ConfigDirs); + s := e_GetWriteableDir(ConfigDirs); if s <> '' then g_Options_Write(s + '/' + CONFIG_FILENAME); g_Console_WriteGameConfig; @@ -699,7 +699,7 @@ begin gcMap := Map; end; - s := e_GetDir(ConfigDirs); + s := e_GetWriteableDir(ConfigDirs); if s <> '' then g_Options_Write_Gameplay_Custom(s + '/' + CONFIG_FILENAME); @@ -768,7 +768,7 @@ begin NetUseMaster := TGUISwitch(GetControl('swUseMaster')).ItemIndex = 0; end; - s := e_GetDir(ConfigDirs); + s := e_GetWriteableDir(ConfigDirs); if s <> '' then begin g_Options_Write_Net_Server(s + '/' + CONFIG_FILENAME); @@ -791,7 +791,7 @@ begin PW := TGUIEdit(GetControl('edPW')).Text; end; - s := e_GetDir(ConfigDirs); + s := e_GetWriteableDir(ConfigDirs); if s <> '' then g_Options_Write_Net_Client(s + '/' + CONFIG_FILENAME); g_Game_StartClient(NetClientIP, NetClientPort, PW); @@ -809,7 +809,7 @@ begin PW := TGUIEdit(GetControl('edPW')).Text; end; - s := e_GetDir(ConfigDirs); + s := e_GetWriteableDir(ConfigDirs); if s <> '' then g_Options_Write_Net_Client(s + '/' + CONFIG_FILENAME); g_Game_StartClient(NetClientIP, NetClientPort, PW); @@ -860,6 +860,7 @@ begin WAD := TGUIFileListBox(GetControl('lsWAD')).SelectedItem(); TwoPlayers := TGUISwitch(GetControl('swPlayers')).ItemIndex = 1; end; + WAD := e_FindWadRel(MegawadDirs, WAD); if TwoPlayers then n := 2 @@ -1357,6 +1358,8 @@ begin if (wad = '') or (map = '') then Exit; + wad := e_FindWadRel(MapDirs, WAD); + res := wad+':\'+map; TGUILabel(TGUIMenu(g_GUI_GetWindow('CustomGameMenu').GetControl('mCustomGameMenu')).GetControl('lbMap')).Text := res; @@ -1661,7 +1664,7 @@ begin gLanguageChange := True; gAskLanguage := False; - s := e_GetDir(ConfigDirs); + s := e_GetWriteableDir(ConfigDirs); if s <> '' then g_Options_Write_Language(s + '/' + CONFIG_FILENAME); @@ -1679,7 +1682,7 @@ begin gLanguageChange := True; gAskLanguage := False; - s := e_GetDir(ConfigDirs); + s := e_GetWriteableDir(ConfigDirs); if s <> '' then g_Options_Write_Language(s + '/' + CONFIG_FILENAME); @@ -1870,7 +1873,7 @@ begin with TGUIListBox(menu.GetControl('lsResolution')) do begin - list := sys_GetDispalyModes(gBPP); + list := sys_GetDisplayModes(gBPP); if list <> nil then begin Items := list; @@ -1925,7 +1928,7 @@ begin gLanguageChange := True; gAskLanguage := False; - s := e_GetDir(ConfigDirs); + s := e_GetWriteableDir(ConfigDirs); if s <> '' then g_Options_Write_Language(s + '/' + CONFIG_FILENAME) end; @@ -1937,7 +1940,7 @@ begin gLanguageChange := True; gAskLanguage := False; - s := e_GetDir(ConfigDirs); + s := e_GetWriteableDir(ConfigDirs); if s <> '' then g_Options_Write_Language(s + '/' + CONFIG_FILENAME) end;