mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-25 16:06:31 +00:00
Try to avoid being forced onto unsupported wayland path. Refs #3124
This commit is contained in:
@@ -198,6 +198,20 @@ int main(int argc, char *argv[])
|
||||
if(IsRunningAsAdmin())
|
||||
qInfo() << "Running as administrator";
|
||||
|
||||
#if defined(RENDERDOC_PLATFORM_LINUX) && !defined(RENDERDOC_WINDOWING_WAYLAND)
|
||||
bool envChanged = false;
|
||||
{
|
||||
const char *qpa_plat = getenv("QT_QPA_PLATFORM");
|
||||
// if not set or empty, force non-wayland to help go through backwards compatibility path on wayland.
|
||||
char env_set[] = "QT_QPA_PLATFORM=xcb\0";
|
||||
if(!qpa_plat || qpa_plat[0] == 0)
|
||||
{
|
||||
putenv(env_set);
|
||||
envChanged = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
|
||||
@@ -569,6 +583,11 @@ int main(int argc, char *argv[])
|
||||
RENDERDOC_InitialiseReplay(env, coreargs);
|
||||
}
|
||||
|
||||
#if defined(RENDERDOC_PLATFORM_LINUX) && !defined(RENDERDOC_WINDOWING_WAYLAND)
|
||||
if(envChanged)
|
||||
unsetenv("QT_QPA_PLATFORM");
|
||||
#endif
|
||||
|
||||
if(!crashReportPath.isEmpty())
|
||||
{
|
||||
QVariantMap json;
|
||||
|
||||
Reference in New Issue
Block a user