raylib: don't create vipc client twice first time

This commit is contained in:
Shane Smiskol
2025-10-11 23:36:05 -07:00
parent 32f65bae55
commit 5f7b05e808
+2 -1
View File
@@ -107,7 +107,8 @@ class CameraView(Widget):
ui_state.add_offroad_transition_callback(self._offroad_transition)
def _offroad_transition(self):
if ui_state.is_onroad():
# Reconnect if not first time going onroad
if ui_state.is_onroad() and self.frame is not None:
# Prevent old frames from showing when going onroad. Qt has a separate thread
# which drains the VisionIpcClient SubSocket for us. Re-connecting is not enough
# and only clears internal buffers, not the message queue.