diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-06-01 12:03:57 +0200 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-06-01 12:03:57 +0200 |
| commit | db6974eda1dc1fada95af97ea53c369db58fda41 (patch) | |
| tree | e9ab96b1b8020e490f2e8d54757e1f1988d69f22 /alf/alflayout.cpp | |
| parent | 79e8eb033fd2742b67966f5ff973f4ef64005531 (diff) | |
replace windows version checks with compat bits
this saves us from calling GetVersion() and massaging the result
in hot code paths
Diffstat (limited to 'alf/alflayout.cpp')
| -rw-r--r-- | alf/alflayout.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
