From 02ffd45d5cb15b7d025b9a72a21ec1fd32de8c6f Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Tue, 14 Apr 2020 17:48:45 +0200 Subject: replace GetVersion() calls with helper functions --- alf/alfcompat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'alf/alfcompat.h') diff --git a/alf/alfcompat.h b/alf/alfcompat.h index 3996309..0c542b0 100644 --- a/alf/alfcompat.h +++ b/alf/alfcompat.h @@ -24,6 +24,16 @@ static inline BOOL ALF_Compat_IsMinWindowsVersion(DWORD major, DWORD minor) return vMajor > major || (vMajor == major && vMinor >= minor); } +static inline BOOL ALF_Compat_IsWin9x(void) +{ + return GetVersion() >= 0x80000000; +} + +static inline BOOL ALF_Compat_IsWinNT(void) +{ + return GetVersion() < 0x80000000; +} + typedef LRESULT (CALLBACK *ALF_COMPAT_SUBCLASSPROC)(HWND,UINT,WPARAM,LPARAM,UINT_PTR,DWORD_PTR); typedef struct { -- cgit v1.2.3