summaryrefslogtreecommitdiff
path: root/src/wx/film_viewer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-09-09 21:06:31 +0200
committerCarl Hetherington <cth@carlh.net>2021-09-27 13:41:46 +0200
commit7bebe412366e9156aa908d054d9fa210cc370f92 (patch)
treed318e2428c3d6f09eb3869b4c26fefc372054703 /src/wx/film_viewer.cc
parent6e3e984162ca7a181bc7c98d90c295e88e4e7f6c (diff)
Remove unnecessary _out_size; it looks like we can just use the image size.
Diffstat (limited to 'src/wx/film_viewer.cc')
-rw-r--r--src/wx/film_viewer.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index c7e154fa5..a3c015ab1 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -281,21 +281,22 @@ FilmViewer::calculate_sizes ()
auto const view_ratio = float(_video_view->get()->GetSize().x) / _video_view->get()->GetSize().y;
auto const film_ratio = container ? container->ratio () : 1.78;
+ dcp::Size out_size;
if (view_ratio < film_ratio) {
/* panel is less widscreen than the film; clamp width */
- _out_size.width = _video_view->get()->GetSize().x;
- _out_size.height = lrintf (_out_size.width / film_ratio);
+ out_size.width = _video_view->get()->GetSize().x;
+ out_size.height = lrintf (out_size.width / film_ratio);
} else {
/* panel is more widescreen than the film; clamp height */
- _out_size.height = _video_view->get()->GetSize().y;
- _out_size.width = lrintf (_out_size.height * film_ratio);
+ out_size.height = _video_view->get()->GetSize().y;
+ out_size.width = lrintf (out_size.height * film_ratio);
}
/* Catch silly values */
- _out_size.width = max (64, _out_size.width);
- _out_size.height = max (64, _out_size.height);
+ out_size.width = max (64, out_size.width);
+ out_size.height = max (64, out_size.height);
- _player->set_video_container_size (_out_size);
+ _player->set_video_container_size (out_size);
}