Commit 75266581 authored by Pierre Lamot's avatar Pierre Lamot Committed by Jean-Baptiste Kempf

qt: display directx rendering options only when vout is set to directx

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit e7d528fe)
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 90d36555
......@@ -362,6 +362,10 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONFIG_BOOL( "video-deco", windowDecorations );
CONFIG_GENERIC( "vout", StringList, ui.voutLabel, outputModule );
CONNECT( ui.outputModule, currentIndexChanged( int ),
this, updateVideoOptions( int ) );
optionWidgets["videoOutCoB"] = ui.outputModule;
optionWidgets["fullscreenScreenB"] = ui.fullscreenScreenBox;
ui.fullscreenScreenBox->addItem( qtr("Automatic"), -1 );
int i_screenCount = 0;
......@@ -384,6 +388,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONFIG_BOOL( "directx-overlay", overlay );
CONFIG_BOOL( "directx-hw-yuv", hwYUVBox );
CONNECT( ui.overlay, toggled( bool ), ui.hwYUVBox, setEnabled( bool ) );
optionWidgets["directxVideoB"] = ui.directXBox;
#else
ui.directXBox->setVisible( false );
#endif
......@@ -407,6 +412,8 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
snapshotsSequentialNumbering );
CONFIG_GENERIC( "snapshot-format", StringList, ui.arLabel,
snapshotsFormat );
updateVideoOptions( ui.outputModule->currentIndex() );
END_SPREFS_CAT;
/******************************
......@@ -932,6 +939,17 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
#undef CONFIG_BOOL
}
void SPrefsPanel::updateVideoOptions( int number )
{
QString value = qobject_cast<QComboBox *>(optionWidgets["videoOutCoB"])
->itemData( number ).toString();
#ifdef _WIN32
if( optionWidgets["directxVideoB"] ) {
optionWidgets["directxVideoB"]->setVisible( ( value == "directdraw" ) );
}
#endif
}
void SPrefsPanel::updateAudioOptions( int number)
{
......
......@@ -117,6 +117,7 @@ private:
/* Display only the options for the selected audio output */
private slots:
void lastfm_Changed( int );
void updateVideoOptions( int );
void updateAudioOptions( int );
void updateAudioVolume( int );
void langChanged( int );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment