Subversion Repositories eduke32

Rev

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

Rev 3654 Rev 3708
Line 439... Line 439...
439
    }
439
    }
440
440
441
    if ((pgs == ALL) || (pgs == POPULATE_GAME))
441
    if ((pgs == ALL) || (pgs == POPULATE_GAME))
442
    {
442
    {
443
        struct grpfile *fg;
443
        struct grpfile *fg;
444
        int32_t i;
-
 
445
        GtkListStore *list;
444
        GtkListStore *list;
446
        GtkTreeIter iter;
445
        GtkTreeIter iter;
447
        GtkTreeView *gamelist;
446
        GtkTreeView *gamelist;
448
447
449
        gamelist = GTK_TREE_VIEW(stwidgets.gamelist);
448
        gamelist = GTK_TREE_VIEW(stwidgets.gamelist);
450
        list = GTK_LIST_STORE(gtk_tree_view_get_model(gamelist));
449
        list = GTK_LIST_STORE(gtk_tree_view_get_model(gamelist));
451
        gtk_list_store_clear(list);
450
        gtk_list_store_clear(list);
452
451
453
        for (fg = foundgrps; fg; fg=fg->next)
452
        for (fg = foundgrps; fg; fg=fg->next)
454
        {
453
        {
-
 
454
            struct grpfile *grp;
455
            for (i = 0; i<NUMGRPFILES; i++)
455
            for (grp = listgrps; grp; grp=grp->next)
456
                if (fg->crcval == grpfiles[i].crcval) break;
456
                if (fg->crcval == grp->crcval) break;
-
 
457
-
 
458
            if (grp == NULL)
457
            if (i == NUMGRPFILES) continue;     // unrecognised grp file
459
                continue;
458
460
459
            gtk_list_store_append(list, &iter);
461
            gtk_list_store_append(list, &iter);
460
            gtk_list_store_set(list, &iter, 0, grpfiles[i].name, 1, fg->name, 2, (gpointer)fg, -1);
462
            gtk_list_store_set(list, &iter, 0, grpfiles[i].name, 1, fg->name, 2, (gpointer)fg, -1);
461
            if (!Bstrcasecmp(fg->name, settings.selectedgrp))
463
            if (!Bstrcasecmp(fg->name, settings.selectedgrp))
462
            {
464
            {
Line 907... Line 909...
907
    gtk_main();
909
    gtk_main();
908
910
909
    SetPage(TAB_MESSAGES);
911
    SetPage(TAB_MESSAGES);
910
    if (retval) // launch the game with these parameters
912
    if (retval) // launch the game with these parameters
911
    {
913
    {
912
        int32_t i;
-
 
913
-
 
914
        ud.config.ScreenWidth = settings.xdim3d;
914
        ud.config.ScreenWidth = settings.xdim3d;
915
        ud.config.ScreenHeight = settings.ydim3d;
915
        ud.config.ScreenHeight = settings.ydim3d;
916
        ud.config.ScreenBPP = settings.bpp3d;
916
        ud.config.ScreenBPP = settings.bpp3d;
917
        ud.config.ScreenMode = settings.fullscreen;
917
        ud.config.ScreenMode = settings.fullscreen;
918
        ud.config.UseMouse = settings.usemouse;
918
        ud.config.UseMouse = settings.usemouse;
Line 928... Line 928...
928
        else Bsprintf(g_modDir, "/");
928
        else Bsprintf(g_modDir, "/");
929
929
930
        if (settings.autoload) ud.config.NoAutoLoad = FALSE;
930
        if (settings.autoload) ud.config.NoAutoLoad = FALSE;
931
        else ud.config.NoAutoLoad = TRUE;
931
        else ud.config.NoAutoLoad = TRUE;
932
932
933
        for (i = 0; i<NUMGRPFILES; i++) if (settings.crcval == grpfiles[i].crcval) break;
-
 
934
        if (i != NUMGRPFILES)
-
 
935
        {
933
        {
-
 
934
            struct grpfile *grp;
-
 
935
            for (grp = listgrps; grp; grp=grp->next)
-
 
936
                if (settings.crcval == grp->crcval) break;
-
 
937
-
 
938
            if (grp)
-
 
939
            {
936
            g_gameNamePtr = grpfiles[i].name;
940
                g_gameNamePtr = grp->name;
937
            g_dependencyCRC = grpfiles[i].dependency;
941
                g_dependencyCRC = grp->dependency;
-
 
942
938
            if (grpfiles[i].scriptname && g_scriptNamePtr == NULL)
943
                if (grp->scriptname && g_scriptNamePtr == NULL)
939
                g_scriptNamePtr = dup_filename(grpfiles[i].scriptname);
944
                    g_scriptNamePtr = dup_filename(grp->scriptname);
-
 
945
-
 
946
                if (grp->defname && g_defNamePtr == NULL)
-
 
947
                    g_defNamePtr = dup_filename(grp->defname);
-
 
948
            }
940
        }
949
        }
941
    }
950
    }
942
951
943
    return retval;
952
    return retval;
944
}
953
}