Skip to content
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

Mouse Control(Windows only for now) #9644

Merged
merged 6 commits into from
Apr 27, 2017
Merged

Conversation

LunaMoo
Copy link
Collaborator

@LunaMoo LunaMoo commented Apr 26, 2017

No idea how to do that for other desktop platforms(RawInput code?), but seems to work decently on windows.

Uses workaround for mapping mouse(axis as well as left button) which is in form of checkbox that get's added when mouse control is activated, after selecting it, user can map whatever with a mouse once, then has to activate it again, not pretty but works, maybe this can be done better, I just had no ideas how to solve that nicely.:|

Outside of mapping workaround, mouse is only enabled in-game, and using it also disables double click fullscreen switch, cursor is hidden in-game as well. Tested mostly on MGS with my Right Analog Aim patch and it worked quite well with default settings, but also this add's two sliders for sensitivity and another for smoothing.

PS for that first line of UI/GameSettingsScreen.cpp this removes BOM, not add's it;p.

@hrydgard
Copy link
Owner

Seems nice. My only concern is how to make users understand the limitations, and not start complaining about how mouse won't work in X game which has a pointer controllable with the stick, or in Y FPS shooter...

@MarcoEstevez
Copy link

Maybe special bindings section under settings, actually keyboard and joystick works together, why not a third one activatable by a flag with a nice warning: "Might not work properly on every game"

@LunaMoo
Copy link
Collaborator Author

LunaMoo commented Apr 27, 2017

Mouse can be mapped to any psp keys, so left stick, right stick, d-pad or face keys all would work without any game patches. But yeah when it does work it does not work exactly like a native mouse support in pc games and less understanding people might complain, customizable per-game patches adding better analog support help, but aren't required.:]

Edit:
Oh I might missunderstand the concern:P ~ I guess an extra message when turning mouse control that mouse now can be mapped could be enough to avoid confussion with thinking it's mapped to some "in game cursor".

With recent forum threads about it(here and here seems that people who actually want to use mouse might not care as much how well it resembles true mouse control as long as it works ~ kind of a reason why I'm trying to push that feature from the closet.

I see one potentially bothersome problem and not sure how to deal with it ~ in windowed mode mouse cursor can go outside of the window - assuming most people will just play games in fullscreen it might be desired to leave window with mouse at will, however I don't have a multi-monitor setup to test and I think this could be a problem on those.

BTW is the missing break; in here intentional(to avoid mapping syskey used for windows menu)? Asking because there was some thread with someone complaining about being unable to map ALT key;p.

@LunaMoo
Copy link
Collaborator Author

LunaMoo commented Apr 27, 2017

I guess I'm happy how it works now, seems user friendly enough and good enough to make mouse usable even in window mode.

Partially(windows only) covers #4650 and #8196, hopefully didn't made too much mess in the code. (hides >.>)

@hrydgard
Copy link
Owner

Huh, pretty sure that missing "break;" is a mistake :P Feel free to correct it.

I think the code looks alright, hopefully it won't break anything else :)

@hrydgard hrydgard merged commit 96b858e into hrydgard:master Apr 27, 2017
@LunaMoo LunaMoo deleted the MouseControl branch April 27, 2017 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants