[vlc-commits] [Git][videolan/vlc][master] qt: add platform checks to compositor_dcomp and compositor_win7
François Cartegnie (@fcartegnie)
gitlab at videolan.org
Sat Dec 23 20:48:12 UTC 2023
François Cartegnie pushed to branch master at VideoLAN / VLC
Commits:
9f076c3b by Fatih Uzunoglu at 2023-12-23T20:29:10+00:00
qt: add platform checks to compositor_dcomp and compositor_win7
- - - - -
2 changed files:
- modules/gui/qt/maininterface/compositor_dcomp.cpp
- modules/gui/qt/maininterface/compositor_win7.cpp
Changes:
=====================================
modules/gui/qt/maininterface/compositor_dcomp.cpp
=====================================
@@ -198,6 +198,12 @@ bool CompositorDirectComposition::preInit(qt_intf_t * p_intf)
bool CompositorDirectComposition::init()
{
+ {
+ const QString& platformName = qApp->platformName();
+ if (!(platformName == QLatin1String("windows") || platformName == QLatin1String("direct2d")))
+ return false;
+ }
+
//import DirectComposition API (WIN8+)
m_dcomp_dll = LoadLibrary(TEXT("DCOMP.dll"));
if (!m_dcomp_dll)
=====================================
modules/gui/qt/maininterface/compositor_win7.cpp
=====================================
@@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "compositor_win7.hpp"
+
+#include <QApplication>
+#include <QLibrary>
+
#include "mainctx_win32.hpp"
#include "mainui.hpp"
@@ -25,7 +29,6 @@
#include <d3d11.h>
#include <dwmapi.h>
-#include <QLibrary>
using namespace vlc;
@@ -97,6 +100,12 @@ bool CompositorWin7::preInit(qt_intf_t *p_intf)
bool CompositorWin7::init()
{
+ {
+ const QString& platformName = qApp->platformName();
+ if (!(platformName == QLatin1String("windows") || platformName == QLatin1String("direct2d")))
+ return false;
+ }
+
return true;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9f076c3b237d40a61f2f09416bf763355b72695f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9f076c3b237d40a61f2f09416bf763355b72695f
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list