From 46acc0e194ff3c1f120199eeca8324b4502118e9 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Fri, 23 May 2014 01:49:32 -0700 Subject: Updating to 0.3.2 (windows version) --- LibOVR/Src/OVR_Win32_HIDDevice.cpp | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'LibOVR/Src/OVR_Win32_HIDDevice.cpp') 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& 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 manager = *new Win32::HIDDeviceManager(NULL); + Ptr 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 -- cgit v1.2.3