[BUG]: Incorrect handling of progressive flag in pcsx2/USB/usb-lightgun/guncon2.cpp
Describe the Bug
Looking at the code, button_state is by default 0. But then we have this code to acknowledge the progressive flag in the report sent from the PS2 to the guncon2:
out.buttons = static_cast<u16>(~us->button_state) | (us->param_mode & GUNCON2_FLAG_PROGRESSIVE);But us->button_state has bit 11 (the bit corresponding to the progressive flag) zero, so ~us->button_state has the bit equal to one, so the | (us->param_mode & GUNCON2_FLAG_PROGRESSIVE) is ignored. Since bit 11 of us->button_state never becomes one in the code that I can see, the bitwise-or is always a NOP.
If you want to tell the game that the guncon2 has acknowledged the progressive flag that was sent to it, you should move the parentheses to read:
out.buttons = static_cast<u16>(~us->button_state | (us->param_mode & GUNCON2_FLAG_PROGRESSIVE));My testing with TimeCrisis2 indicates that if the buttons field sent to the PS2 has bit 11 zero, the game displays a message that we have progressive scan, and offers two-point calibration, while if bit 11 is one, the game offers only single-point calibration. I think the game works fine either way. (In the interests of full disclosure, my actual game testing is in my fork of Play! that has guncon2 support, because I don't yet have a legal PS2 BIOS. I am waiting for a PS2 from ebay so I can extract a BIOS from it.)
I am new to the PS2 stuff, so I could easily be mistaken about how this is supposed to work.
Reproduction Steps
N/A: report based on looking at source
Expected Behavior
N/A: report based on looking at source
PCSX2 Revision
9/28/2026 github HEAD
Operating System
Windows 11
If Linux - Specify Distro
No response
CPU
N/A
GPU
N/A
GS Settings
No response
Emulation Settings
No response
GS Window Screenshots
No response
Logs & Dumps
No response
Source: PCSX2/pcsx2