Hacky fix for black borders round image view.
authorCarl Hetherington <cth@carlh.net>
Wed, 1 Jan 2014 19:39:11 +0000 (19:39 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 1 Jan 2014 19:39:11 +0000 (19:39 +0000)
src/wx/film_viewer.cc

index e9c668a7177c27d5d16b1718fe526e6ea4f16654..a4a293918df44cedec1b4c5ddc0a4f3ab5587d07 100644 (file)
@@ -259,6 +259,13 @@ FilmViewer::calculate_sizes ()
        _out_size.width = max (64, _out_size.width);
        _out_size.height = max (64, _out_size.height);
 
+       /* The player will round its image down to the nearest 4 pixels
+          to speed up its scale, so do similar here to avoid black borders
+          around things.  This is a bit of a hack.
+       */
+       _out_size.width &= ~3;
+       _out_size.height &= ~3;
+
        _player->set_video_container_size (_out_size);
 }