[vlc-commits] msw: small code factor

Rémi Denis-Courmont git at videolan.org
Thu Oct 16 19:25:57 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct  9 22:54:39 2014 +0300| [8f81a4a256330a8df693df0af57ea02b881ee588] | committer: Rémi Denis-Courmont

msw: small code factor

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8f81a4a256330a8df693df0af57ea02b881ee588
---

 modules/video_output/msw/events.c |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c
index 45e237d..d47c9b4 100644
--- a/modules/video_output/msw/events.c
+++ b/modules/video_output/msw/events.c
@@ -757,18 +757,13 @@ static int Win32VoutCreateWindow( event_thread_t *p_event )
     rect_window.right  = rect_window.left + p_event->width;
     rect_window.bottom = rect_window.top  + p_event->height;
 
-    if( var_GetBool( vd, "video-deco" ) )
-    {
+    i_style = var_GetBool( vd, "video-deco" )
         /* Open with window decoration */
-        AdjustWindowRect( &rect_window, WS_OVERLAPPEDWINDOW|WS_SIZEBOX, 0 );
-        i_style = WS_OVERLAPPEDWINDOW|WS_SIZEBOX|WS_VISIBLE|WS_CLIPCHILDREN;
-    }
-    else
-    {
+        ? WS_OVERLAPPEDWINDOW|WS_SIZEBOX
         /* No window decoration */
-        AdjustWindowRect( &rect_window, WS_POPUP, 0 );
-        i_style = WS_POPUP|WS_VISIBLE|WS_CLIPCHILDREN;
-    }
+        : WS_POPUP;
+    AdjustWindowRect( &rect_window, i_style, 0 );
+    i_style |= WS_VISIBLE|WS_CLIPCHILDREN;
 
     if( p_event->hparent )
     {



More information about the vlc-commits mailing list