Refactoring gamepad support

This was never updated after the view handling rewrite.