From 20767260caa6324fbc3b241747c49f8ae4f21af3 Mon Sep 17 00:00:00 2001 From: deeebug <77402236+deeebug@users.noreply.github.com> Date: Tue, 1 Aug 2023 11:47:15 +0545 Subject: [PATCH] Rectify missing button label type check --- www/src/Components/KeyboardMapper.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/src/Components/KeyboardMapper.jsx b/www/src/Components/KeyboardMapper.jsx index aa971e231..b9019a3f6 100644 --- a/www/src/Components/KeyboardMapper.jsx +++ b/www/src/Components/KeyboardMapper.jsx @@ -21,10 +21,10 @@ const KeyboardMapper = ({ buttonLabels, handleKeyChange, validated, getKeyMappin
{Object.keys(BUTTONS[buttonLabelType])?.filter(p => p !== 'label' && p !== 'value').map((button, i) => { let label = BUTTONS[buttonLabelType][button]; - if (button === "S1" && swapTpShareLabels) { + if (button === "S1" && swapTpShareLabels && buttonLabelType === "ps4") { label = BUTTONS[buttonLabelType]["A2"]; } - if (button === "A2" && swapTpShareLabels) { + if (button === "A2" && swapTpShareLabels && buttonLabelType === "ps4") { label = BUTTONS[buttonLabelType]["S1"]; } const keyMapping = getKeyMappingForButton(button);