Add packets to list applications
This commit is contained in:
@@ -311,6 +311,15 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
const auto & info = application::get_messages_info();
|
||||
self->network_session->send_control(from_headset::get_application_list{
|
||||
.language = info.language,
|
||||
.country = info.country,
|
||||
.variant = info.variant,
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
const auto & config = application::get_config();
|
||||
self->override_foveation_enable = config.override_foveation_enable;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "scene.h"
|
||||
#include "scenes/input_profile.h"
|
||||
#include "stream_reprojection.h"
|
||||
#include "utils/thread_safe.h"
|
||||
#include "wifi_lock.h"
|
||||
#include "wivrn_client.h"
|
||||
#include "wivrn_packets.h"
|
||||
@@ -174,6 +175,9 @@ private:
|
||||
// Keep a reference to the resources needed to blit the images until vkWaitForFences
|
||||
std::vector<std::shared_ptr<wivrn::shard_accumulator::blit_handle>> current_blit_handles;
|
||||
|
||||
// Last application list received from server
|
||||
thread_safe<to_headset::application_list> applications;
|
||||
|
||||
stream();
|
||||
|
||||
public:
|
||||
@@ -197,6 +201,7 @@ public:
|
||||
void operator()(to_headset::audio_stream_description &&);
|
||||
void operator()(to_headset::video_stream_description &&);
|
||||
void operator()(to_headset::refresh_rate_change &&);
|
||||
void operator()(to_headset::application_list &&);
|
||||
void operator()(audio_data &&);
|
||||
|
||||
void push_blit_handle(wivrn::shard_accumulator * decoder, std::shared_ptr<wivrn::shard_accumulator::blit_handle> handle);
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include "application.h"
|
||||
#endif
|
||||
#include "utils/named_thread.h"
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
@@ -99,3 +101,9 @@ void scenes::stream::send_feedback(const wivrn::from_headset::feedback & feedbac
|
||||
spdlog::warn("Exception while sending feedback packet: {}", e.what());
|
||||
}
|
||||
}
|
||||
|
||||
void scenes::stream::operator()(to_headset::application_list && apps)
|
||||
{
|
||||
auto locked = applications.lock();
|
||||
*locked = std::move(apps);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user