mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-09-26 03:49:20 +02:00
fix(os_detection): don't classify macOS sequences as Windows macOS 26.x (ChibiOS) can send a late wLength=0x04 packet after the two 0xFF packets that already established OS_MACOS. The Windows check (cnt_ff >= 2 && cnt_04 >= 1) fired on this combination and overwrites the correct result. Real-world Windows sequences always start with 0xFF packets (cnt_02 = 0); macOS sequences always open with at least two 0x02 packets (cnt_02 >= 2). Adding && setups_data.cnt_02 < 2 to the Windows condition is sufficient to separate the two populations without affecting any existing detection. Adds a regression test for the affected sequence.