-
Notifications
You must be signed in to change notification settings - Fork 60
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
sdl_input: rewrite IN_SetMouseMode
to make it more readable
#1141
base: master
Are you sure you want to change the base?
Conversation
0c2e818
to
4b14895
Compare
Did you mean Alt-Enter? |
Just tried it and |
Fullscreen toggling normally does |
Try #1146. |
I cannot grasp the code in the current state so I cannot debug it.
My experience with NetRadiant taught me that not centering a mouse pointer when entering delta mode may help the mouse to escape the capture. It may be possible that this is useless with SDL, but it can't do harm to do it so I prefer to be extra-cautious.
IN_SetMouseMode
to make it more readable and fix mouse escape on fullscreen togglingIN_SetMouseMode
to make it more readable
4b14895
to
8172ba7
Compare
Even with #1146 I still have interest in this branch (once the fullscreen toggling commit removed). I don't trust the current code because I don't understand it enough, it's too much implicit. I experience many input issues like having the pointer centered while the game is not focused, or not being able to click on focused windows because the game continue to steal the input, etc, so I want to make sure that all I want the engine do in that function is done by the engine, to be able to know if the bugs may come from something else than the engine or not. |
I prefer the old version. But of course I'm biased, as the last person to rewrite that function. |
sdl_input: rewrite IN_SetMouseMode to make it easier to read
I cannot grasp the code in the current state so I cannot debug it.
sdl_input: keep the mouse in current state when toggling fullscreen.This fixes the mouse capture being lost on Alt-Enter
sdl_input: also centers the mouse pointer when entering delta mode
My experience with NetRadiant taught me that not centering a mouse pointer when entering delta mode may help the mouse to escape the capture. It may be possible that this is useless with SDL, but it can't do harm to do it so I prefer to be extra-precocious.