]> git.sesse.net Git - vlc/commitdiff
Qt: do not allow activation of DxVA2 in SPrefs on XP
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 7 Sep 2010 10:59:02 +0000 (12:59 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 7 Sep 2010 11:16:34 +0000 (13:16 +0200)
XP is too old. Deal with it. Will ease support
Close #3727

modules/gui/qt4/components/simple_preferences.cpp

index 2395a1486b1dd4e5ebfdeec53485fb11d4566caf..5c2490d7aa6460ff5b660e81d080d8747057b87b 100644 (file)
@@ -446,12 +446,17 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
                 ui.live555TransportHTTPRadio->hide();
                 ui.live555TransportLabel->hide();
             }
+            CONFIG_BOOL( "ffmpeg-hw", hwAccelBox );
 #ifdef WIN32
             CONFIG_BOOL( "prefer-system-codecs", systemCodecBox );
+            HINSTANCE hdxva2_dll = LoadLibrary(TEXT("DXVA2.DLL") );
+            if( !hdxva2_dll )
+                ui.hwAccelBox->setEnabled( false );
+            else
+                FreeLibrary( hdxva2_dll );
 #else
             ui.systemCodecBox->hide();
 #endif
-            CONFIG_BOOL( "ffmpeg-hw", hwAccelBox );
             optionWidgets.append( ui.DVDDevice );
             optionWidgets.append( ui.cachingCombo );
             CONFIG_GENERIC( "ffmpeg-skiploopfilter", IntegerList, ui.filterLabel, loopFilterBox );