]> git.tdb.fi Git - libs/vr.git/blobdiff - source/system.cpp
Remove extra blank line
[libs/vr.git] / source / system.cpp
index 99a6d4871ece2486b7658eb2c1234d9ecbf6f62c..500e672f3365518276c51145b5eb9150aa129143 100644 (file)
@@ -25,5 +25,42 @@ System *System::create(const string &type)
        throw invalid_argument(format("system '%s' not supported", type));
 }
 
+System *System::create_autodetect()
+{
+#ifdef WITH_OPENVR
+       if(OpenVRSystem::is_maybe_available())
+       {
+               try
+               {
+                       return new OpenVRSystem;
+               }
+               catch(const runtime_error &)
+               { }
+       }
+#endif
+
+#ifdef WITH_LIBOVR
+       try
+       {
+               return new LibOVRSystem;
+       }
+       catch(const runtime_error &)
+       { }
+#endif
+
+       return 0;
+}
+
+void System::set_absolute_tracking(bool a)
+{
+       if(a)
+               throw invalid_argument("absolute tracking not supported");
+}
+
+MotionController *System::create_controller()
+{
+       throw runtime_error("controller not supported");
+}
+
 } // namespace VR
 } // namespace Msp