From db6974eda1dc1fada95af97ea53c369db58fda41 Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Mon, 1 Jun 2020 12:03:57 +0200 Subject: replace windows version checks with compat bits this saves us from calling GetVersion() and massaging the result in hot code paths --- alf/alflayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alf/alflayout.cpp') diff --git a/alf/alflayout.cpp b/alf/alflayout.cpp index 6f35345..745b303 100644 --- a/alf/alflayout.cpp +++ b/alf/alflayout.cpp @@ -231,7 +231,7 @@ ALF_Layout_CalcCheckboxSize(HWND hwndWindow, ALFLayout *layout, HWND hwndCheckbo int checkwidth = 12 * layout->dpi / 96 + 1; int checkheight = checkwidth; - if (!ALF_Compat_IsMinWindowsVersion(4, 0)) { + if (!ALF_Compat_Is40()) { // 3.x-style checkboxes have the checkmark baseline-aligned TEXTMETRIC tm; ZeroMemory(&tm, sizeof(tm)); @@ -624,7 +624,7 @@ ALF_Layout_Apply(ALFLayout* layout, HWND window) UINT flags = SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER; // NT 3.51 and Win32s have so many invalidation bugs it's not even funny - if (!ALF_Compat_IsMinWindowsVersion(4, 0)) + if (!ALF_Compat_Is40()) flags |= SWP_NOCOPYBITS; // transparent background: invalidate if control moved -- cgit v1.2.3