Added love.graphics.getRendererInfo(infotype). Useful for creating more informative error reports and advanced debugging.

Returned string can be highly system-dependent, so don't rely on its output!

infotype can be "name", "version", "vendor", or "device"
This commit is contained in:
Alex Szpakowski
2013-05-05 16:47:42 -03:00
parent 08d6e658c1
commit 63404f7097
11 changed files with 112 additions and 32 deletions
+3 -5
View File
@@ -182,8 +182,7 @@ float Joystick::getAxis(int index, int axis)
int Joystick::getAxes(lua_State *L)
{
love::luax_assert_argc(L, 1, 1);
int index = (int)lua_tointeger(L, 1) - 1;
int index = luaL_checkint(L, 1) - 1;
if (!verifyJoystick(index))
return 0;
@@ -197,9 +196,8 @@ int Joystick::getAxes(lua_State *L)
int Joystick::getBall(lua_State *L)
{
love::luax_assert_argc(L, 2, 2);
int index = (int)lua_tointeger(L, 1) - 1;
int ball = (int)lua_tointeger(L, 2) - 1;
int index = luaL_checkint(L, 1) - 1;
int ball = luaL_checkint(L, 2) - 1;
if (!verifyJoystick(index))
return 0;