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

This commit is contained in:
Henrik Rydgård committed 2023-03-28 00:23:18 +02:00
1 parent 4739d6c37d
commit 534896d2ab
10 files changed
+27 -8

No files matched your search

+7
View File
@@ -178,6 +178,13 @@ EmuScreen::EmuScreen(const Path &filename)
controlMapper_.SetCallbacks(
std::bind(&EmuScreen::onVKeyDown, this, _1),
std::bind(&EmuScreen::onVKeyUp, this, _1),
[](int pspKey, bool down) {
if (down) {
__CtrlButtonDown(pspKey);
} else {
__CtrlButtonUp(pspKey);
}
},
&SetPSPAnalog);
// Make sure we don't leave it at powerdown after the last game.