Commit ce8f4474 authored by Daniel Amm's avatar Daniel Amm Committed by Hugo Beauzée-Luyssen

Fix toggleTeletext in 3.0 builds

Since commit 76c74ca0 in vlc.git, 0 is used to disable teletext.
Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent af6aa60c
...@@ -1273,10 +1273,10 @@ STDMETHODIMP VLCVideo::toggleFullscreen() ...@@ -1273,10 +1273,10 @@ STDMETHODIMP VLCVideo::toggleFullscreen()
STDMETHODIMP VLCVideo::toggleTeletext() STDMETHODIMP VLCVideo::toggleTeletext()
{ {
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0) #if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
if( _plug->get_player().get_mp().teletext() == -1 ) if( _plug->get_player().get_mp().teletext() == 0 )
_plug->get_player().get_mp().setTeletext( 100 ); _plug->get_player().get_mp().setTeletext( 100 );
else else
_plug->get_player().get_mp().setTeletext( -1 ); _plug->get_player().get_mp().setTeletext( 0 );
return S_OK; return S_OK;
#else #else
_plug->get_player().get_mp().toggleTeletext(); _plug->get_player().get_mp().toggleTeletext();
......
...@@ -1546,10 +1546,10 @@ LibvlcVideoNPObject::invoke(int index, const NPVariant *, ...@@ -1546,10 +1546,10 @@ LibvlcVideoNPObject::invoke(int index, const NPVariant *,
if( argCount == 0 ) if( argCount == 0 )
{ {
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0) #if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
if ( p_plugin->getMD().teletext() == -1 ) if ( p_plugin->getMD().teletext() == 0 )
p_plugin->getMD().setTeletext( 100 ); p_plugin->getMD().setTeletext( 100 );
else else
p_plugin->getMD().setTeletext( -1 ); p_plugin->getMD().setTeletext( 0 );
#else #else
p_plugin->getMD().toggleTeletext(); p_plugin->getMD().toggleTeletext();
#endif #endif
......
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