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 }, |
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 |
|
|
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]; |
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]; |
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: |
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) |