mirror of https://github.com/OpenTTD/OpenTTD.git
Change: [SDL] Do not offer video smaller than 640x480
This commit is contained in:
parent
0cf25e84df
commit
66c60e52ba
|
@ -223,6 +223,7 @@ static void GetVideoModes()
|
||||||
for (int i = 0; modes[i]; i++) {
|
for (int i = 0; modes[i]; i++) {
|
||||||
uint w = modes[i]->w;
|
uint w = modes[i]->w;
|
||||||
uint h = modes[i]->h;
|
uint h = modes[i]->h;
|
||||||
|
if (w < 640 || h < 480) continue; // reject too small resolutions
|
||||||
int j;
|
int j;
|
||||||
for (j = 0; j < n; j++) {
|
for (j = 0; j < n; j++) {
|
||||||
if (_resolutions[j].width == w && _resolutions[j].height == h) break;
|
if (_resolutions[j].width == w && _resolutions[j].height == h) break;
|
||||||
|
@ -234,6 +235,7 @@ static void GetVideoModes()
|
||||||
if (++n == lengthof(_resolutions)) break;
|
if (++n == lengthof(_resolutions)) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (n == 0) usererror("No usable screen resolutions found!\n");
|
||||||
_num_resolutions = n;
|
_num_resolutions = n;
|
||||||
SortResolutions(_num_resolutions);
|
SortResolutions(_num_resolutions);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue