Fixed: Wrong index for video modes comparison (nFoundMode was an index in strings not CMode list, now renamed to nFoundStringMode)

--HG--
branch : develop
hg/feature/material-editor
kervala 9 years ago
parent 2a9b9deaf9
commit 94b7148d44

@ -1430,15 +1430,19 @@ bool getRyzomModes(std::vector<NL3D::UDriver::CMode> &videoModes, std::vector<st
if ((videoModes[i].Width <= ClientCfg.Width) && (videoModes[i].Height <= ClientCfg.Height)) if ((videoModes[i].Width <= ClientCfg.Width) && (videoModes[i].Height <= ClientCfg.Height))
{ {
if (nFoundMode == -1) if (nFoundStringMode == -1)
{ {
nFoundMode = j; nFoundStringMode = j;
nFoundMode = i;
} }
else else
{ {
if ((videoModes[i].Width >= videoModes[nFoundMode].Width) && if ((videoModes[i].Width >= videoModes[nFoundMode].Width) &&
(videoModes[i].Height >= videoModes[nFoundMode].Height)) (videoModes[i].Height >= videoModes[nFoundMode].Height))
nFoundMode = j; {
nFoundStringMode = j;
nFoundMode = i;
}
} }
} }
} }

Loading…
Cancel
Save