git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9403
d7cf8633-e32d-0410-b094-
e92efae38249
modes[k].width = vidmodes[i]->hdisplay;
modes[k].height = vidmodes[i]->vdisplay;
modes[k].bpp = 8;
- modes[k].refreshrate = vidmodes[i]->dotclock / vidmodes[i]->htotal / vidmodes[i]->vtotal;
+ if(vidmodes[i]->dotclock && vidmodes[i]->htotal && vidmodes[i]->vtotal)
+ modes[k].refreshrate = vidmodes[i]->dotclock / vidmodes[i]->htotal / vidmodes[i]->vtotal;
+ else
+ modes[k].refreshrate = 60;
modes[k].pixelheight_num = 1;
modes[k].pixelheight_denom = 1; // xvidmode does not provide this
++k;