mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-06 07:06:10 +00:00
steamvr_lh: add frame mutex to prevent double free
This commit is contained in:
parent
3adfd58bcc
commit
4c1c593bf4
|
@ -372,6 +372,7 @@ ControllerDevice::set_haptic_handle(vr::VRInputComponentHandle_t handle)
|
||||||
void
|
void
|
||||||
Device::update_inputs()
|
Device::update_inputs()
|
||||||
{
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(frame_mutex);
|
||||||
ctx->maybe_run_frame(++current_frame);
|
ctx->maybe_run_frame(++current_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,8 @@ private:
|
||||||
std::vector<xrt_binding_profile> binding_profiles_vec;
|
std::vector<xrt_binding_profile> binding_profiles_vec;
|
||||||
uint64_t current_frame{0};
|
uint64_t current_frame{0};
|
||||||
|
|
||||||
|
std::mutex frame_mutex;
|
||||||
|
|
||||||
void
|
void
|
||||||
init_chaperone(const std::string &steam_install);
|
init_chaperone(const std::string &steam_install);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue