summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2025-03-10 15:03:54 -0400
committerGitHub <noreply@github.com>2025-03-10 15:03:54 -0400
commit3f73a39dbde20bf3e2f9dd6550d2f71e4b51f344 (patch)
tree3e435c4772f4144c61fb64c03d4a09a1bce10883 /Source/Core
parent9f43f59c9bb8bef14304c31a74ead337216551e8 (diff)
parenta3b06b0572d7a16d8ede9c849e9f549a283123df (diff)
Merge pull request #13286 from JoshuaVandaele/xcb
Enforce XCB within code
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinQt/Main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/Main.cpp b/Source/Core/DolphinQt/Main.cpp
index 88400aa1a6..8baa6d7f08 100644
--- a/Source/Core/DolphinQt/Main.cpp
+++ b/Source/Core/DolphinQt/Main.cpp
@@ -148,6 +148,14 @@ int main(int argc, char* argv[])
#if (QT_VERSION >= QT_VERSION_CHECK(6, 3, 0))
setenv("QT_XCB_NO_XI2", "1", true);
#endif
+ // Dolphin currently doesn't work on Wayland (Only the UI does, games do not launch.) This makes
+ // XCB the default and forces it on if the platform is specified to be wayland, to prevent this
+ // from happening.
+ // For more information: https://bugs.dolphin-emu.org/issues/11807
+ const char* current_qt_platform = getenv("QT_QPA_PLATFORM");
+ const bool replace_qt_platform =
+ (current_qt_platform && strcasecmp(current_qt_platform, "wayland") == 0);
+ setenv("QT_QPA_PLATFORM", "xcb", replace_qt_platform);
#endif
QCoreApplication::setOrganizationName(QStringLiteral("Dolphin Emulator"));