From: Mikko Rasa Date: Tue, 23 Dec 2014 20:44:49 +0000 (+0200) Subject: Simplify hmd handle access in a couple of places X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=c95fa921952df86629181e033a3a739cfc311fc6;p=libs%2Fvr.git Simplify hmd handle access in a couple of places --- diff --git a/source/oculusriftcamera.cpp b/source/oculusriftcamera.cpp index 33ed07f..3aa35be 100644 --- a/source/oculusriftcamera.cpp +++ b/source/oculusriftcamera.cpp @@ -9,9 +9,8 @@ OculusRiftCamera::OculusRiftCamera(const OculusRiftDevice &d, const GL::Camera & device(d), base_camera(c) { - const OculusRiftDevice::Private &dev_priv = device.get_private(); unsigned supported = ovrTrackingCap_Orientation|ovrTrackingCap_MagYawCorrection|ovrTrackingCap_Position; - ovrHmd_ConfigureTracking(dev_priv.ovr_hmd, supported, 0); + ovrHmd_ConfigureTracking(device.get_private().ovr_hmd, supported, 0); } void OculusRiftCamera::reset_tracking() diff --git a/source/oculusriftcombiner.cpp b/source/oculusriftcombiner.cpp index 86d32b0..5e76cc8 100644 --- a/source/oculusriftcombiner.cpp +++ b/source/oculusriftcombiner.cpp @@ -82,8 +82,7 @@ OculusRiftCombiner::OculusRiftCombiner(const OculusRiftDevice &d): right_mesh((GL::VERTEX2, GL::TEXCOORD2,0, GL::TEXCOORD2,1, GL::TEXCOORD2,2, GL::TEXCOORD1,3)), shprog(vs_source, fs_source) { - const OculusRiftDevice::Private &dev_priv = device.get_private(); - ovrHmd hmd = dev_priv.ovr_hmd; + ovrHmd hmd = device.get_private().ovr_hmd; ovrFovPort left_fov = hmd->DefaultEyeFov[ovrEye_Left]; ovrFovPort right_fov = hmd->DefaultEyeFov[ovrEye_Right];