Author: janderwald
Date: Mon Aug 27 02:43:51 2007
New Revision: 28585
URL:
http://svn.reactos.org/svn/reactos?rev=28585&view=rev
Log:
- dont show the same resolution multiple times
- sort the resolution according to width, height and bits per pixel
See issue #2594 for more details.
Modified:
trunk/reactos/dll/cpl/desk/settings.c
Modified: trunk/reactos/dll/cpl/desk/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/settings.c?re…
==============================================================================
--- trunk/reactos/dll/cpl/desk/settings.c (original)
+++ trunk/reactos/dll/cpl/desk/settings.c Mon Aug 27 02:43:51 2007
@@ -137,11 +137,11 @@
Current->dmPelsHeight = devmode.dmPelsHeight;
Current->dmBitsPerPel = devmode.dmBitsPerPel;
while (Next != NULL && (
- Next->dmPelsHeight < Current->dmPelsHeight ||
- (Next->dmPelsHeight == Current->dmPelsHeight &&
Next->dmBitsPerPel < Current->dmBitsPerPel) ||
+ Next->dmPelsWidth < Current->dmPelsWidth ||
+ (Next->dmPelsWidth == Current->dmPelsWidth &&
Next->dmPelsHeight < Current->dmPelsHeight) ||
(Next->dmPelsHeight == Current->dmPelsHeight &&
- Next->dmBitsPerPel == Current->dmBitsPerPel &&
- Next->dmPelsWidth < Current->dmPelsWidth)))
+ Next->dmPelsWidth == Current->dmPelsWidth &&
+ Next->dmBitsPerPel < Current->dmBitsPerPel )))
{
Previous = Next;
Next = Next->Flink;
@@ -194,7 +194,7 @@
for (Current = newEntry->Settings; Current != NULL; Current = Current->Flink)
{
if (Current->Flink != NULL &&
- ((Current->dmPelsWidth != Current->Flink->dmPelsWidth) ||
+ ((Current->dmPelsWidth != Current->Flink->dmPelsWidth) &&
(Current->dmPelsHeight != Current->Flink->dmPelsHeight)))
{
ResolutionsCount++;
@@ -211,7 +211,7 @@
{
if (Current->Flink == NULL ||
(Current->Flink != NULL &&
- ((Current->dmPelsWidth != Current->Flink->dmPelsWidth) ||
+ ((Current->dmPelsWidth != Current->Flink->dmPelsWidth) &&
(Current->dmPelsHeight != Current->Flink->dmPelsHeight))))
{
newEntry->Resolutions[i].dmPelsWidth = Current->dmPelsWidth;