(Web port) Pass vibration milliseconds into device haptics

This commit is contained in:
Christian Semmler 2025-07-15 17:18:54 -07:00
parent deca5e5a2e
commit ad2832b096
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C

View File

@ -39,12 +39,15 @@ void Emscripten_HandleRumbleEvent(float p_lowFrequencyRumble, float p_highFreque
);
}
},
[](LegoInputManager::SDL_TouchID_v p_id) {
MAIN_THREAD_EM_ASM({
if (navigator.vibrate) {
navigator.vibrate(700);
}
});
[p_milliseconds](LegoInputManager::SDL_TouchID_v p_id) {
MAIN_THREAD_EM_ASM(
{
if (navigator.vibrate) {
navigator.vibrate($0);
}
},
p_milliseconds
);
}
},
InputManager()->GetLastInputMethod()