mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-24 13:41:14 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user