Add environment variable override helper function

This allows FORCE_QT_GLES and SEPARATE_TEST_DECODER to override both true and false.
This commit is contained in:
Cameron Gutman 2025-12-27 15:33:13 -06:00
commit 41ad3c0938
9 changed files with 68 additions and 60 deletions

View file

@ -14,3 +14,12 @@ namespace WMUtils {
bool isRunningDesktopEnvironment();
QString getDrmCardOverride();
}
namespace Utils {
template <typename T>
bool getEnvironmentVariableOverride(const char* name, T* value) {
bool ok;
*value = (T)qEnvironmentVariableIntValue(name, &ok);
return ok;
}
}