diff --git a/server/driver/wivrn_hmd.cpp b/server/driver/wivrn_hmd.cpp index 277abbe4..286f4be5 100644 --- a/server/driver/wivrn_hmd.cpp +++ b/server/driver/wivrn_hmd.cpp @@ -41,11 +41,6 @@ namespace wivrn static void wivrn_hmd_destroy(xrt_device * xdev); -static xrt_result_t wivrn_hmd_get_battery_status(struct xrt_device * xdev, - bool * out_present, - bool * out_charging, - float * out_charge); - static double foveate(double a, double b, double λ, double c, double x) { // In order to save encoding, transmit and decoding time, only a portion of the image is encoded in full resolution. @@ -206,7 +201,7 @@ wivrn_hmd::wivrn_hmd(wivrn::wivrn_session * cnx, base->update_inputs = [](xrt_device *) { return XRT_SUCCESS; }; base->get_tracked_pose = method_pointer<&wivrn_hmd::get_tracked_pose>; base->get_view_poses = method_pointer<&wivrn_hmd::get_view_poses>; - base->get_battery_status = wivrn_hmd_get_battery_status; + base->get_battery_status = method_pointer<&wivrn_hmd::get_battery_status>; base->get_visibility_mask = get_visibility_mask; base->destroy = wivrn_hmd_destroy; name = XRT_DEVICE_GENERIC_HMD; @@ -322,8 +317,7 @@ void wivrn_hmd::get_view_poses(const xrt_vec3 * default_eye_relation, } } -xrt_result_t wivrn_hmd::get_battery_status(struct xrt_device * xdev, - bool * out_present, +xrt_result_t wivrn_hmd::get_battery_status(bool * out_present, bool * out_charging, float * out_charge) { @@ -427,12 +421,4 @@ static void wivrn_hmd_destroy(xrt_device * xdev) { static_cast(xdev)->unregister(); } - -static xrt_result_t wivrn_hmd_get_battery_status(struct xrt_device * xdev, - bool * out_present, - bool * out_charging, - float * out_charge) -{ - return static_cast(xdev)->get_battery_status(xdev, out_present, out_charging, out_charge); -} } // namespace wivrn diff --git a/server/driver/wivrn_hmd.h b/server/driver/wivrn_hmd.h index d748863a..32581e4f 100644 --- a/server/driver/wivrn_hmd.h +++ b/server/driver/wivrn_hmd.h @@ -75,8 +75,7 @@ public: xrt_space_relation * out_head_relation, xrt_fov * out_fovs, xrt_pose * out_poses); - xrt_result_t get_battery_status(struct xrt_device * xdev, - bool * out_present, + xrt_result_t get_battery_status(bool * out_present, bool * out_charging, float * out_charge);