ControlMapper: Allow overriding PSP button event handling through a callback.

This commit is contained in:
Henrik Rydgård
2023-03-28 00:23:18 +02:00
parent 4739d6c37d
commit 534896d2ab
10 changed files with 27 additions and 8 deletions
+5 -1
View File
@@ -448,7 +448,11 @@ void KeyMappingNewMouseKeyDialog::axis(const AxisInput &axis) {
}
AnalogSetupScreen::AnalogSetupScreen(const Path &gamePath) : UIDialogScreenWithGameBackground(gamePath) {
mapper_.SetCallbacks([](int vkey) {}, [](int vkey) {}, [&](int stick, float x, float y) {
mapper_.SetCallbacks(
[](int vkey) {},
[](int vkey) {},
[&](int button, bool down) {},
[&](int stick, float x, float y) {
analogX_[stick] = x;
analogY_[stick] = y;
});