Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Vindicus999
2026-01-20 02:01:41 +00:00
8 changed files with 52 additions and 44 deletions
+7 -3
View File
@@ -279,7 +279,6 @@ jobs:
VERSION_CODE=$(( $VERSION_CODE + 1 ))
fi
CSS=images/wivrn-release.css
APPNAME=WiVRn
else
VERSION_CODE=1
@@ -287,15 +286,20 @@ jobs:
if [ ${{ github.ref_type }} = 'tag' ]
then
SUFFIX=".github"
CSS=images/wivrn-release.css
APPNAME="WiVRn"
else
SUFFIX=".github.testing"
CSS=images/wivrn-nightly.css
APPNAME="WiVRn Testing"
fi
fi
if [ ${{ github.ref_type }} = 'tag' ]
then
CSS=images/wivrn-release.css
else
CSS=images/wivrn-nightly.css
fi
echo Setting version $VERSION and version code $VERSION_CODE in manifest
echo Using stylesheet $CSS and name $APPNAME
+15 -15
View File
@@ -308,29 +308,29 @@ wivrn::deserialization_packet wivrn::UDP::receive_raw()
static const size_t message_size = 2048;
static const size_t num_messages = 20;
if ((not buffer) or buffer.use_count() > 1)
{
#if defined(__cpp_lib_smart_ptr_for_overwrite) && __cpp_lib_smart_ptr_for_overwrite >= 202002L
buffer = std::make_shared_for_overwrite<uint8_t[]>(message_size * num_messages);
buffer = std::make_shared_for_overwrite<uint8_t[]>(message_size * num_messages);
#else
buffer.reset(new uint8_t[message_size * num_messages]);
buffer.reset(new uint8_t[message_size * num_messages]);
#endif
std::vector<iovec> iovecs;
std::vector<mmsghdr> mmsgs;
iovecs.reserve(num_messages);
mmsgs.reserve(num_messages);
}
std::array<iovec, num_messages> iovecs;
std::array<mmsghdr, num_messages> mmsgs;
for (size_t i = 0; i < num_messages; ++i)
{
iovecs.push_back({
iovecs[i] = {
.iov_base = buffer.get() + message_size * i,
.iov_len = message_size,
});
};
mmsgs.push_back(
{
.msg_hdr = {
.msg_iov = &iovecs.back(),
.msg_iovlen = 1,
},
});
mmsgs[i] = {
.msg_hdr = {
.msg_iov = &iovecs[i],
.msg_iovlen = 1,
},
};
}
int received = recvmmsg(fd, mmsgs.data(), num_messages, MSG_DONTWAIT, nullptr);
-17
View File
@@ -256,23 +256,6 @@ modules:
cleanup:
- '*'
- name: libnotify
buildsystem: meson
config-opts:
- -Dtests=false
- -Dintrospection=disabled
- -Dman=false
- -Dgtk_doc=false
- -Ddocbook_docs=disabled
sources:
- type: archive
url: https://download.gnome.org/sources/libnotify/0.8/libnotify-0.8.8.tar.xz
sha256: 23420ef619dc2cb5aebad613f4823a2fa41c07e5a1d05628d40f6ec4b35bfddd
x-checker-data:
type: gnome
name: libnotify
stable-only: true
- name: qcoro
buildsystem: cmake-ninja
config-opts:
+1 -1
View File
@@ -513,7 +513,7 @@ gboolean control_received(gint fd, GIOCondition condition, gpointer user_data)
[&](const wivrn::from_headset::start_app & request) {
const auto & apps = list_applications();
if (auto it = apps.find(request.app_id); it != apps.end())
children->start_application(it->second.exec);
children->start_application(it->second.exec, it->second.path);
},
[&](const from_monado::headset_connected &) {
stop_publishing();
+17 -3
View File
@@ -22,6 +22,7 @@
#include "utils/flatpak.h"
#include <cassert>
#include <filesystem>
#include <iomanip>
#include <iostream>
#include <stdlib.h>
@@ -95,15 +96,15 @@ static std::vector<std::string> unescape_string(const std::string & app_string)
return app;
}
void children_manager::start_application(const std::string & exec)
void children_manager::start_application(const std::string & exec, const std::optional<std::string> & path)
{
start_application(unescape_string(exec));
start_application(unescape_string(exec), path);
}
forked_children::forked_children(std::function<void()> state_changed_cb) :
state_changed_cb(state_changed_cb) {}
void forked_children::start_application(const std::vector<std::string> & args)
void forked_children::start_application(const std::vector<std::string> & args, const std::optional<std::string> & path)
{
if (args.empty())
return;
@@ -151,6 +152,19 @@ void forked_children::start_application(const std::vector<std::string> & args)
{
tmp.push_back("flatpak-spawn");
tmp.push_back("--host");
if (path)
tmp.push_back("--directory=" + *path);
}
else
{
try
{
std::filesystem::current_path(*path);
}
catch (std::exception & e)
{
std::cerr << "Failed to set path to " << *path << ": " << e.what() << std::endl;
}
}
tmp.insert(tmp.end(), args.begin(), args.end());
+4 -3
View File
@@ -19,6 +19,7 @@
#include <functional>
#include <glib.h>
#include <optional>
#include <string>
#include <sys/types.h>
#include <unordered_map>
@@ -32,8 +33,8 @@ class children_manager
public:
virtual ~children_manager();
virtual void start_application(const std::vector<std::string> &) = 0;
void start_application(const std::string &);
virtual void start_application(const std::vector<std::string> &, const std::optional<std::string> & path = {}) = 0;
void start_application(const std::string &, const std::optional<std::string> & path = {});
virtual bool running() const = 0;
@@ -55,7 +56,7 @@ public:
forked_children(std::function<void()> state_changed_cb);
virtual ~forked_children();
void start_application(const std::vector<std::string> &) override;
void start_application(const std::vector<std::string> &, const std::optional<std::string> & path) override;
// true if any unit started by this object is still running
bool running() const override;
+7 -1
View File
@@ -196,7 +196,7 @@ struct variant_builder
}; // namespace
void systemd_units_manager::start_application(const std::vector<std::string> & args)
void systemd_units_manager::start_application(const std::vector<std::string> & args, const std::optional<std::string> & path)
{
if (args.empty())
return;
@@ -224,6 +224,12 @@ void systemd_units_manager::start_application(const std::vector<std::string> & a
&exec_start,
1));
if (path)
g_variant_builder_add(&b,
"(sv)",
"WorkingDirectory",
g_variant_new("s", path->c_str()));
if (auto path = std::getenv("PATH"))
{
variant_builder pathv(G_VARIANT_TYPE("as"));
+1 -1
View File
@@ -54,7 +54,7 @@ public:
systemd_units_manager(GDBusConnection * connection, std::function<void()> state_changed_cb);
// create and start the transient unit
void start_application(const std::vector<std::string> &) override;
void start_application(const std::vector<std::string> &, const std::optional<std::string> & path) override;
// true if any unit started by this object is still running
bool running() const override;