mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-02-16 02:30:52 +00:00
This dramatically improves performance for lower resolution streams on slow GPUs when using the GL and Vulkan renderers.
27 lines
631 B
C++
27 lines
631 B
C++
#pragma once
|
|
|
|
#include <QString>
|
|
|
|
#define THROW_BAD_ALLOC_IF_NULL(x) \
|
|
if ((x) == nullptr) throw std::bad_alloc()
|
|
|
|
namespace WMUtils {
|
|
bool isRunningX11();
|
|
bool isRunningNvidiaProprietaryDriverX11();
|
|
bool supportsDesktopGLWithEGL();
|
|
bool isRunningWayland();
|
|
bool isRunningWindowManager();
|
|
bool isRunningDesktopEnvironment();
|
|
QString getDrmCardOverride();
|
|
bool isGpuSlow();
|
|
}
|
|
|
|
namespace Utils {
|
|
template <typename T>
|
|
bool getEnvironmentVariableOverride(const char* name, T* value) {
|
|
bool ok;
|
|
*value = (T)qEnvironmentVariableIntValue(name, &ok);
|
|
return ok;
|
|
}
|
|
}
|