mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 04:21:15 +00:00
Add check for haptic
This commit is contained in:
parent
98e5d84d48
commit
fdd494dfbb
@ -809,7 +809,8 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
|
|||||||
else if (event->user.type == g_legoSdlEvents.m_gameEvent) {
|
else if (event->user.type == g_legoSdlEvents.m_gameEvent) {
|
||||||
auto rumble = [](float p_strength, float p_lowFrequencyRumble, float p_highFrequencyRumble, MxU32 p_milliseconds
|
auto rumble = [](float p_strength, float p_lowFrequencyRumble, float p_highFrequencyRumble, MxU32 p_milliseconds
|
||||||
) {
|
) {
|
||||||
if (!InputManager()
|
if (g_isle->GetHaptic() &&
|
||||||
|
!InputManager()
|
||||||
->HandleRumbleEvent(p_strength, p_lowFrequencyRumble, p_highFrequencyRumble, p_milliseconds)) {
|
->HandleRumbleEvent(p_strength, p_lowFrequencyRumble, p_highFrequencyRumble, p_milliseconds)) {
|
||||||
// Platform-specific handling
|
// Platform-specific handling
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user