From 0948993ec9e08e170d1d22f2c7176b00bd987103 Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Tue, 14 Apr 2020 16:02:05 +0200 Subject: Make notebook bg gradient work. Anti-flicker work throughout the codebase. --- alf/alfcompat.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'alf/alfcompat.h') diff --git a/alf/alfcompat.h b/alf/alfcompat.h index 9c7f3f2..3996309 100644 --- a/alf/alfcompat.h +++ b/alf/alfcompat.h @@ -15,6 +15,15 @@ extern IMAGE_DOS_HEADER __ImageBase; #endif #define ALF_HINSTANCE ((HINSTANCE)&__ImageBase) +static inline BOOL ALF_Compat_IsMinWindowsVersion(DWORD major, DWORD minor) +{ + DWORD v = GetVersion(); + DWORD vMajor = LOBYTE(LOWORD(v)); + DWORD vMinor = HIBYTE(LOWORD(v)); + + return vMajor > major || (vMajor == major && vMinor >= minor); +} + typedef LRESULT (CALLBACK *ALF_COMPAT_SUBCLASSPROC)(HWND,UINT,WPARAM,LPARAM,UINT_PTR,DWORD_PTR); typedef struct { -- cgit v1.2.3