1 #include <msp/strings/format.h>
4 #include "openvr/openvrsystem.h"
7 #include "libovr/libovrsystem.h"
15 System *System::create(const string &type)
19 return new OpenVRSystem;
23 return new LibOVRSystem;
25 throw invalid_argument(format("system '%s' not supported", type));
28 System *System::create_autodetect()
31 if(OpenVRSystem::is_maybe_available())
35 return new OpenVRSystem;
37 catch(const runtime_error &)
45 return new LibOVRSystem;
47 catch(const runtime_error &)
54 void System::set_absolute_tracking(bool a)
57 throw invalid_argument("absolute tracking not supported");
60 MotionController *System::create_controller()
62 throw runtime_error("controller not supported");