source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

game_controls: Fix model panels setting wrong mouse cursor position after manipulation

Open copperpixel opened this issue 1 month ago • 1 comments

Description

This PR adds a check to CBaseModelPanel::OnMouseReleased to only restore cursor position when the panel is capturing the mouse.

This caused an issue where if the mouse was released when the press wasn't started on the model panel it caused the mouse cursor to warp to a wrong position, that either being:     a) garbage memory caused by m_nClickStartX and m_nClickStartY not being initialized     b) the position of where the panel was clicked on the last time

Demonstration video of the issue (had to make the cursor very large because otherwise Shadowplay wouldn't render it into the video (?)):

pottery_wheel_cursor_wrong_warp_before.webm

copperpixel avatar Nov 25 '25 05:11 copperpixel

You are on fire with these!!

bobatealee avatar Nov 26 '25 02:11 bobatealee