1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00

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:
Bjorn 2020-11-20 08:56:57 -07:00 committed by GitHub
commit 1b4a97035a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,9 +142,8 @@ static int l_lovrHeadsetInit(lua_State* L) {
lua_pop(L, 1); lua_pop(L, 1);
} }
if (lovrHeadsetInit(drivers, driverCount, supersample, offset, msaa)) { luax_atexit(L, lovrHeadsetDestroy); // Always make sure the headset module gets cleaned up
luax_atexit(L, lovrHeadsetDestroy); lovrHeadsetInit(drivers, driverCount, supersample, offset, msaa);
}
lua_pop(L, 2); lua_pop(L, 2);
return 0; return 0;