diff --git a/oculusvr/__init__.py b/oculusvr/__init__.py index 7a3eae6..0e1f2b7 100644 --- a/oculusvr/__init__.py +++ b/oculusvr/__init__.py @@ -363,6 +363,8 @@ def load(self,path): # errors if sys.platform == 'darwin': return ctypes.CDLL(path, ctypes.RTLD_GLOBAL) + elif sys.platform == 'linux2': + return ctypes.CDLL(path, ctypes.RTLD_GLOBAL) else: return ctypes.cdll.LoadLibrary(path) except OSError,e: @@ -603,7 +605,7 @@ def add_library_search_dirs(other_dirs): if 64 == 8 * struct.calcsize("P"): suffix = "-x86-64" if ("linux" in sys.platform): - file = "libOVR_C.so" + file = "libovr.so.0.1" prefix = "linux" elif ("darwin" in sys.platform): file = "libOVR_C.dylib" @@ -1244,11 +1246,11 @@ class struct_ovrTexture_(Structure): break for _lib in _libs.itervalues(): - if not hasattr(_lib, 'ovrHmd_GetEyePose'): + if not hasattr(_lib, 'ovrHmd_GetHmdPosePerEye'): continue - ovrHmd_GetEyePose = _lib.ovrHmd_GetEyePose - ovrHmd_GetEyePose.argtypes = [ovrHmd, ovrEyeType] - ovrHmd_GetEyePose.restype = ovrPosef + ovrHmd_GetHmdPosePerEye = _lib.ovrHmd_GetHmdPosePerEye + ovrHmd_GetHmdPosePerEye.argtypes = [ovrHmd, ovrEyeType] + ovrHmd_GetHmdPosePerEye.restype = ovrPosef break for _lib in _libs.itervalues(): @@ -1719,7 +1721,7 @@ def begin_frame(self, frame_index = 0): return ovrHmd_BeginFrame(self.hmd, frame_index) def get_eye_pose(self, eye): - return ovrHmd_GetEyePose(self.hmd, eye) + return ovrHmd_GetHmdPosePerEye(self.hmd, eye) def end_frame(self, poses, textures): pose_arr = (ovrPosef * 2)(*poses) diff --git a/oculusvr/linux-x86-64/libovr.so.0.1 b/oculusvr/linux-x86-64/libovr.so.0.1 new file mode 100755 index 0000000..46a7a24 Binary files /dev/null and b/oculusvr/linux-x86-64/libovr.so.0.1 differ