Rework wifi/multicast locks

This commit is contained in:
Patrick Nicolas
2024-09-12 17:00:07 +02:00
parent 5822dddab4
commit b7f27e9300
8 changed files with 127 additions and 72 deletions
+2 -3
View File
@@ -29,7 +29,6 @@
#include "stream.h"
#include "utils/contains.h"
#include "version.h"
#include "wifi_lock.h"
#include "wivrn_client.h"
#include "xr/passthrough.h"
#include <glm/gtc/matrix_access.hpp>
@@ -744,7 +743,7 @@ void scenes::lobby::on_focused()
about_picture = imgui_ctx->load_texture("wivrn.png");
}
setup_passthrough();
wifi_lock::want_multicast(true);
multicast = application::get_wifi_lock().get_multicast_lock();
}
void scenes::lobby::setup_passthrough()
@@ -792,7 +791,7 @@ void scenes::lobby::on_unfocused()
swapchains_controllers.clear();
swapchain_imgui = xr::swapchain();
passthrough.emplace<std::monostate>();
wifi_lock::want_multicast(false);
multicast.reset();
}
void scenes::lobby::on_session_state_changed(XrSessionState state)