Subversion Repositories eduke32

Rev

Rev 222 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 222 Rev 234
Line 30... Line 30...
30
    int fullscreen;
30
    int fullscreen;
31
    int xdim, ydim, bpp;
31
    int xdim, ydim, bpp;
32
    int forcesetup;
32
    int forcesetup;
33
    int usemouse, usejoy;
33
    int usemouse, usejoy;
34
    char selectedgrp[BMAX_PATH+1];
34
    char selectedgrp[BMAX_PATH+1];
-
 
35
        int game;
35
} settings;
36
} settings;
36
37
37
static HWND startupdlg = NULL;
38
static HWND startupdlg = NULL;
38
static HWND pages[3] = { NULL, NULL, NULL };
39
static HWND pages[3] = { NULL, NULL, NULL };
39
static int done = -1, mode = TAB_CONFIG;
40
static int done = -1, mode = TAB_CONFIG;
Line 119... Line 120...
119
            for (i = 0; i<numgrpfiles; i++)
120
            for (i = 0; i<numgrpfiles; i++)
120
                if (fg->crcval == grpfiles[i].crcval) break;
121
                if (fg->crcval == grpfiles[i].crcval) break;
121
            if (i == numgrpfiles) continue;     // unrecognised grp file
122
            if (i == numgrpfiles) continue;     // unrecognised grp file
122
123
123
            Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name);
124
            Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name);
-
 
125
                        fg->game = grpfiles[i].game;
124
            j = ListBox_AddString(hwnd, buf);
126
            j = ListBox_AddString(hwnd, buf);
125
            ListBox_SetItemData(hwnd, j, (LPARAM)fg);
127
            ListBox_SetItemData(hwnd, j, (LPARAM)fg);
126
            if (!Bstrcasecmp(fg->name, settings.selectedgrp)) ListBox_SetCurSel(hwnd, j);
128
            if (!Bstrcasecmp(fg->name, settings.selectedgrp)) ListBox_SetCurSel(hwnd, j);
127
        }
129
        }
128
    }
130
    }
Line 171... Line 173...
171
    switch (uMsg) {
173
    switch (uMsg) {
172
    case WM_COMMAND:
174
    case WM_COMMAND:
173
        switch (LOWORD(wParam)) {
175
        switch (LOWORD(wParam)) {
174
        case IDGDATA: {
176
        case IDGDATA: {
175
                int i;
177
                int i;
-
 
178
                                        if (HIWORD(wParam) != LBN_SELCHANGE) break;
176
                i = ListBox_GetCurSel((HWND)lParam);
179
                i = ListBox_GetCurSel((HWND)lParam);
177
                if (i != CB_ERR) i = ListBox_GetItemData((HWND)lParam, i);
180
                if (i != CB_ERR) i = ListBox_GetItemData((HWND)lParam, i);
-
 
181
                                        if (i != CB_ERR) {
178
                if (i != CB_ERR) strcpy(settings.selectedgrp, ((struct grpfile*)i)->name);
182
                                                strcpy(settings.selectedgrp, ((struct grpfile*)i)->name);
-
 
183
                                                settings.game = ((struct grpfile*)i)->game;
-
 
184
                                        }
179
                return TRUE;
185
                return TRUE;
180
            }
186
            }
181
        default: break;
187
        default: break;
182
        }
188
        }
183
        break;
189
        break;
Line 509... Line 515...
509
    settings.ydim = ScreenHeight;
515
    settings.ydim = ScreenHeight;
510
    settings.bpp = ScreenBPP;
516
    settings.bpp = ScreenBPP;
511
    settings.forcesetup = ForceSetup;
517
    settings.forcesetup = ForceSetup;
512
    settings.usemouse = UseMouse;
518
    settings.usemouse = UseMouse;
513
    settings.usejoy = UseJoystick;
519
    settings.usejoy = UseJoystick;
-
 
520
        settings.game = namversion;
514
    strncpy(settings.selectedgrp, duke3dgrp, BMAX_PATH);
521
    strncpy(settings.selectedgrp, duke3dgrp, BMAX_PATH);
515
    PopulateForm(-1);
522
    PopulateForm(-1);
516
523
517
    while (done < 0) {
524
    while (done < 0) {
518
        switch (GetMessage(&msg, NULL, 0,0)) {
525
        switch (GetMessage(&msg, NULL, 0,0)) {
Line 535... Line 542...
535
        ScreenBPP = settings.bpp;
542
        ScreenBPP = settings.bpp;
536
        ForceSetup = settings.forcesetup;
543
        ForceSetup = settings.forcesetup;
537
        UseMouse = settings.usemouse;
544
        UseMouse = settings.usemouse;
538
        UseJoystick = settings.usejoy;
545
        UseJoystick = settings.usejoy;
539
        duke3dgrp = settings.selectedgrp;
546
        duke3dgrp = settings.selectedgrp;
-
 
547
                namversion = settings.game;
540
    }
548
    }
541
549
542
    if (wavedevs) {
550
    if (wavedevs) {
543
        struct audioenumdev *d, *e;
551
        struct audioenumdev *d, *e;
544
        free(wavedevs->drvs);
552
        free(wavedevs->drvs);