Browse Source

Qt: fix a wrong logic for the check of the fullscreen screen number

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
pull/62/head
Adrien Maglo 8 years ago
committed by Jean-Baptiste Kempf
parent
commit
cd6598579b
  1. 2
      modules/gui/qt/components/controller.cpp
  2. 2
      modules/gui/qt/main_interface.cpp

2
modules/gui/qt/components/controller.cpp

@ -986,7 +986,7 @@ void FullscreenControllerWidget::toggleFullwidth()
int FullscreenControllerWidget::targetScreen()
{
if( i_screennumber < 0 || i_screennumber > QApplication::desktop()->screenCount() )
if( i_screennumber < 0 || i_screennumber >= QApplication::desktop()->screenCount() )
return QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
return i_screennumber;
}

2
modules/gui/qt/main_interface.cpp

@ -860,7 +860,7 @@ void MainInterface::setVideoFullScreen( bool fs )
* than current number of screens, take screennumber where current interface
* is
*/
if( numscreen == -1 || numscreen > QApplication::desktop()->screenCount() )
if( numscreen < 0 || numscreen >= QApplication::desktop()->screenCount() )
numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
QRect screenres = QApplication::desktop()->screenGeometry( numscreen );

Loading…
Cancel
Save