mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-03-05 07:07:18 +00:00
Ensure SDL also uses X11 if Qt is using X11
This commit is contained in:
parent
2416618b34
commit
cdc3352318
1 changed files with 1 additions and 0 deletions
|
@ -466,6 +466,7 @@ int main(int argc, char *argv[])
|
||||||
if (WMUtils::isRunningWayland() && QGuiApplication::platformName() == "xcb") {
|
if (WMUtils::isRunningWayland() && QGuiApplication::platformName() == "xcb") {
|
||||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"Detected XWayland. This will probably break hardware decoding! Try running with QT_QPA_PLATFORM=wayland or switch to X11.");
|
"Detected XWayland. This will probably break hardware decoding! Try running with QT_QPA_PLATFORM=wayland or switch to X11.");
|
||||||
|
qputenv("SDL_VIDEODRIVER", "x11");
|
||||||
}
|
}
|
||||||
else if (QGuiApplication::platformName().startsWith("wayland")) {
|
else if (QGuiApplication::platformName().startsWith("wayland")) {
|
||||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Detected Wayland");
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Detected Wayland");
|
||||||
|
|
Loading…
Add table
Reference in a new issue