We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dda8e45 commit 88ed9fcCopy full SHA for 88ed9fc
librtt/Rtt_LuaLibSystem.cpp
@@ -389,8 +389,21 @@ getTimer( lua_State *L )
389
static int
390
vibrate( lua_State *L )
391
{
392
- LuaContext::GetPlatform( L ).GetDevice().Vibrate();
393
- return 0;
+ const char* hapticType = NULL;
+ const char* hapticStyle = NULL;
394
+
395
+ if ( lua_type( L, 1 ) == LUA_TSTRING)
396
+ {
397
+ hapticType = lua_tostring(L, 1);
398
+ }
399
+ if(lua_type( L, 2 ) == LUA_TSTRING)
400
401
+ hapticStyle = lua_tostring(L, 2);
402
403
404
+ LuaContext::GetPlatform( L ).GetDevice().Vibrate(hapticType, hapticStyle);
405
406
+ return 0;
407
}
408
409
0 commit comments