requesthandler: Use existence of virtualcam output to test availability

An upstream commit removed the `vcamEnabled` private data field from
being set, so we need to use a new method now.
This commit is contained in:
tt2468 2024-07-16 11:43:18 -07:00
parent f8bc7c4f59
commit 65396e1db7

View File

@ -21,11 +21,8 @@ with this program. If not, see <https://www.gnu.org/licenses/>
static bool VirtualCamAvailable() static bool VirtualCamAvailable()
{ {
OBSDataAutoRelease privateData = obs_get_private_data(); OBSOutputAutoRelease output = obs_frontend_get_virtualcam_output();
if (!privateData) return output != nullptr;
return false;
return obs_data_get_bool(privateData, "vcamEnabled");
} }
static bool ReplayBufferAvailable() static bool ReplayBufferAvailable()