Fixed a bug where wrong resolutions were saved in the DisplayResolution<->resolution_index mapping.

This commit is contained in:
the_fiddler 2008-01-26 10:33:42 +00:00
parent fde2f6daf6
commit ad6306bc9c

View file

@ -68,7 +68,10 @@ namespace OpenTK.Platform.X11
available_res.Add(new DisplayResolution(size.Width, size.Height, depth, (float)rate));
}
// Keep the index of this resolution - we will need it for resolution changes later.
screenResolutionToIndex[screen].Add(available_res[resolution_count], resolution_count);
foreach (int depth in depths)
screenResolutionToIndex[screen].Add(new DisplayResolution(size.Width, size.Height, depth, 0),
resolution_count);
++resolution_count;
}