summaryrefslogtreecommitdiff
path: root/common/rawaccel-version.h
blob: 384ba6fca8cfad3928bfc9cd8ac6160b541ad81a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

#define RA_VER_MAJOR 1
#define RA_VER_MINOR 5
#define RA_VER_PATCH 0

#define RA_OS "Win7+"

#define RA_M_STR_HELPER(x) #x
#define RA_M_STR(x) RA_M_STR_HELPER(x)

#define RA_VER_STRING RA_M_STR(RA_VER_MAJOR) "." RA_M_STR(RA_VER_MINOR) "." RA_M_STR(RA_VER_PATCH)

namespace rawaccel {

    struct version_t {
        int major;
        int minor;
        int patch;
    };

    constexpr bool operator<(const version_t& lhs, const version_t& rhs)
    {
        return (lhs.major != rhs.major) ?
               (lhs.major < rhs.major)  :
               (lhs.minor != rhs.minor) ?
               (lhs.minor < rhs.minor)  :
               (lhs.patch < rhs.patch)  ;
    }

    inline constexpr version_t version = { RA_VER_MAJOR, RA_VER_MINOR, RA_VER_PATCH };
#ifndef _KERNEL_MODE
    inline constexpr version_t min_driver_version = { 1, 5, 0 };
#endif

}