[vlc-commits] qt: workaround "adjust" filter not working on WIN32

Thomas Guillem git at videolan.org
Tue Mar 20 14:50:32 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar 20 14:43:25 2018 +0100| [b4ab3bc61fb37ad2325f5570b0a36f659438fc3a] | committer: Thomas Guillem

qt: workaround "adjust" filter not working on WIN32

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b4ab3bc61fb37ad2325f5570b0a36f659438fc3a
---

 modules/gui/qt/components/extended_panels.cpp | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/modules/gui/qt/components/extended_panels.cpp b/modules/gui/qt/components/extended_panels.cpp
index e512a40a40..46f4fab84a 100644
--- a/modules/gui/qt/components/extended_panels.cpp
+++ b/modules/gui/qt/components/extended_panels.cpp
@@ -303,6 +303,23 @@ static QString ChangeFiltersString( struct intf_thread_t *p_intf, const char *ps
     else if (!b_add)
         list.removeAll( psz_name );
 
+#ifdef _WIN32
+    /* VLC 3.x HACK: "adjust" d3d* filters can't work with other SW filters.
+     * There is not way to fix it until VLC 4.0. As a workaround, force the
+     * adjust filter to be added at the end of the list. Therefore the SW
+     * "adjust" filter will be used since the previous filter will be SW. */
+    if( b_add && strcmp( psz_filter_type, "video-filter" ) == 0
+     && strcmp( psz_name, "adjust" ) != 0 )
+    {
+        QList<QString>::iterator it = std::find(list.begin(), list.end(), "adjust");
+        if( it != list.end() )
+        {
+            list.erase(it);
+            list << "adjust";
+        }
+    }
+#endif
+
     free( psz_chain );
 
     return list.join( ":" );



More information about the vlc-commits mailing list