Index: src/OFSystemInfo.h ================================================================== --- src/OFSystemInfo.h +++ src/OFSystemInfo.h @@ -56,10 +56,13 @@ @property (class, readonly, nonatomic) bool supportsSHAExtensions; # endif # if defined(OF_POWERPC) || defined(OF_POWERPC64) || defined(DOXYGEN) @property (class, readonly, nonatomic) bool supportsAltiVec; # endif +# ifdef OF_WINDOWS +@property (class, readonly, nonatomic, getter=isWindowsNT) bool windowsNT; +# endif #endif /*! * @brief Returns the size of a page. * @@ -284,11 +287,22 @@ * * @return Whether the CPU and OS support AltiVec */ + (bool)supportsAltiVec; #endif + +#ifdef OF_WINDOWS +/*! + * @brief Returns whether the application is running on Windows NT. + * + * @note This method is only available on Windows. + * + * @return Whether the application is running on Windows NT + */ ++ (bool)isWindowsNT; +#endif + (instancetype)alloc OF_UNAVAILABLE; - (instancetype)init OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END Index: src/OFSystemInfo.m ================================================================== --- src/OFSystemInfo.m +++ src/OFSystemInfo.m @@ -662,11 +662,18 @@ # endif return false; } #endif + +#ifdef OF_WINDOWS ++ (bool)isWindowsNT +{ + return !(GetVersion() & 0x80000000); +} +#endif - (instancetype)init { OF_INVALID_INIT_METHOD } @end