[ros-diffs] [janderwald] 28585: - dont show the same resolution multiple times - sort the resolution according to width, height and bits per pixel See issue #2594 for more details.

janderwald at svn.reactos.org janderwald at svn.reactos.org
Mon Aug 27 00:43:52 CEST 2007


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?rev=28585&r1=28584&r2=28585&view=diff
==============================================================================
--- 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;




More information about the Ros-diffs mailing list