Skip to content

Commit

Permalink
Catch the exception thrown when trying to run against the latest Stea…
Browse files Browse the repository at this point in the history
…mVR.

Looks like Valve updated their copy of openvr_driver.h without
updating the public one: the server provider string has been updated.
  • Loading branch information
rpavlik committed May 2, 2016
1 parent 4fb6ad6 commit 56d82e1
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions OSVRViveTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,22 @@ namespace vive {
m_vive.reset(new osvr::vive::DriverWrapper(std::move(inVive)));

/// Finish setting up the Vive.
if (!m_vive->startServerDeviceProvider()) {
std::cerr << PREFIX << "Error: could not start the server "
"device provider in the "
"Vive driver. Exiting."
try {
if (!m_vive->startServerDeviceProvider()) {
std::cerr << PREFIX << "Error: could not start the server "
"device provider in the "
"Vive driver. Exiting."
<< std::endl;
return false;
}
} catch (CouldNotGetInterface &e) {
std::cerr << PREFIX
<< "Caught exception trying to start Vive server device "
"provider: "
<< e.what() << std::endl;
std::cerr << "SteamVR interface version may have "
"changed, may need to be rebuilt against an updated "
"header or use an older SteamVR version. Exiting."
<< std::endl;
return false;
}
Expand Down

0 comments on commit 56d82e1

Please sign in to comment.