Fixed: sort screen modes by width, height and frequency

This commit is contained in:
kervala 2010-07-10 13:59:45 +02:00
parent d330483dd9
commit 9b06f1c481

View file

@ -286,7 +286,12 @@ struct CModeSorter
{ {
bool operator()(const UDriver::CMode &mode1, const UDriver::CMode &mode2) const bool operator()(const UDriver::CMode &mode1, const UDriver::CMode &mode2) const
{ {
if (mode1.Width == mode2.Width) return mode1.Height < mode2.Height; if (mode1.Width == mode2.Width)
{
if (mode1.Height == mode2.Height) return mode1.Frequency < mode2.Frequency;
return mode1.Height < mode2.Height;
}
return mode1.Width < mode2.Width; return mode1.Width < mode2.Width;
} }