mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-09-10 12:02:53 +02:00
Stop running rumble effects if duration is 0
This commit is contained in:
parent
e467ac0f27
commit
5b8d9e0100
3 changed files with 8 additions and 8 deletions
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
|
@ -1,10 +1,6 @@
|
|||
embedded_assets = []
|
||||
|
||||
if get_option('mk') == true
|
||||
embedded_assets += 'icon_mk.png'
|
||||
else
|
||||
embedded_assets += 'icon.png'
|
||||
endif
|
||||
embedded_assets = [
|
||||
'icon.png'
|
||||
]
|
||||
|
||||
if get_option('cjk_fallback_font') == true
|
||||
embedded_assets += 'wqymicrohei.ttf'
|
||||
|
|
|
@ -503,7 +503,11 @@ void EventThread::process(RGSSThreadData &rtData)
|
|||
hapticEffect.constant.fade_level = 0;
|
||||
hapticEffectId = SDL_HapticNewEffect(hapt, &hapticEffect);
|
||||
}
|
||||
|
||||
if (hapticEffect.constant.length == 0 && SDL_HapticGetEffectStatus(hapt, hapticEffectId) > 0)
|
||||
{
|
||||
SDL_HapticStopEffect(hapt, hapticEffectId);
|
||||
break;
|
||||
}
|
||||
SDL_HapticUpdateEffect(hapt, hapticEffectId, &hapticEffect);
|
||||
|
||||
SDL_HapticRunEffect(hapt, hapticEffectId, 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue