summaryrefslogtreecommitdiffhomepage
path: root/opentrack-dinput/dinput.hpp
blob: db901887b9df9e1cbcc4d371a3f11c4348fc1e53 (plain)
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
#pragma once

#ifdef _WIN32

#ifndef DIRECTINPUT_VERSION
#   define DIRECTINPUT_VERSION 0x800
#endif
#include "export.hpp"
#include <dinput.h>
#include <windows.h>

struct OPENTRACK_DINPUT_EXPORT dinput_handle final
{
    using di_t = LPDIRECTINPUT8;
private:
    static dinput_handle self;
    dinput_handle();
    ~dinput_handle();
    static di_t init_di();
    di_t handle;
public:
     static di_t make_di();

     dinput_handle(const dinput_handle&) = delete;
     dinput_handle(dinput_handle&&) = delete;
};

#endif