ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/vga.c
(Generate patch)

Comparing ray/src/rt/vga.c (file contents):
Revision 2.3 by greg, Tue Oct 13 17:42:22 1992 UTC vs.
Revision 2.4 by greg, Wed Oct 14 10:30:30 1992 UTC

# Line 38 | Line 38 | struct driver *
38   vga_init(name, id)                      /* open VGA */
39   char  *name, *id;
40   {
41 <        static short  mode_pref[] = {_XRES256COLOR, _SVRES256COLOR,
41 >        static short  mode_pref[] = {_MRES256COLOR, -1};
42 >        static short  smode_pref[] = {_XRES256COLOR, _SVRES256COLOR,
43                                          _VRES256COLOR, _MRES256COLOR, -1};
44          char  *ep;
45 <        register int  i;
45 >        register short  *mp;
46  
47 <        for (i = 0; mode_pref[i] != -1; i++)
48 <                if (_setvideomode(mode_pref[i]))
47 >        mp = !strcmp(name, "vga") ? mode_pref : smode_pref;
48 >        for ( ; *mp != -1; mp++)
49 >                if (_setvideomode(*mp))
50                          break;
51 <        if (mode_pref[i] == -1) {
51 >        if (*mp == -1) {
52                  _setvideomode(_DEFAULTMODE);
53                  stderr_v(name);
54                  stderr_v(": card not present or insufficient VGA memory\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines