fix(ci): the ABI pin, android dead code, windows gamescope compile #455
@@ -15,7 +15,7 @@ use crate::model::ConsoleCmd;
|
|||||||
use crate::pointer::{Pointer, PointerKind};
|
use crate::pointer::{Pointer, PointerKind};
|
||||||
use crate::theme::{fill, glow_ring, rim_light, ring_scrim, soft_shadow, stroke, Fonts, W};
|
use crate::theme::{fill, glow_ring, rim_light, ring_scrim, soft_shadow, stroke, Fonts, W};
|
||||||
use crate::widgets::{ListMsg, MenuList, RowSpec};
|
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::menu_nav::{MenuDir, MenuEvent, MenuPulse};
|
||||||
use pf_client_core::overlay_actions::{chord_chip, key_vk, OverlayConfig, RingPlatform, SlotId};
|
use pf_client_core::overlay_actions::{chord_chip, key_vk, OverlayConfig, RingPlatform, SlotId};
|
||||||
use pf_client_core::ring::{RingCommand, RingFacts, RingInput};
|
use pf_client_core::ring::{RingCommand, RingFacts, RingInput};
|
||||||
@@ -254,6 +254,11 @@ impl Ring {
|
|||||||
self.facts = facts.clone();
|
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) {
|
pub(crate) fn input(&mut self, input: RingInput) {
|
||||||
match input {
|
match input {
|
||||||
RingInput::Turn {
|
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> {
|
pub(crate) fn take_command(&mut self) -> Option<RingCommand> {
|
||||||
self.pending.pop_front()
|
self.pending.pop_front()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(target_os = "android", allow(dead_code))]
|
||||||
pub(crate) fn take_cmds(&mut self) -> Vec<ConsoleCmd> {
|
pub(crate) fn take_cmds(&mut self) -> Vec<ConsoleCmd> {
|
||||||
std::mem::take(&mut self.cmds)
|
std::mem::take(&mut self.cmds)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Everything the drawing depends on, folded into one number for the damage gate.
|
/// 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 {
|
pub(crate) fn damage(&self) -> u64 {
|
||||||
if !self.visible() {
|
if !self.visible() {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -369,6 +377,7 @@ impl Ring {
|
|||||||
|
|
||||||
/// Is any spring, ease or entrance still short of where it is going? Read before a
|
/// 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.
|
/// frame, so it describes the state the last render left behind.
|
||||||
|
#[cfg_attr(target_os = "android", allow(dead_code))]
|
||||||
fn animating(&self) -> bool {
|
fn animating(&self) -> bool {
|
||||||
if self.closing {
|
if self.closing {
|
||||||
return true;
|
return true;
|
||||||
@@ -399,7 +408,7 @@ impl Ring {
|
|||||||
fn actions(&self) -> Vec<ActionInfo> {
|
fn actions(&self) -> Vec<ActionInfo> {
|
||||||
#[cfg(any(target_os = "linux", windows))]
|
#[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)))]
|
#[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
|
/// Keyboard while open — the pad's vocabulary on keys: arrows move the highlight, Return
|
||||||
/// activates, Escape backs out. Always consumed while open.
|
/// 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 {
|
pub(crate) fn key(&mut self, key: Key) -> bool {
|
||||||
if !self.open() {
|
if !self.open() {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1070,7 +1070,9 @@ impl Shell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// One command straight onto the bus — the in-stream ring's host actions, which have no
|
/// 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) {
|
pub(crate) fn send_cmd(&self, cmd: ConsoleCmd) {
|
||||||
self.bus.send(cmd);
|
self.bus.send(cmd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,7 +188,9 @@ impl MenuList {
|
|||||||
|
|
||||||
/// Is anything still on the move — an entrance, a focus ease, a spring, the scroll?
|
/// 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
|
/// 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 {
|
pub(crate) fn animating(&self) -> bool {
|
||||||
!self.settled
|
!self.settled
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -443,9 +443,7 @@ impl StreamState {
|
|||||||
cursor_chan: None,
|
cursor_chan: None,
|
||||||
access: pf_client_core::access::SessionAccess::default(),
|
access: pf_client_core::access::SessionAccess::default(),
|
||||||
session_notice: None,
|
session_notice: None,
|
||||||
touch_mouse: crate::touch::SteamTouchMouse::new(
|
touch_mouse: crate::touch::SteamTouchMouse::new(in_gamescope()),
|
||||||
pf_client_core::overlay_focus::gamescope_session(),
|
|
||||||
),
|
|
||||||
last_hint: None,
|
last_hint: None,
|
||||||
hint_override: false,
|
hint_override: false,
|
||||||
sent_client_draws: None,
|
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.
|
// touch (design §5.5): no DIRECT device here, no twist can ever arrive.
|
||||||
tracing::info!(
|
tracing::info!(
|
||||||
devices = ?touch_devices(),
|
devices = ?touch_devices(),
|
||||||
gamescope = pf_client_core::overlay_focus::gamescope_session(),
|
gamescope = in_gamescope(),
|
||||||
"touch devices"
|
"touch devices"
|
||||||
);
|
);
|
||||||
window
|
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
|
/// 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).
|
/// this is the tell for whether Steam Input hands the touchscreen through as touch (§5.5).
|
||||||
fn touch_devices() -> Vec<(u64, &'static str, String)> {
|
fn touch_devices() -> Vec<(u64, &'static str, String)> {
|
||||||
|
|||||||
@@ -6316,8 +6316,9 @@ mod abi_version_tests {
|
|||||||
/// exists so an accidental edit cannot drift the version silently.
|
/// exists so an accidental edit cannot drift the version silently.
|
||||||
#[test]
|
#[test]
|
||||||
fn abi_version_is_pinned() {
|
fn abi_version_is_pinned() {
|
||||||
assert_eq!(crate::ABI_VERSION, 27);
|
// v28: `punktfunk_connection_host_caps2` + `PUNKTFUNK_HOST_CAP2_TOUCH` (additive).
|
||||||
assert_eq!(super::punktfunk_abi_version(), 27);
|
assert_eq!(crate::ABI_VERSION, 28);
|
||||||
|
assert_eq!(super::punktfunk_abi_version(), 28);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user