fix(ci): the ABI pin, android dead code, windows gamescope compile #455

Merged
enricobuehler merged 2 commits from touch/dial-model into main 2026-08-30 20:56:08 +00:00
5 changed files with 36 additions and 10 deletions
+12 -2
View File
@@ -15,7 +15,7 @@ use crate::model::ConsoleCmd;
use crate::pointer::{Pointer, PointerKind};
use crate::theme::{fill, glow_ring, rim_light, ring_scrim, soft_shadow, stroke, Fonts, W};
use crate::widgets::{ListMsg, MenuList, RowSpec};
use pf_client_core::host_actions::{self, ActionInfo};
use pf_client_core::host_actions::ActionInfo;
use pf_client_core::menu_nav::{MenuDir, MenuEvent, MenuPulse};
use pf_client_core::overlay_actions::{chord_chip, key_vk, OverlayConfig, RingPlatform, SlotId};
use pf_client_core::ring::{RingCommand, RingFacts, RingInput};
@@ -254,6 +254,11 @@ impl Ring {
self.facts = facts.clone();
}
// The next six are the IN-STREAM ring's surface, driven only by the desktop overlay
// (`skia_overlay`, Linux/Windows). The Android console holds the ring solely as the
// editor, so its clippy sees them unused — allowed rather than cfg'd out, because
// cfg'ing them would cascade into their parameter types' imports.
#[cfg_attr(target_os = "android", allow(dead_code))]
pub(crate) fn input(&mut self, input: RingInput) {
match input {
RingInput::Turn {
@@ -332,15 +337,18 @@ impl Ring {
}
}
#[cfg_attr(target_os = "android", allow(dead_code))]
pub(crate) fn take_command(&mut self) -> Option<RingCommand> {
self.pending.pop_front()
}
#[cfg_attr(target_os = "android", allow(dead_code))]
pub(crate) fn take_cmds(&mut self) -> Vec<ConsoleCmd> {
std::mem::take(&mut self.cmds)
}
/// Everything the drawing depends on, folded into one number for the damage gate.
#[cfg_attr(target_os = "android", allow(dead_code))]
pub(crate) fn damage(&self) -> u64 {
if !self.visible() {
return 0;
@@ -369,6 +377,7 @@ impl Ring {
/// Is any spring, ease or entrance still short of where it is going? Read before a
/// frame, so it describes the state the last render left behind.
#[cfg_attr(target_os = "android", allow(dead_code))]
fn animating(&self) -> bool {
if self.closing {
return true;
@@ -399,7 +408,7 @@ impl Ring {
fn actions(&self) -> Vec<ActionInfo> {
#[cfg(any(target_os = "linux", windows))]
{
host_actions::cached(&self.facts.fp_hex)
pf_client_core::host_actions::cached(&self.facts.fp_hex)
}
#[cfg(not(any(target_os = "linux", windows)))]
{
@@ -788,6 +797,7 @@ impl Ring {
/// Keyboard while open — the pad's vocabulary on keys: arrows move the highlight, Return
/// activates, Escape backs out. Always consumed while open.
#[cfg_attr(target_os = "android", allow(dead_code))]
pub(crate) fn key(&mut self, key: Key) -> bool {
if !self.open() {
return false;
+3 -1
View File
@@ -1070,7 +1070,9 @@ impl Shell {
}
/// One command straight onto the bus — the in-stream ring's host actions, which have no
/// screen and so no `Outbox`.
/// screen and so no `Outbox`. Only the desktop overlay calls it; the Android console's
/// ring is the editor alone.
#[cfg_attr(target_os = "android", allow(dead_code))]
pub(crate) fn send_cmd(&self, cmd: ConsoleCmd) {
self.bus.send(cmd);
}
+3 -1
View File
@@ -188,7 +188,9 @@ impl MenuList {
/// Is anything still on the move — an entrance, a focus ease, a spring, the scroll?
/// The damage-gated stream overlay asks every frame and keeps redrawing until this is
/// false; the console draws every frame regardless and never needs to ask.
/// false; the console draws every frame regardless and never needs to ask — which is
/// why the Android console (editor only, no stream overlay) never calls it.
#[cfg_attr(target_os = "android", allow(dead_code))]
pub(crate) fn animating(&self) -> bool {
!self.settled
}
+15 -4
View File
@@ -443,9 +443,7 @@ impl StreamState {
cursor_chan: None,
access: pf_client_core::access::SessionAccess::default(),
session_notice: None,
touch_mouse: crate::touch::SteamTouchMouse::new(
pf_client_core::overlay_focus::gamescope_session(),
),
touch_mouse: crate::touch::SteamTouchMouse::new(in_gamescope()),
last_hint: None,
hint_override: false,
sent_client_draws: None,
@@ -1631,7 +1629,7 @@ fn run_inner(mut opts: SessionOpts, mut mode: ModeCtl) -> Result<Option<Outcome>
// touch (design §5.5): no DIRECT device here, no twist can ever arrive.
tracing::info!(
devices = ?touch_devices(),
gamescope = pf_client_core::overlay_focus::gamescope_session(),
gamescope = in_gamescope(),
"touch devices"
);
window
@@ -3030,6 +3028,19 @@ fn overlay_pointer(event: &Event, window: &sdl3::video::Window) -> Option<Pointe
})
}
/// Inside a gamescope session? `overlay_focus` (and gamescope itself) exist only on Linux;
/// everywhere else the answer is simply no.
fn in_gamescope() -> bool {
#[cfg(target_os = "linux")]
{
pf_client_core::overlay_focus::gamescope_session()
}
#[cfg(not(target_os = "linux"))]
{
false
}
}
/// Every touch device SDL sees, as `(id, kind, name)` — logged at connect: under gamescope
/// this is the tell for whether Steam Input hands the touchscreen through as touch (§5.5).
fn touch_devices() -> Vec<(u64, &'static str, String)> {
+3 -2
View File
@@ -6316,8 +6316,9 @@ mod abi_version_tests {
/// exists so an accidental edit cannot drift the version silently.
#[test]
fn abi_version_is_pinned() {
assert_eq!(crate::ABI_VERSION, 27);
assert_eq!(super::punktfunk_abi_version(), 27);
// v28: `punktfunk_connection_host_caps2` + `PUNKTFUNK_HOST_CAP2_TOUCH` (additive).
assert_eq!(crate::ABI_VERSION, 28);
assert_eq!(super::punktfunk_abi_version(), 28);
}
}