ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/daodan_gl.c
(Generate patch)

Comparing Daodan/src/daodan_gl.c (file contents):
Revision 326 by rossy, Thu May 28 10:33:59 2009 UTC vs.
Revision 340 by rossy, Sat Jun 6 12:25:58 2009 UTC

# Line 19 | Line 19 | const M3tDisplayMode daodan_reslist[] =
19          { 720 , 576,  0, 0 },
20          { 768 , 480,  0, 0 },
21          { 800 , 480,  0, 0 },
22 +        { 800 , 600,  0, 0 },
23          { 852 , 480,  0, 0 },
24          { 856 , 480,  0, 0 },
25          { 960 , 540,  0, 0 },
# Line 40 | Line 41 | const M3tDisplayMode daodan_reslist[] =
41          { 1600, 900,  0, 0 },
42          { 1600, 1200, 0, 0 },
43          { 1920, 1080, 0, 0 },
44 +        { 1920, 1200, 0, 0 },
45          { 1920, 1440, 0, 0 },
46   };
47  
# Line 85 | Line 87 | unsigned int ONICALL daodan_enumerate_va
87          
88          for (i = 0; i < builtin_depths; i ++)
89          {
90 +                bool scrInsert = false;
91 +                
92                  modes[vmodes].Width  = 640;
93                  modes[vmodes].Height = 480;
94                  modes[vmodes].Depth  = daodan_resdepths[i];
# Line 96 | Line 100 | unsigned int ONICALL daodan_enumerate_va
100                          if (!(daodan_reslist[j].Width == 640 && daodan_reslist[j].Height == 480) && !(daodan_reslist[j].Width == screen_x && daodan_reslist[j].Height == screen_y) &&
101                                  ((daodan_reslist[j].Width < screen_x && daodan_reslist[j].Height < screen_y) || daodan_testmode(daodan_reslist[j])))
102                          {
103 +                                if (!scrInsert && (daodan_reslist[j].Width > screen_x || (daodan_reslist[j].Width == screen_x &&  daodan_reslist[j].Height > screen_y)))
104 +                                {
105 +                                        modes[vmodes].Width  = screen_x;
106 +                                        modes[vmodes].Height = screen_y;
107 +                                        modes[vmodes].Depth  = daodan_resdepths[i];
108 +                                        
109 +                                        if (++vmodes == max_modes - builtin_modes + i)
110 +                                                goto modesfull;
111 +                                        
112 +                                        scrInsert = true;
113 +                                }
114 +                                
115                                  modes[vmodes].Width  = daodan_reslist[j].Width;
116                                  modes[vmodes].Height = daodan_reslist[j].Height;
117                                  modes[vmodes].Depth  = daodan_resdepths[i];
# Line 104 | Line 120 | unsigned int ONICALL daodan_enumerate_va
120                                          goto modesfull;
121                          }
122                  
123 <                modes[vmodes].Width  = screen_x;
124 <                modes[vmodes].Height = screen_y;
125 <                modes[vmodes].Depth  = daodan_resdepths[i];
126 <                
127 <                if (++vmodes == max_modes - builtin_modes + i)
128 <                        goto modesfull;
123 >                if (!scrInsert)
124 >                {
125 >                        modes[vmodes].Width  = screen_x;
126 >                        modes[vmodes].Height = screen_y;
127 >                        modes[vmodes].Depth  = daodan_resdepths[i];
128 >                        
129 >                        if (++vmodes == max_modes - builtin_modes + i)
130 >                                goto modesfull;
131 >                }
132          }
133          
134          modesfull:
# Line 127 | Line 146 | bool daodan_testmode(M3tDisplayMode mode
146          devmode.dmPelsWidth  = mode.Width;
147          devmode.dmPelsHeight = mode.Height;
148          
149 <        return (ChangeDisplaySettings(&devmode, CDS_TEST) == DISP_CHANGE_SUCCESSFUL);
149 >        return (ChangeDisplaySettings(&devmode, CDS_TEST | CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL);
150   }
151  
152   int daodan_set_display_mode(short width, short height, short depth)

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)