summaryrefslogtreecommitdiff
path: root/alf/alfcompat.h
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-14 17:48:45 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-14 17:48:45 +0200
commit02ffd45d5cb15b7d025b9a72a21ec1fd32de8c6f (patch)
tree70f04cfd220ecee9b261b3ac2bfe2cdf3da0d066 /alf/alfcompat.h
parentf8ac8f0e75c28047e93c8de627603a6c5a6aa833 (diff)
replace GetVersion() calls with helper functions
Diffstat (limited to 'alf/alfcompat.h')
-rw-r--r--alf/alfcompat.h10
1 files changed, 10 insertions, 0 deletions
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 {