From 81d0ea972d2339f71bdd93283a6621bc56b0d334 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 17 Aug 2008 09:25:52 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@985 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/misc/gameres.rc | 2 +- polymer/eduke32/source/startwin.game.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/source/misc/gameres.rc b/polymer/eduke32/source/misc/gameres.rc index 65e8ab56c..3426b3e11 100644 --- a/polymer/eduke32/source/misc/gameres.rc +++ b/polymer/eduke32/source/misc/gameres.rc @@ -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 diff --git a/polymer/eduke32/source/startwin.game.c b/polymer/eduke32/source/startwin.game.c index bab775722..8d3585621 100644 --- a/polymer/eduke32/source/startwin.game.c +++ b/polymer/eduke32/source/startwin.game.c @@ -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