vrpn
07.33
Virtual Reality Peripheral Network
vrpn_Local_HIDAPI.C
Go to the documentation of this file.
1
#include "
vrpn_Configure.h
"
2
#ifdef VRPN_USE_HID
3
#ifdef VRPN_USE_LOCAL_HIDAPI
4
5
#if defined(_WIN32) || defined(__CYGWIN__)
6
7
// I had to include this definition to get the hid.c file to compile
8
// under Visual Studio 2005. Hopefully this won't conflict with the environments
9
// of others. In future versions, if NTSTATUS is located by
10
// the compiler then we can remove this definition.
11
12
#ifndef NTSTATUS
13
typedef
long
NTSTATUS;
14
#endif
15
#include "submodules/hidapi/windows/hid.cpp"
16
17
#pragma comment( lib, "Setupapi.lib" )
18
19
#elif defined(linux)
20
// On linux, we need to compile this code as C code rather than C++ code
21
// because otherwise the lack of casts from void* keeps it from compiling.
22
// Hopefully this will be fixed in a future version. If so, we can then remove
23
// the special "compile this as C" line from the Makefile and the following
24
// check.
25
#ifdef __cplusplus
26
#error This code must be compiled as C code, rather than C++. Use the '-x c' option to the compiler.
27
#endif
28
29
#include "submodules/hidapi/linux/hid-libusb.c"
30
31
#elif defined(__APPLE__)
32
// On the mac, we need to compile this code as C code rather than C++ code
33
// because otherwise the lack of casts from void* keeps it from compiling.
34
// The inclusion of this file is handled in CMake.
35
//#include "submodules/hidapi/mac/hid.c"
36
37
#else
38
#error HIDAPI is not configured for this architecture. If the current version works on this architecture, describe how to find it in this file.
39
40
#endif
41
42
#endif // VRPN_USE_LOCAL_HIDAPI
43
#endif // VRPN_USE_HID
vrpn_Configure.h
vrpn_Local_HIDAPI.C
Generated by
1.8.17