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.2 by greg, Thu Oct 8 16:19:30 1992 UTC vs.
Revision 2.5 by greg, Mon Nov 2 16:01:05 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,
42 <                                        _MRES256COLOR, -1};
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");
# Line 85 | Line 87 | char  *name, *id;
87   static
88   vga_close()                                     /* close VGA */
89   {
90 +        ms_gcdone(&vga_driver);
91          _setvideomode(_DEFAULTMODE);
92          errvec = stderr_v;                      /* reset error vectors */
93          cmdvec = NULL;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines