mirror of https://github.com/bjornbytes/lovr.git
Return nil if device doesn't have that button
Functions `lh.isDown()` and `isTouched()` should return nil if device doesn't have the queried button.
This commit is contained in:
parent
2e82dfce92
commit
2e5c529faf
|
@ -479,8 +479,7 @@ static int l_lovrHeadsetIsDown(lua_State* L) {
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
lua_pushboolean(L, false);
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_lovrHeadsetWasPressed(lua_State* L) {
|
||||
|
@ -521,8 +520,7 @@ static int l_lovrHeadsetIsTouched(lua_State* L) {
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
lua_pushboolean(L, 1);
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const int axisCounts[MAX_AXES] = {
|
||||
|
|
Loading…
Reference in New Issue