Skip to content

performance: Attack Shark X11 artwork, DPI panel and bounds - #8

Merged
snekxs merged 3 commits into
OpenMouse-Project:mainfrom
hyusband:attack-shark-x11-hide-unsupported-dpi
Sep 16, 2026
Merged

snekxs merged 3 commits into
OpenMouse-Project:mainfrom
hyusband:attack-shark-x11-hide-unsupported-dpi

Conversation

@hyusband

@hyusband hyusband commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Problem

The Overview rendered the generic placeholder for the Attack Shark X11, the Performance tab rendered a DPI panel whose Apply called setDpi unconditionally (failing with AttackSharkHidClient: setDpi not supported), and DPI bounds borrowed Logitech's 50-32000 range for every non-Razer brand.

Change

  • Artwork. Add public/devices/attackshark-x11.png - a top-down render cropped from the vendor's official product image and keyed onto transparency - and map 1d57:fa55 (wired) and 1d57:fa60 (2.4 GHz receiver) to it, plus a name fallback. The R1 (0xfa61) is a different mouse and stays on the placeholder.
  • DPI panel. Render it only when the device reports a DPI value (status.dpi > 0), so a driver that cannot read a DPI does not show a control whose Apply cannot work.
  • DPI bounds. Use the X11's own range (50-22,000 DPI in 50 DPI steps) and presets when the connected brand is Attack Shark; Logitech's 32,000 ceiling is outside what the X11's encoder can represent.

Battery and polling rate now arrive from the driver change in OpenMouse-Project/mouse-protocol#103; no Desktop-side change is needed to display them.

Polling and the other capability-gated rows are unaffected.

The DPI panel rendered for every device and its Apply called setDpi even when the connected driver has no setter, so the Attack Shark X11's native channel failed with 'No driver answered setDpi: AttackSharkHidClient: setDpi not supported'. Render the panel only when the device reports a DPI value; a driver that cannot read one simply does not show a control that cannot work.
The X11's sensor reaches 22,000 DPI in 50 DPI steps; the shared Logitech bounds (50-32000) would have allowed values the encoder cannot represent. Use the mouse's own range and presets when the connected brand is Attack Shark.
@hyusband hyusband changed the title performance: hide the DPI panel when the device reports none performance: Attack Shark X11 DPI panel and bounds Sep 14, 2026
The X11 (wired 0xfa55 and 2.4 GHz receiver 0xfa60) rendered the generic placeholder. Add a top-down render, cropped from the vendor's official product image and keyed onto transparency, and map both transports to it. The R1 (0xfa61) is a different mouse and stays on the placeholder.
@hyusband hyusband changed the title performance: Attack Shark X11 DPI panel and bounds performance: Attack Shark X11 artwork, DPI panel and bounds Sep 14, 2026
@snekxs
snekxs merged commit 3eec54d into OpenMouse-Project:main Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants