mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix: allow disabling gl and vulkan features with an envvar and disable it by default on appimage/portable
the previous approach didn't work with runtime symbol lookup errors Signed-off-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
This commit is contained in:
parent
348907f7d1
commit
e524fa5b6b
4 changed files with 19 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include <QCoreApplication>
|
||||
#include <QOffscreenSurface>
|
||||
#include <QOpenGLFunctions>
|
||||
#include <QProcessEnvironment>
|
||||
|
||||
#ifndef Q_OS_MACOS
|
||||
#include <QVulkanInstance>
|
||||
|
|
@ -30,6 +31,9 @@
|
|||
namespace {
|
||||
bool vulkanInfo(QStringList& out)
|
||||
{
|
||||
if (!QProcessEnvironment::systemEnvironment().value(QStringLiteral("LAUNCHER_DISABLE_GLVULKAN")).isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
#ifndef Q_OS_MACOS
|
||||
QVulkanInstance inst;
|
||||
if (!inst.create()) {
|
||||
|
|
@ -53,6 +57,9 @@ bool vulkanInfo(QStringList& out)
|
|||
|
||||
bool openGlInfo(QStringList& out)
|
||||
{
|
||||
if (!QProcessEnvironment::systemEnvironment().value(QStringLiteral("LAUNCHER_DISABLE_GLVULKAN")).isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
QOpenGLContext ctx;
|
||||
if (!ctx.create()) {
|
||||
qWarning() << "OpenGL context creation failed";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue