add server messages (with toasts!)

This commit is contained in:
caszuu
2026-02-27 16:03:18 +01:00
committed by xytovl
parent 7d11674b2a
commit c44940d004
6 changed files with 84 additions and 5 deletions
+14
View File
@@ -47,6 +47,20 @@ void scenes::stream::process_packets()
}
}
void scenes::stream::operator()(to_headset::server_message && message)
{
switch (message.kind)
{
case to_headset::server_message::kind::stream_toast:
case to_headset::server_message::kind::stream_toast_urgent:
auto toast = gui_toast.lock();
toast->emplace(message.msg, message.kind == to_headset::server_message::kind::stream_toast_urgent);
gui_status_last_change = instance.now();
break;
}
}
void scenes::stream::operator()(to_headset::video_stream_data_shard && shard)
{
std::shared_lock lock(decoder_mutex);