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:
Martin Felis
2015-08-13 19:48:25 -03:00
parent 637a3a9d62
commit 2ab69094e1
6 changed files with 37 additions and 1 deletions
+8
View File
@@ -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 }
};