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

Free Look: Add background input setting (disabled by default) #10843

Merged

Conversation

Pokechu22
Copy link
Contributor

Before, Free Look would accept background input by default, which means it was easy to accidentally move the camera while typing in another window. (This is because HotkeyScheduler::Run sets the input gate to true after it's copied the hotkey state, supposedly for other threads (though SetInputGate uses a thread_local variable so I'm not 100% sure that's correct) and for the GBA windows (which always accept unfocused input, presumably because they won't be focused normally).

Before, Free Look would accept background input by default, which means it was easy to accidentally move the camera while typing in another window. (This is because HotkeyScheduler::Run sets the input gate to `true` after it's copied the hotkey state, supposedly for other threads (though `SetInputGate` uses a `thread_local` variable so I'm not 100% sure that's correct) and for the GBA windows (which always accept unfocused input, presumably because they won't be focused normally).
@iwubcode
Copy link
Contributor

If I'm remembering right, FreeLook would use whatever background input value was specified for the normal controllers. So while it was possible to change, it was really klunky.

This has been in my backlog for a while. Appreciate you doing this.

I took a glance at the code, I'll do a proper review / test later tonight.

@Pokechu22
Copy link
Contributor Author

That would have made sense, but in practice it seems like it wasn't respecting either the controller one or the hotkey one. (Maybe it did use them in the past but it broke at some point?)

Copy link
Contributor

@iwubcode iwubcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. Tested both FreeLook controller and normal game controller, works as expected.

@AdmiralCurtiss AdmiralCurtiss merged commit 537fe33 into dolphin-emu:master Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants