From c116d6f95e2937ee0d42827a8bddcd4640539d92 Mon Sep 17 00:00:00 2001 From: snekxs <26660858+snekxs@users.noreply.github.com> Date: Sun, 30 Aug 2026 01:17:03 -0600 Subject: [PATCH] Correct DeathAdder V4 Pro's polling ceiling and DPI ceiling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cross-referenced against openrazer/openrazer#2508 (merged), the PR that added DeathAdder V4 Pro support to OpenRazer: - The wired PID (0x00be) was defaulting to MODERN_WIRED's usual 1000 Hz cap, but openrazer's POLL_RATES for both its wired and wireless classes go to 8000 Hz (a HyperPolling receiver ships in the box even for the cabled mode) — give it its own highRatePolling override, same pattern as the Viper V3 Pro's wired/wireless split. - Both PIDs were using the shared 35K-generation DPI ceiling, but openrazer documents this model's own DPI_MAX = 45000 (and separately raised the driver's shared set-DPI clamp to accommodate it) — added a DPI_DEATHADDER_V4_PRO constant rather than reusing DPI_FOCUS_PRO_35K, which several unrelated 35K-sensor mice still correctly cap at. Both PIDs stay nativeOnly: true — unchanged, and still correct per this file's own note that the control channel sits on a Chrome-protected collection (Chrome/WebHID's page-protection, not a hardware limitation), so these facts only matter to a native-HID consumer like openmouse-desktop. Full test suite passes (572/572), including the guard that already caught the highRatePolling/pollingRates mismatch on first attempt. Co-Authored-By: Claude Sonnet 5 --- src/razer/devices.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/razer/devices.ts b/src/razer/devices.ts index 1beea44..4743879 100644 --- a/src/razer/devices.ts +++ b/src/razer/devices.ts @@ -244,6 +244,11 @@ const DPI_CHROMA = 16_000; const DPI_FOCUS = 20_000; const DPI_FOCUS_PRO = 30_000; const DPI_FOCUS_PRO_35K = 35_000; +// DeathAdder V4 Pro only. OpenRazer PR #2508 documents this model's own +// `DPI_MAX = 45000` (and raised the shared set-DPI clamp to match) — a higher +// ceiling than the rest of the 35K-sensor generation above, so it gets its +// own constant rather than reusing DPI_FOCUS_PRO_35K. +const DPI_DEATHADDER_V4_PRO = 45_000; /** * Chroma-era and older wired mice. OpenRazer's `standard` group answers on the @@ -612,8 +617,12 @@ const PRODUCT_DEFINITIONS: ReadonlyArray<[number, Omit