|
@@ -10,8 +10,10 @@
|
|
#include <QWindow>
|
|
#include <QWindow>
|
|
#ifdef ENABLE_WAYLAND
|
|
#ifdef ENABLE_WAYLAND
|
|
#include <QApplication>
|
|
#include <QApplication>
|
|
|
|
+#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
|
|
#include <qpa/qplatformnativeinterface.h>
|
|
#include <qpa/qplatformnativeinterface.h>
|
|
#endif
|
|
#endif
|
|
|
|
+#endif
|
|
|
|
|
|
#ifdef _WIN32
|
|
#ifdef _WIN32
|
|
#define WIN32_LEAN_AND_MEAN
|
|
#define WIN32_LEAN_AND_MEAN
|
|
@@ -50,8 +52,12 @@ static bool QTToGSWindow(QWindow *window, gs_window &gswindow)
|
|
break;
|
|
break;
|
|
#ifdef ENABLE_WAYLAND
|
|
#ifdef ENABLE_WAYLAND
|
|
case OBS_NIX_PLATFORM_WAYLAND: {
|
|
case OBS_NIX_PLATFORM_WAYLAND: {
|
|
|
|
+#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
|
|
QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
|
|
QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
|
|
gswindow.display = native->nativeResourceForWindow("surface", window);
|
|
gswindow.display = native->nativeResourceForWindow("surface", window);
|
|
|
|
+#else
|
|
|
|
+ gswindow.display = (void *)window->winId();
|
|
|
|
+#endif
|
|
success = gswindow.display != nullptr;
|
|
success = gswindow.display != nullptr;
|
|
break;
|
|
break;
|
|
}
|
|
}
|