Fixed love.keyboard.setKeyRepeat, fixed issues with Body:getWhatever, and made the save directory settable.

This commit is contained in:
rude
2009-10-29 22:34:54 +01:00
parent 0e671c34d5
commit 435fc43f68
9 changed files with 164 additions and 66 deletions
+6 -5
View File
@@ -46,13 +46,14 @@ namespace sdl
int w_setKeyRepeat(lua_State * L)
{
if(lua_gettop(L) == 0)
{
instance->setKeyRepeat(0, 0);
return 0;
if(lua_gettop(L) == 0)
{
// Disables key repeat.
instance->setKeyRepeat(0, 0);
return 0;
}
instance->setKeyRepeat(luaL_checkint(L, 1), luaL_checkint(L, 2));
instance->setKeyRepeat(luaL_optint(L, 1, Keyboard::DEFAULT), luaL_optint(L, 2, Keyboard::DEFAULT));
return 0;
}