git-svn-id: https://svn.eduke32.com/eduke32@985 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-08-17 09:25:52 +00:00
parent 132db81381
commit 81d0ea972d
2 changed files with 9 additions and 5 deletions

View File

@ -50,7 +50,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "&Game:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 5, 100, 8
CONTROL "", IDGDATA, "LISTBOX", LBS_NOINTEGRALHEIGHT | LBS_USETABSTOPS | LBS_STANDARD | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 15, 226, 70
CONTROL "&Mod:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 90, 100, 8
CONTROL "Game&dir:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 90, 100, 8
CONTROL "", IDGGAMEDIR, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 10, 99, 226, 156
END

View File

@ -69,7 +69,7 @@ int getfilenames(char *path)
#define POPULATE_VIDEO 1
#define POPULATE_CONFIG 2
#define POPULATE_GAME 4
#define POPULATE_MODS 8
#define POPULATE_GAMEDIRS 8
static void PopulateForm(int pgs)
{
@ -171,7 +171,7 @@ static void PopulateForm(int pgs)
}
}
if (pgs & POPULATE_MODS)
if (pgs & POPULATE_GAMEDIRS)
{
CACHE1D_FIND_REC *dirs = NULL;
@ -181,12 +181,14 @@ static void PopulateForm(int pgs)
(void)ComboBox_ResetContent(hwnd);
j = ComboBox_AddString(hwnd, "None");
(void)ComboBox_SetItemData(hwnd, j, 0);
(void)ComboBox_SetCurSel(hwnd, j);
for (dirs=finddirs,i=1; dirs != NULL; dirs=dirs->next,i++)
{
Bsprintf(buf, "%s", dirs->name);
j = ComboBox_AddString(hwnd, buf);
(void)ComboBox_SetItemData(hwnd, j, i);
if (Bstrcmp(dirs->name,settings.gamedir) == 0)(void)ComboBox_SetCurSel(hwnd, j);
if (Bstrcmp(dirs->name,settings.gamedir) == 0)
(void)ComboBox_SetCurSel(hwnd, j);
}
}
}
@ -688,11 +690,13 @@ int startwin_run(void)
ud.config.UseJoystick = settings.usejoy;
duke3dgrp = settings.selectedgrp;
g_GameType = settings.game;
if (settings.gamedir)
if (settings.gamedir != NULL)
{
addsearchpath(settings.gamedir);
Bstrcpy(mod_dir,settings.gamedir);
}
else Bsprintf(mod_dir,"None");
for (i = 0; i<numgrpfiles; i++) if (settings.crcval == grpfiles[i].crcval) break;
if (i != numgrpfiles)