X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Ffilm_viewer.cc;h=259e2bc16a4a02b5ca078add1d95a8251b4851cb;hp=392c68d70610444ea62ca085855c8080758782b5;hb=dff4de9f29435fe1222a6b039ca3231064f6bcd9;hpb=6f322eec31ef03f73e47564f20c39795b6bb9155 diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 392c68d70..259e2bc16 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -283,13 +283,9 @@ FilmViewer::calculate_sizes () auto const container = _film->container (); -#if wxCHECK_VERSION(3,1,0) - auto const dpi_scale_factor = _video_view->get()->GetDPIScaleFactor(); -#else - auto const dpi_scale_factor = 1; -#endif - int const video_view_width = std::round(_video_view->get()->GetSize().x * dpi_scale_factor); - int const video_view_height = std::round(_video_view->get()->GetSize().y * dpi_scale_factor); + auto const scale = dpi_scale_factor (_video_view->get()); + int const video_view_width = std::round(_video_view->get()->GetSize().x * scale); + int const video_view_height = std::round(_video_view->get()->GetSize().y * scale); auto const view_ratio = float(video_view_width) / video_view_height; auto const film_ratio = container ? container->ratio () : 1.78;