mirror of https://github.com/bjornbytes/lovr.git
Merge pull request #319 from alloverse/fix/lodr-headset-nil
on lodr restart, make sure lovr.headset is nil'd if none is available
This commit is contained in:
commit
1b4a97035a
|
@ -142,9 +142,8 @@ static int l_lovrHeadsetInit(lua_State* L) {
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
if (lovrHeadsetInit(drivers, driverCount, supersample, offset, msaa)) {
|
||||
luax_atexit(L, lovrHeadsetDestroy);
|
||||
}
|
||||
luax_atexit(L, lovrHeadsetDestroy); // Always make sure the headset module gets cleaned up
|
||||
lovrHeadsetInit(drivers, driverCount, supersample, offset, msaa);
|
||||
|
||||
lua_pop(L, 2);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue