Commit be16cce6 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Fix toggleTeletext in 2.2 builds

parent 8c333506
......@@ -1272,11 +1272,15 @@ STDMETHODIMP VLCVideo::toggleFullscreen()
STDMETHODIMP VLCVideo::toggleTeletext()
{
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
if( _plug->get_player().get_mp().teletext() == -1 )
_plug->get_player().get_mp().setTeletext( 100 );
else
_plug->get_player().get_mp().setTeletext( -1 );
return S_OK;
#else
_plug->get_player().get_mp().toggleTeletext();
#endif
}
STDMETHODIMP VLCVideo::get_marquee(IVLCMarquee** obj)
......
......@@ -1545,10 +1545,14 @@ LibvlcVideoNPObject::invoke(int index, const NPVariant *,
{
if( argCount == 0 )
{
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
if ( p_plugin->getMD().teletext() == -1 )
p_plugin->getMD().setTeletext( 100 );
else
p_plugin->getMD().setTeletext( -1 );
#else
p_plugin->getMD().toggleTeletext();
#endif
return INVOKERESULT_NO_ERROR;
}
return INVOKERESULT_NO_SUCH_METHOD;
......
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