diff options
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/win/window.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx index 16deeee09a1e..a24682ae03bc 100644 --- a/avmedia/source/win/window.cxx +++ b/avmedia/source/win/window.cxx @@ -235,12 +235,12 @@ void Window::ImplLayoutVideoWindow() { if( aPrefSize.Width > 0 && aPrefSize.Height > 0 && nVideoW > 0 && nVideoH > 0 ) { - double fPrefWH = (double) aPrefSize.Width / aPrefSize.Height; + double fPrefWH = static_cast<double>(aPrefSize.Width) / aPrefSize.Height; - if( fPrefWH < ( (double) nVideoW / nVideoH ) ) - nVideoW = (int)( nVideoH * fPrefWH ); + if( fPrefWH < ( static_cast<double>(nVideoW) / nVideoH ) ) + nVideoW = static_cast<int>( nVideoH * fPrefWH ); else - nVideoH = (int)( nVideoW / fPrefWH ); + nVideoH = static_cast<int>( nVideoW / fPrefWH ); nX = ( nW - nVideoW ) >> 1; nY = ( nH - nVideoH ) >> 1; |