mirror of https://github.com/bjornbytes/lovr.git
Fix lovr.headset.getDriver when passed a Device;
This commit is contained in:
parent
5116ae75f2
commit
f1b447662d
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue