mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-06 14:23:34 +00:00
WebVR fixes;
This commit is contained in:
parent
4399a2feb8
commit
f81209fd86
|
@ -42,6 +42,8 @@ int l_lovrHeadsetInit(lua_State* L) {
|
||||||
|
|
||||||
lovrHeadsetInit();
|
lovrHeadsetInit();
|
||||||
|
|
||||||
|
headsetRenderData.ref = LUA_NOREF;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,12 +123,7 @@ int l_lovrHeadsetGetBoundsDimensions(lua_State* L) {
|
||||||
|
|
||||||
int l_lovrHeadsetGetBoundsGeometry(lua_State* L) {
|
int l_lovrHeadsetGetBoundsGeometry(lua_State* L) {
|
||||||
float geometry[12];
|
float geometry[12];
|
||||||
|
lovrHeadsetGetBoundsGeometry(geometry);
|
||||||
if (lovrHeadsetGetBoundsGeometry(geometry)) {
|
|
||||||
lua_pushnil(L);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
|
@ -216,7 +213,7 @@ int l_lovrHeadsetRenderTo(lua_State* L) {
|
||||||
lua_settop(L, 1);
|
lua_settop(L, 1);
|
||||||
luaL_checktype(L, 1, LUA_TFUNCTION);
|
luaL_checktype(L, 1, LUA_TFUNCTION);
|
||||||
|
|
||||||
if (headsetRenderData.ref) {
|
if (headsetRenderData.ref != LUA_NOREF) {
|
||||||
luaL_unref(L, LUA_REGISTRYINDEX, headsetRenderData.ref);
|
luaL_unref(L, LUA_REGISTRYINDEX, headsetRenderData.ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue