Skip to content

Your Android phone and your Windows PC, working as one. Local-first, end-to-end encrypted, no account.

fix(spikes): guard Windows-specific video constants and allow unused on non-Windows

saivinay1805a69b2ca51bc5
diff --git a/spikes/s1-qt-rust/cpp/video_surface.cpp b/spikes/s1-qt-rust/cpp/video_surface.cpp
index 369cba1..eb13fae 100644
--- a/spikes/s1-qt-rust/cpp/video_surface.cpp
+++ b/spikes/s1-qt-rust/cpp/video_surface.cpp
@@ -24,9 +24,11 @@ namespace nl {
namespace {
+#ifdef _WIN32
constexpr quint32 kWidth = 1920;
constexpr quint32 kHeight = 1080;
constexpr quint32 kFps = 60;
+#endif
// Owns the producer and the GPU resources on Qt's device. Lives on the render
// thread, so the producer stops whenever the scene graph lets go of the node.
diff --git a/spikes/s1-qt-rust/src/main.rs b/spikes/s1-qt-rust/src/main.rs
index b5b1c53..fee51c8 100644
--- a/spikes/s1-qt-rust/src/main.rs
+++ b/spikes/s1-qt-rust/src/main.rs
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//! Spike S1: can Qt Quick + Rust deliver the NectarLink design within the
//! performance budgets? See README.md for what is measured and the results.
+#![cfg_attr(not(windows), allow(unused))]
mod bridge;
mod mica;