Closed ZigTag closed 2 months ago
g_iCursorShowCount not initialized.
g_iCursorShowCount not initialized.
oh you're right, thats a silly mistake, let me fix that
I ran this patch for around 6-7 hours, I think 5 hours straight, and it seems to be very stable. I found no issues throughout all of my gameplay. (I know I am the author, but I hadn't tested it this thoroughly before).
I had gotten from T-4h to PTC (T+~5h) on Apollo 8 on NASSP, without having any issues with loosing my cursor, and I had 0 instances of broken buttons, nor getting stuck in Rotation Mode when zooming
This PR patches the bug where the mouse could disappear when alt tabbing from the game, this was an almost game-breaking bug where you would have to restart your entire sim in order to fix the bug. The mouse now has a global hide counter to check for if it is already hidden, and prevents it from being hidden twice, this makes it so it can never be permanently hidden, as ShowCursor(true) only increments the counter by 1, whereas before it'd get stuck below 0 and therefore stay permanently hidden.
After patching the alt-tab bug, I noticed a bug in NASSP where when moving and scrolling the mouse, it would activate unintended buttons when trying to change the FOV. Rather than changing the FOV it would perform the "right click" action on any button while scrolling. I do not believe this is intended behavior, so I created a shim that activates when the camera rotation mode activates which prevents it from doing anything other than mouse movement, and camera interaction. This shouldn't affect anything other than mouse inputs as the shim is put into the orbiter mouse handler.
I decided that I should just combine the PRs because they're both complements to each other and should be merged together