aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/OVR_Win32_HIDDevice.cpp
diff options
context:
space:
mode:
authorBrad Davis <[email protected]>2014-05-23 01:49:32 -0700
committerBrad Davis <[email protected]>2014-05-23 01:49:32 -0700
commit46acc0e194ff3c1f120199eeca8324b4502118e9 (patch)
treeb1030198d3ee4698445d1fc5161cebe4158e45d1 /LibOVR/Src/OVR_Win32_HIDDevice.cpp
parent07d0f4d0bbf3477ac6a9584f726e8ec6ab285707 (diff)
Updating to 0.3.2 (windows version)
Diffstat (limited to 'LibOVR/Src/OVR_Win32_HIDDevice.cpp')
-rw-r--r--LibOVR/Src/OVR_Win32_HIDDevice.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/LibOVR/Src/OVR_Win32_HIDDevice.cpp b/LibOVR/Src/OVR_Win32_HIDDevice.cpp
index 6d33f7a..e94c2ab 100644
--- a/LibOVR/Src/OVR_Win32_HIDDevice.cpp
+++ b/LibOVR/Src/OVR_Win32_HIDDevice.cpp
@@ -619,10 +619,8 @@ HIDDeviceManager* HIDDeviceManager::CreateInternal(Win32::DeviceManager* devMana
// ***** Creation
// Creates a new HIDDeviceManager and initializes OVR.
-HIDDeviceManager* HIDDeviceManager::Create()
+HIDDeviceManager* HIDDeviceManager::Create(Ptr<OVR::DeviceManager>& deviceManager)
{
- OVR_ASSERT_LOG(false, ("Standalone mode not implemented yet."));
-
if (!System::IsInitialized())
{
// Use custom message, since Log is not yet installed.
@@ -631,21 +629,21 @@ HIDDeviceManager* HIDDeviceManager::Create()
return 0;
}
- Ptr<Win32::HIDDeviceManager> manager = *new Win32::HIDDeviceManager(NULL);
+ Ptr<Win32::DeviceManager> deviceManagerWin32 = *new Win32::DeviceManager;
- if (manager)
+ if (!deviceManagerWin32)
{
- if (manager->Initialize())
- {
- manager->AddRef();
- }
- else
- {
- manager.Clear();
- }
+ return NULL;
+ }
+
+ if (!deviceManagerWin32->Initialize(0))
+ {
+ return NULL;
}
- return manager.GetPtr();
+ deviceManager = deviceManagerWin32;
+
+ return deviceManagerWin32->GetHIDDeviceManager();
}
} // namespace OVR