mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
d6af294a23
When Android presents an input event to an app, it wants the app to return true or false depending on whether the app handled the event or not. If the event wasn't handled by the app, it will be passed on to the system, which may decide to take an action depending on what kind of input event it is. For instance, if a B button press is passed on to the system, it will be turned into a Back press. But if an R1 press is passed on to the system, nothing in particular happens. It's important that we get this return value right in Dolphin. For instance, the user generally wouldn't want a B button press to open the EmulationActivity menu, so B button presses usually shouldn't be passed on to the system - but volume button presses usually should be passed on to the system, since it would be hard to adjust the volume otherwise. What ButtonManager did was to pass on input events that are for a button which the user has not mapped, which I think makes sense. But exactly how to implement that is more complicated in the new input backend than in ButtonManager, because now we have a separation between the input backend and the code that keeps track of the user's mappings. What I'm going with in this commit is to treat an input as mapped if it has been polled recently. In part I chose this because it seemed like a simple way of implementing it that wouldn't cause too many layering violations, but it also has two useful side effects: 1. If a controller is not being polled (e.g. GameCube controllers in Wii games that don't use them), its mappings will not be considered. 2. Once sensor input is implemented in the Android input backend, we will be able to use this "polled recently" tracking to power down the sensors at times when the game is using a Wii Remote reporting mode that doesn't include motion data. (Assuming that the sensor inputs only are mapped to Wii Remote motion controls, that is.) |
||
---|---|---|
.. | ||
AudioCommon | ||
Common | ||
Core | ||
DiscIO | ||
DolphinNoGUI | ||
DolphinQt | ||
DolphinTool | ||
InputCommon | ||
MacUpdater | ||
UICommon | ||
UpdaterCommon | ||
VideoBackends | ||
VideoCommon | ||
WinUpdater | ||
CMakeLists.txt | ||
DolphinLib.ARM64.props | ||
DolphinLib.props | ||
DolphinLib.vcxproj | ||
DolphinLib.vcxproj.user | ||
DolphinLib.x64.props |