Fixed: #993 Floating Point Exception in NL3D::CDriverGL::getModes on Linux
This commit is contained in:
parent
a4c6196cbf
commit
e5a13c5ab0
1 changed files with 5 additions and 4 deletions
|
@ -1200,8 +1200,9 @@ bool CDriverGL::getModes(std::vector<GfxMode> &modes)
|
||||||
GfxMode mode;
|
GfxMode mode;
|
||||||
mode.Width = (uint16)ms[j]->hdisplay;
|
mode.Width = (uint16)ms[j]->hdisplay;
|
||||||
mode.Height = (uint16)ms[j]->vdisplay;
|
mode.Height = (uint16)ms[j]->vdisplay;
|
||||||
mode.Frequency = 1000 * ms[j]->dotclock / (ms[j]->htotal * ms[j]->vtotal);
|
const uint16 pixelsCount = ms[j]->htotal * ms[j]->vtotal;
|
||||||
nldebug("3D: Mode %d: %dx%d, %d Hz", j, ms[j]->hdisplay,ms[j]->vdisplay, 1000 * ms[j]->dotclock / (ms[j]->htotal * ms[j]->vtotal));
|
mode.Frequency = pixelCount ? 1000 * ms[j]->dotclock / pixelCount:0;
|
||||||
|
nldebug("3D: Mode %d: %dx%d, %d Hz", j, mode.Width, mode.Height, mode.Frequency);
|
||||||
modes.push_back (mode);
|
modes.push_back (mode);
|
||||||
}
|
}
|
||||||
XFree(ms);
|
XFree(ms);
|
||||||
|
|
Loading…
Reference in a new issue