[GDI32]
authorKamil Hornicek <kamil.hornicek@reactos.org>
Tue, 25 Oct 2016 17:08:05 +0000 (17:08 +0000)
committerKamil Hornicek <kamil.hornicek@reactos.org>
Tue, 25 Oct 2016 17:08:05 +0000 (17:08 +0000)
- comply with MSDN and stop enumerating font families as soon as the user provided callback returns zero
- fixes bunch of user32:sysparams tests which rely on this

svn path=/trunk/; revision=73032

reactos/win32ss/gdi/gdi32/objects/font.c

index 9bd2d62..01a5dab 100644 (file)
@@ -278,6 +278,9 @@ IntEnumFontFamilies(HDC Dc, LPLOGFONTW LogFont, PVOID EnumProc, LPARAM lParam,
                       (VOID*)&NewTextMetricExA,
                       Info[i].FontType, lParam);
         }
+
+        if(Ret == 0)
+            break;
     }
 
     RtlFreeHeap(GetProcessHeap(), 0, Info);