Fix lovr.headset.getDriver when passed a Device;

This commit is contained in:
bjorn 2020-08-04 12:19:22 -06:00
parent 5116ae75f2
commit f1b447662d
1 changed files with 2 additions and 1 deletions

View File

@ -119,8 +119,9 @@ static int l_lovrHeadsetGetDriver(lua_State* L) {
return 1;
} else {
Device device = luax_optdevice(L, 1);
float position[4], orientation[4];
FOREACH_TRACKING_DRIVER(driver) {
if (driver->getPose(device, NULL, NULL)) {
if (driver->getPose(device, position, orientation)) {
luax_pushenum(L, HeadsetDrivers, driver->driverType);
return 1;
}