Subversion Repositories eduke32

Rev

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

Rev 854 Rev 886
Line 29... Line 29...
29
    int xdim3d, ydim3d, bpp3d;
29
    int xdim3d, ydim3d, bpp3d;
30
    int forcesetup;
30
    int forcesetup;
31
    int usemouse, usejoy;
31
    int usemouse, usejoy;
32
    char selectedgrp[BMAX_PATH+1];
32
    char selectedgrp[BMAX_PATH+1];
33
    int game;
33
    int game;
-
 
34
    int crcval;
34
} settings;
35
} settings;
35
36
36
extern int gtkenabled;
37
extern int gtkenabled;
37
38
38
static GtkWidget *startwin = NULL;
39
static GtkWidget *startwin = NULL;
Line 222... Line 223...
222
    if (gtk_tree_selection_get_selected(selection, &model, &iter))
223
    if (gtk_tree_selection_get_selected(selection, &model, &iter))
223
    {
224
    {
224
        gtk_tree_model_get(model, &iter, 2, (gpointer)&fg, -1);
225
        gtk_tree_model_get(model, &iter, 2, (gpointer)&fg, -1);
225
        strcpy(settings.selectedgrp, fg->name);
226
        strcpy(settings.selectedgrp, fg->name);
226
        settings.game = fg->game;
227
        settings.game = fg->game;
-
 
228
        settings.crcval = fg->crcval;
227
    }
229
    }
228
}
230
}
229
231
230
static gboolean on_startwin_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data)
232
static gboolean on_startwin_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data)
231
{
233
{
Line 739... Line 741...
739
    //if (!startwin) return 1;
741
    //if (!startwin) return 1;
740
    gtk_main_iteration_do(FALSE);
742
    gtk_main_iteration_do(FALSE);
741
    return 0;
743
    return 0;
742
}
744
}
743
745
744
extern char *duke3dgrp;
746
extern char *duke3dgrp, *duke3dgrpstring;
745
747
746
int startwin_run(void)
748
int startwin_run(void)
747
{
749
{
748
    if (!gtkenabled) return 1;
750
    if (!gtkenabled) return 1;
749
    if (!startwin) return 1;
751
    if (!startwin) return 1;
Line 764... Line 766...
764
    gtk_main();
766
    gtk_main();
765
767
766
    SetPage(TAB_MESSAGES);
768
    SetPage(TAB_MESSAGES);
767
    if (retval)
769
    if (retval)
768
    {
770
    {
-
 
771
        int i;
-
 
772
769
        ud.config.ScreenMode = settings.fullscreen;
773
        ud.config.ScreenMode = settings.fullscreen;
770
        ud.config.ScreenWidth = settings.xdim3d;
774
        ud.config.ScreenWidth = settings.xdim3d;
771
        ud.config.ScreenHeight = settings.ydim3d;
775
        ud.config.ScreenHeight = settings.ydim3d;
772
        ud.config.ScreenBPP = settings.bpp3d;
776
        ud.config.ScreenBPP = settings.bpp3d;
773
        ud.config.ForceSetup = settings.forcesetup;
777
        ud.config.ForceSetup = settings.forcesetup;
774
        ud.config.UseMouse = settings.usemouse;
778
        ud.config.UseMouse = settings.usemouse;
775
        ud.config.UseJoystick = settings.usejoy;
779
        ud.config.UseJoystick = settings.usejoy;
776
        duke3dgrp = settings.selectedgrp;
780
        duke3dgrp = settings.selectedgrp;
777
        g_GameType = settings.game;
781
        g_GameType = settings.game;
-
 
782
-
 
783
        for (i = 0; i<numgrpfiles; i++) if (settings.crcval == grpfiles[i].crcval) break;
-
 
784
        if (i != numgrpfiles)
-
 
785
            duke3dgrpstring = (char *)grpfiles[i].name;
778
    }
786
    }
779
787
780
    return retval;
788
    return retval;
781
}
789
}
782
790