-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
34 lines (28 loc) · 901 Bytes
/
main.cpp
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
#include "vjoywrapper.h"
#include <iostream>
#include <unistd.h>
int main()
{
std::cout << GetvJoyVersion() << std::endl;
std::cout << AcquireVJD(1) << std::endl;
// This function does not seem to work, or the descriptions does not do what I expect from the header file
std::cout << ResetVJD(1) << std::endl;
usleep(2000000);
// Hit some buttons, can view in vJoyMonitor
SetBtn(1, 1, 1);
SetBtn(1, 1, 2);
SetBtn(1, 1, 3);
usleep(5000000);
// This function also does not seem to work
std::cout << "ResetAll();" << std::endl;
ResetAll();
usleep(2000000);
// This function seems to work
std::cout << ResetButtons(1) << std::endl;
usleep(2000000);
// I never set and Povs, so who knows
std::cout << ResetPovs(1) << std::endl;
usleep(2000000);
RelinquishVJD(1);
return 0;
}