From 243e686ea445573adb873587d0ec940bf34f5cd4 Mon Sep 17 00:00:00 2001 From: bjorn Date: Tue, 22 Mar 2022 19:45:44 -0700 Subject: [PATCH] rm lovr.headset.getDisplayMask; --- src/api/l_headset.c | 25 ------------------------- src/modules/headset/headset.h | 1 - src/modules/headset/headset_desktop.c | 6 ------ src/modules/headset/headset_openxr.c | 6 ------ src/modules/headset/headset_webxr.c | 2 -- src/resources/webxr.js | 4 ---- 6 files changed, 44 deletions(-) diff --git a/src/api/l_headset.c b/src/api/l_headset.c index fa1d861b..63837275 100644 --- a/src/api/l_headset.c +++ b/src/api/l_headset.c @@ -155,30 +155,6 @@ static int l_lovrHeadsetGetDisplayFrequency(lua_State* L) { return 1; } -static int l_lovrHeadsetGetDisplayMask(lua_State* L) { - uint32_t count; - const float* points = lovrHeadsetDisplayDriver->getDisplayMask(&count); - - if (!points) { - lua_pushnil(L); - return 1; - } - - lua_createtable(L, count, 0); - for (uint32_t i = 0; i < count; i += 2) { - lua_createtable(L, 2, 0); - - lua_pushnumber(L, points[i + 0]); - lua_rawseti(L, -2, 1); - lua_pushnumber(L, points[i + 1]); - lua_rawseti(L, -2, 2); - - lua_rawseti(L, -2, i / 2 + 1); - } - - return 1; -} - static int l_lovrHeadsetGetViewCount(lua_State* L) { lua_pushinteger(L, lovrHeadsetDisplayDriver->getViewCount()); return 1; @@ -651,7 +627,6 @@ static const luaL_Reg lovrHeadset[] = { { "getDisplayHeight", l_lovrHeadsetGetDisplayHeight }, { "getDisplayDimensions", l_lovrHeadsetGetDisplayDimensions }, { "getDisplayFrequency", l_lovrHeadsetGetDisplayFrequency }, - { "getDisplayMask", l_lovrHeadsetGetDisplayMask }, { "getViewCount", l_lovrHeadsetGetViewCount }, { "getViewPose", l_lovrHeadsetGetViewPose }, { "getViewAngles", l_lovrHeadsetGetViewAngles }, diff --git a/src/modules/headset/headset.h b/src/modules/headset/headset.h index 220a5f6f..be50ce19 100644 --- a/src/modules/headset/headset.h +++ b/src/modules/headset/headset.h @@ -115,7 +115,6 @@ typedef struct HeadsetInterface { HeadsetOrigin (*getOriginType)(void); void (*getDisplayDimensions)(uint32_t* width, uint32_t* height); float (*getDisplayFrequency)(void); - const float* (*getDisplayMask)(uint32_t* count); double (*getDisplayTime)(void); double (*getDeltaTime)(void); uint32_t (*getViewCount)(void); diff --git a/src/modules/headset/headset_desktop.c b/src/modules/headset/headset_desktop.c index 4b83604b..ab93bc57 100644 --- a/src/modules/headset/headset_desktop.c +++ b/src/modules/headset/headset_desktop.c @@ -87,11 +87,6 @@ static void desktop_getDisplayDimensions(uint32_t* width, uint32_t* height) { *height = (uint32_t) h; } -static const float* desktop_getDisplayMask(uint32_t* count) { - *count = 0; - return NULL; -} - static uint32_t desktop_getViewCount(void) { return 2; } @@ -316,7 +311,6 @@ HeadsetInterface lovrHeadsetDesktopDriver = { .getDisplayTime = desktop_getDisplayTime, .getDeltaTime = desktop_getDeltaTime, .getDisplayDimensions = desktop_getDisplayDimensions, - .getDisplayMask = desktop_getDisplayMask, .getViewCount = desktop_getViewCount, .getViewPose = desktop_getViewPose, .getViewAngles = desktop_getViewAngles, diff --git a/src/modules/headset/headset_openxr.c b/src/modules/headset/headset_openxr.c index 60241f30..8990f4c3 100644 --- a/src/modules/headset/headset_openxr.c +++ b/src/modules/headset/headset_openxr.c @@ -1013,11 +1013,6 @@ static float openxr_getDisplayFrequency(void) { return frequency; } -static const float* openxr_getDisplayMask(uint32_t* count) { - *count = 0; - return NULL; -} - static double openxr_getDisplayTime(void) { return state.frameState.predictedDisplayTime / 1e9; } @@ -1799,7 +1794,6 @@ HeadsetInterface lovrHeadsetOpenXRDriver = { .getOriginType = openxr_getOriginType, .getDisplayDimensions = openxr_getDisplayDimensions, .getDisplayFrequency = openxr_getDisplayFrequency, - .getDisplayMask = openxr_getDisplayMask, .getDisplayTime = openxr_getDisplayTime, .getDeltaTime = openxr_getDeltaTime, .getViewCount = openxr_getViewCount, diff --git a/src/modules/headset/headset_webxr.c b/src/modules/headset/headset_webxr.c index 92221581..fd50b363 100644 --- a/src/modules/headset/headset_webxr.c +++ b/src/modules/headset/headset_webxr.c @@ -8,7 +8,6 @@ extern HeadsetOrigin webxr_getOriginType(void); extern double webxr_getDisplayTime(void); extern double webxr_getDeltaTime(void); extern void webxr_getDisplayDimensions(uint32_t* width, uint32_t* height); -extern const float* webxr_getDisplayMask(uint32_t* count); extern uint32_t webxr_getViewCount(void); extern bool webxr_getViewPose(uint32_t view, float* position, float* orientation); extern bool webxr_getViewAngles(uint32_t view, float* left, float* right, float* up, float* down); @@ -78,7 +77,6 @@ HeadsetInterface lovrHeadsetWebXRDriver = { .getOriginType = webxr_getOriginType, .getDisplayTime = webxr_getDisplayTime, .getDisplayDimensions = webxr_getDisplayDimensions, - .getDisplayMask = webxr_getDisplayMask, .getViewCount = webxr_getViewCount, .getViewPose = webxr_getViewPose, .getViewAngles = webxr_getViewAngles, diff --git a/src/resources/webxr.js b/src/resources/webxr.js index ed843e05..bc2cf532 100644 --- a/src/resources/webxr.js +++ b/src/resources/webxr.js @@ -199,10 +199,6 @@ var webxr = { return 0.0; }, - webxr_getDisplayMask: function() { - return 0; /* NULL */ - }, - webxr_getViewCount: function() { return state.viewer ? state.viewer.views.length : 0; },