Skip to content

Commit 02d022a

Browse files
committed
Add project files.
1 parent 8c070e3 commit 02d022a

File tree

11 files changed

+7775
-0
lines changed

11 files changed

+7775
-0
lines changed

motionPose.sln

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30225.117
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "motionPose", "motionPose\motionPose.vcxproj", "{13824638-BF7B-495A-823B-8B416E2D3D27}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{13824638-BF7B-495A-823B-8B416E2D3D27}.Debug|x64.ActiveCfg = Debug|x64
17+
{13824638-BF7B-495A-823B-8B416E2D3D27}.Debug|x64.Build.0 = Debug|x64
18+
{13824638-BF7B-495A-823B-8B416E2D3D27}.Debug|x86.ActiveCfg = Debug|Win32
19+
{13824638-BF7B-495A-823B-8B416E2D3D27}.Debug|x86.Build.0 = Debug|Win32
20+
{13824638-BF7B-495A-823B-8B416E2D3D27}.Release|x64.ActiveCfg = Release|x64
21+
{13824638-BF7B-495A-823B-8B416E2D3D27}.Release|x64.Build.0 = Release|x64
22+
{13824638-BF7B-495A-823B-8B416E2D3D27}.Release|x86.ActiveCfg = Release|Win32
23+
{13824638-BF7B-495A-823B-8B416E2D3D27}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {5A2C630A-5194-4011-A425-4ACC277ABED9}
30+
EndGlobalSection
31+
EndGlobal

motionPose/WatchdogProvider.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include "WatchdogProvider.h"
2+
3+
4+
5+
// driver namespace
6+
namespace vrmotioncompensation
7+
{
8+
namespace driver
9+
{
10+
vr::EVRInitError WatchdogProvider::Init(vr::IVRDriverContext* pDriverContext)
11+
{
12+
VR_INIT_WATCHDOG_DRIVER_CONTEXT(pDriverContext);
13+
return vr::VRInitError_None;
14+
}
15+
16+
void WatchdogProvider::Cleanup()
17+
{
18+
VR_CLEANUP_WATCHDOG_DRIVER_CONTEXT();
19+
}
20+
}
21+
}

motionPose/WatchdogProvider.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#pragma once
2+
3+
#include <openvr_driver.h>
4+
5+
// driver namespace
6+
namespace vrmotioncompensation
7+
{
8+
namespace driver
9+
{
10+
11+
/**
12+
* Implements the IVRWatchdogProvider interface.
13+
*
14+
* Its only purpose seems to be to start SteamVR by calling WatchdogWakeUp() from the IVRWatchdogHost interface.
15+
* Valve probably uses this interface to start SteamVR whenever a button is pressed on the controller or hmd.
16+
* We must implement it but currently we don't use it for anything.
17+
*/
18+
class WatchdogProvider : public vr::IVRWatchdogProvider
19+
{
20+
public:
21+
/** initializes the driver in watchdog mode. */
22+
virtual vr::EVRInitError Init(vr::IVRDriverContext* pDriverContext) override;
23+
24+
/** cleans up the driver right before it is unloaded */
25+
virtual void Cleanup() override;
26+
};
27+
}
28+
}

motionPose/driverlog.cpp

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
//========= Copyright Valve Corporation ============//
2+
3+
#include "driverlog.h"
4+
5+
#include <stdio.h>
6+
#include <stdarg.h>
7+
8+
static vr::IVRDriverLog * s_pLogFile = NULL;
9+
10+
#if !defined( WIN32)
11+
#define vsnprintf_s vsnprintf
12+
#endif
13+
14+
bool InitDriverLog( vr::IVRDriverLog *pDriverLog )
15+
{
16+
if( s_pLogFile )
17+
return false;
18+
s_pLogFile = pDriverLog;
19+
return s_pLogFile != NULL;
20+
}
21+
22+
void CleanupDriverLog()
23+
{
24+
s_pLogFile = NULL;
25+
}
26+
27+
static void DriverLogVarArgs( const char *pMsgFormat, va_list args )
28+
{
29+
char buf[1024];
30+
vsnprintf_s( buf, sizeof(buf), pMsgFormat, args );
31+
32+
if( s_pLogFile )
33+
s_pLogFile->Log( buf );
34+
}
35+
36+
37+
void DriverLog( const char *pMsgFormat, ... )
38+
{
39+
va_list args;
40+
va_start( args, pMsgFormat );
41+
42+
DriverLogVarArgs( pMsgFormat, args );
43+
44+
va_end(args);
45+
}
46+
47+
48+
void DebugDriverLog( const char *pMsgFormat, ... )
49+
{
50+
#ifdef _DEBUG
51+
va_list args;
52+
va_start( args, pMsgFormat );
53+
54+
DriverLogVarArgs( pMsgFormat, args );
55+
56+
va_end(args);
57+
#endif
58+
}
59+
60+

motionPose/driverlog.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//========= Copyright Valve Corporation ============//
2+
3+
#ifndef DRIVERLOG_H
4+
#define DRIVERLOG_H
5+
6+
#pragma once
7+
8+
#include <string>
9+
#include <openvr_driver.h>
10+
11+
extern void DriverLog( const char *pchFormat, ... );
12+
13+
14+
// --------------------------------------------------------------------------
15+
// Purpose: Write to the log file only in debug builds
16+
// --------------------------------------------------------------------------
17+
extern void DebugDriverLog( const char *pchFormat, ... );
18+
19+
20+
extern bool InitDriverLog( vr::IVRDriverLog *pDriverLog );
21+
extern void CleanupDriverLog();
22+
23+
24+
25+
#endif // DRIVERLOG_H

motionPose/motionPose.vcxproj

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<ItemGroup>
22+
<ClCompile Include="driverlog.cpp" />
23+
<ClCompile Include="motion_pose.cpp" />
24+
<ClCompile Include="WatchdogProvider.cpp" />
25+
</ItemGroup>
26+
<ItemGroup>
27+
<ClInclude Include="driverlog.h" />
28+
<ClInclude Include="openvr_math.h" />
29+
<ClInclude Include="WatchdogProvider.h" />
30+
</ItemGroup>
31+
<PropertyGroup Label="Globals">
32+
<VCProjectVersion>16.0</VCProjectVersion>
33+
<Keyword>Win32Proj</Keyword>
34+
<ProjectGuid>{13824638-bf7b-495a-823b-8b416e2d3d27}</ProjectGuid>
35+
<RootNamespace>motionPose</RootNamespace>
36+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
37+
</PropertyGroup>
38+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
39+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
40+
<ConfigurationType>DynamicLibrary</ConfigurationType>
41+
<UseDebugLibraries>true</UseDebugLibraries>
42+
<PlatformToolset>v142</PlatformToolset>
43+
<CharacterSet>Unicode</CharacterSet>
44+
</PropertyGroup>
45+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
46+
<ConfigurationType>DynamicLibrary</ConfigurationType>
47+
<UseDebugLibraries>false</UseDebugLibraries>
48+
<PlatformToolset>v142</PlatformToolset>
49+
<WholeProgramOptimization>true</WholeProgramOptimization>
50+
<CharacterSet>Unicode</CharacterSet>
51+
</PropertyGroup>
52+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
53+
<ConfigurationType>DynamicLibrary</ConfigurationType>
54+
<UseDebugLibraries>true</UseDebugLibraries>
55+
<PlatformToolset>v142</PlatformToolset>
56+
<CharacterSet>Unicode</CharacterSet>
57+
</PropertyGroup>
58+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
59+
<ConfigurationType>DynamicLibrary</ConfigurationType>
60+
<UseDebugLibraries>false</UseDebugLibraries>
61+
<PlatformToolset>v142</PlatformToolset>
62+
<WholeProgramOptimization>true</WholeProgramOptimization>
63+
<CharacterSet>Unicode</CharacterSet>
64+
</PropertyGroup>
65+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
66+
<ImportGroup Label="ExtensionSettings">
67+
</ImportGroup>
68+
<ImportGroup Label="Shared">
69+
</ImportGroup>
70+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
71+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
72+
</ImportGroup>
73+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
74+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
75+
</ImportGroup>
76+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
77+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
78+
</ImportGroup>
79+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
80+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
81+
</ImportGroup>
82+
<PropertyGroup Label="UserMacros" />
83+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
84+
<LinkIncremental>true</LinkIncremental>
85+
</PropertyGroup>
86+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
87+
<LinkIncremental>false</LinkIncremental>
88+
<OutDir>$(SolutionDir)\bin\drivers\motionPose\bin\win64\</OutDir>
89+
</PropertyGroup>
90+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
91+
<LinkIncremental>true</LinkIncremental>
92+
</PropertyGroup>
93+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
94+
<LinkIncremental>false</LinkIncremental>
95+
<OutDir>$(SolutionDir)\bin\drivers\motionPose\bin\win64\</OutDir>
96+
</PropertyGroup>
97+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
98+
<ClCompile>
99+
<WarningLevel>Level3</WarningLevel>
100+
<SDLCheck>true</SDLCheck>
101+
<PreprocessorDefinitions>WIN32;_DEBUG;MOTIONPOSE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
102+
<ConformanceMode>true</ConformanceMode>
103+
<PrecompiledHeader>Use</PrecompiledHeader>
104+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
105+
</ClCompile>
106+
<Link>
107+
<SubSystem>Windows</SubSystem>
108+
<GenerateDebugInformation>true</GenerateDebugInformation>
109+
<EnableUAC>false</EnableUAC>
110+
</Link>
111+
</ItemDefinitionGroup>
112+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
113+
<ClCompile>
114+
<WarningLevel>Level3</WarningLevel>
115+
<FunctionLevelLinking>true</FunctionLevelLinking>
116+
<IntrinsicFunctions>true</IntrinsicFunctions>
117+
<SDLCheck>true</SDLCheck>
118+
<PreprocessorDefinitions>WIN32;NDEBUG;MOTIONPOSE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
119+
<ConformanceMode>true</ConformanceMode>
120+
<PrecompiledHeader>Use</PrecompiledHeader>
121+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
122+
</ClCompile>
123+
<Link>
124+
<SubSystem>Windows</SubSystem>
125+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
126+
<OptimizeReferences>true</OptimizeReferences>
127+
<GenerateDebugInformation>true</GenerateDebugInformation>
128+
<EnableUAC>false</EnableUAC>
129+
</Link>
130+
</ItemDefinitionGroup>
131+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
132+
<ClCompile>
133+
<WarningLevel>Level3</WarningLevel>
134+
<SDLCheck>true</SDLCheck>
135+
<PreprocessorDefinitions>_DEBUG;MOTIONPOSE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
136+
<ConformanceMode>true</ConformanceMode>
137+
<PrecompiledHeader>Use</PrecompiledHeader>
138+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
139+
</ClCompile>
140+
<Link>
141+
<SubSystem>Windows</SubSystem>
142+
<GenerateDebugInformation>true</GenerateDebugInformation>
143+
<EnableUAC>false</EnableUAC>
144+
</Link>
145+
</ItemDefinitionGroup>
146+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
147+
<ClCompile>
148+
<WarningLevel>Level3</WarningLevel>
149+
<FunctionLevelLinking>true</FunctionLevelLinking>
150+
<IntrinsicFunctions>true</IntrinsicFunctions>
151+
<SDLCheck>true</SDLCheck>
152+
<PreprocessorDefinitions>NDEBUG;MOTIONPOSE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
153+
<ConformanceMode>true</ConformanceMode>
154+
<PrecompiledHeader>Use</PrecompiledHeader>
155+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
156+
</ClCompile>
157+
<Link>
158+
<SubSystem>Windows</SubSystem>
159+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
160+
<OptimizeReferences>true</OptimizeReferences>
161+
<GenerateDebugInformation>true</GenerateDebugInformation>
162+
<EnableUAC>false</EnableUAC>
163+
</Link>
164+
</ItemDefinitionGroup>
165+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
166+
<ImportGroup Label="ExtensionTargets">
167+
</ImportGroup>
168+
</Project>

motionPose/motionPose.vcxproj.filters

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="driverlog.cpp">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
<ClCompile Include="motion_pose.cpp">
22+
<Filter>Source Files</Filter>
23+
</ClCompile>
24+
<ClCompile Include="WatchdogProvider.cpp">
25+
<Filter>Source Files</Filter>
26+
</ClCompile>
27+
</ItemGroup>
28+
<ItemGroup>
29+
<ClInclude Include="driverlog.h">
30+
<Filter>Source Files</Filter>
31+
</ClInclude>
32+
<ClInclude Include="openvr_math.h">
33+
<Filter>Source Files</Filter>
34+
</ClInclude>
35+
<ClInclude Include="WatchdogProvider.h">
36+
<Filter>Source Files</Filter>
37+
</ClInclude>
38+
</ItemGroup>
39+
</Project>

0 commit comments

Comments
 (0)