mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Added love.system.vibrate(time), which causes the phone to vibrate on Android. love.system.getOS() now returns "Android" on Android. Implemented love.system.openURL.
This commit is contained in:
@@ -86,6 +86,13 @@ int w_openURL(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int w_vibrate(lua_State *L)
|
||||
{
|
||||
double seconds = luaL_checknumber(L, 1);
|
||||
instance()->vibrate(seconds);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const luaL_Reg functions[] =
|
||||
{
|
||||
{ "getOS", w_getOS },
|
||||
@@ -94,6 +101,7 @@ static const luaL_Reg functions[] =
|
||||
{ "getClipboardText", w_getClipboardText },
|
||||
{ "getPowerInfo", w_getPowerInfo },
|
||||
{ "openURL", w_openURL },
|
||||
{ "vibrate", w_vibrate },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user