Update monado

This commit is contained in:
Sapphire
2025-11-15 20:34:57 +01:00
committed by xytovl
parent f880a987b2
commit 186362f4f5
4 changed files with 19 additions and 6 deletions
+1 -1
View File
@@ -58,7 +58,7 @@
# Keep in sync with CMakeLists.txt monado rev
rev = builtins.readFile ./monado-rev;
# Nix will output the correct hash when it doesn't match
hash = "sha256-gDYioBfBmTtKEQ0b8GwV9CeNhEDhSzAonzGxOvhey9g=";
hash = "sha256-vQKybwlJkrtDgU235a4z4oKrODRv9+Jo8Z66odWHZoQ=";
};
};
+1 -1
View File
@@ -1 +1 @@
ef0f552c3d773a2a4a04236c5d5ca78e3f90aad4
803e8168e4dbf5bc3ffa15261af2eccb422ee9d5
+15 -4
View File
@@ -33,6 +33,13 @@
namespace wivrn
{
xrt_result_t instance::is_system_available(bool * out_available)
{
assert(out_available != NULL);
*out_available = true;
return XRT_SUCCESS;
}
xrt_result_t instance::create_system(
struct xrt_system ** out_xsys,
struct xrt_system_devices ** out_xsysd,
@@ -42,6 +49,7 @@ xrt_result_t instance::create_system(
assert(out_xsysd != NULL);
assert(*out_xsysd == NULL);
assert(out_xsysc == NULL || *out_xsysc == NULL);
assert(server);
auto u_sys = u_system_create();
*out_xsys = &u_sys->base;
@@ -55,6 +63,7 @@ xrt_result_t instance::create_system(
if (res != XRT_SUCCESS)
return res;
session = (wivrn_session *)*out_xsysd;
session->start(server);
u_system_set_system_compositor(u_sys, *out_xsysc);
return res;
}
@@ -67,6 +76,7 @@ xrt_result_t instance::get_prober(struct xrt_prober ** out_xp)
instance::instance() :
xrt_instance{
.is_system_available = method_pointer<&instance::is_system_available>,
.create_system = method_pointer<&instance::create_system>,
.get_prober = method_pointer<&instance::get_prober>,
.destroy = [](xrt_instance * ptr) { delete (instance *)ptr; },
@@ -77,11 +87,12 @@ instance::instance() :
void instance::set_ipc_server(ipc_server * server)
{
assert(session);
if (server)
session->start(server);
else
this->server = server;
if (!server)
{
assert(session);
session->stop();
}
}
} // namespace wivrn
+2
View File
@@ -26,6 +26,7 @@ namespace wivrn
class wivrn_session;
class instance : public xrt_instance
{
xrt_result_t is_system_available(bool *);
xrt_result_t create_system(
xrt_system **,
xrt_system_devices **,
@@ -35,6 +36,7 @@ class instance : public xrt_instance
xrt_result_t get_prober(xrt_prober **);
wivrn_session * session = nullptr;
ipc_server * server = nullptr;
public:
using base = xrt_instance;