New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweak mouse cursor startup behaviour #2855
base: master
Are you sure you want to change the base?
Conversation
From what I understand cursor centering is useful in fullscreen because sometimes on multi-display setups your cursor is "stuck" somewhere outside the game and if you click once you'll end up having to alt-tab back into the game, so it prevents that back and forth. For windowed mode this is less of a problem. |
I'm not sure if this is considered offtopic but as a user, I don't really care where my mouse is when I launch the game. Centering it automatically feels very restrict-y and makes me feel like I'm being trapped in a Chinese finger lock. |
can't really tell what's the benefit considering I always play on windowed mode |
SetCursorPos(m_StoredMousePosition.x, m_StoredMousePosition.y); | ||
if (m_StoredMousePosition.x != -1 && m_StoredMousePosition.y != -1) | ||
SetCursorPos(m_StoredMousePosition.x, m_StoredMousePosition.y); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is what reverts the cursor to its original position when you toggle showCursor
while ingame?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most likely.
I have tweaked it now to show system cursor and do not center cursor only if game is being launched in windowed mode or user has multiple monitors and full screen minimize is disabled. It basically ensures that clicking outside game window won't minimize the game. Things which remains controversial is the removal of one check from |
By the way, even in current Windows 10 update screen (fullscreen) cursor is visible and unlocked. And it feels great. |
This PR:
CLocalGUI::InputGoesToGUI()
.At first I wanted to disable this centering and show system mouse cursor only when game is being launched in windowed mode. But then I started testing it more and it feels right on fullscreen mode too to me. I literally feels less claustrophobic this way to me. You see your cursor and you can switch to other screen for example while this initial credits screen is showing. Games usually don't do that so we can discuss but for me - it simply feels good.
(startup in this context means initial SA credits screen technically)