mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-11 02:21:15 +00:00
(Web port) Pass vibration milliseconds into device haptics
This commit is contained in:
parent
deca5e5a2e
commit
ad2832b096
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user