[glass] Configure delay loading for windows camera server support (#3803)

We don't currently support cameras in glass, but it's something we want to do in the future. However, when we do this, glass will completely stop working on N builds of windows, and it would fail to load at all with no messages. To solve this, we can delayload the media foundation dlls that are missing. The executable will then launch even without the dlls present, and we can attempt to load them at runtime and dynamically disable camera support.

When we get around to implementing it, we can just call HasCameraSupport, and dynamically hide all camera related code behind that flag.
This commit is contained in:
Thad House
2021-12-19 14:19:24 -08:00
committed by GitHub
parent c9e6a96a61
commit c02577bb51
3 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#pragma once
namespace glass {
bool HasCameraSupport();
} // namespace glass