Mercurial > mplayer.hg
changeset 32525:11b0a82d018c
Simplify: Use early return instead of large if block.
author | reimar |
---|---|
date | Tue, 09 Nov 2010 22:13:11 +0000 |
parents | 4bfaa9fc1c16 |
children | 741d36324244 |
files | libvo/w32_common.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/w32_common.c Tue Nov 09 22:11:08 2010 +0000 +++ b/libvo/w32_common.c Tue Nov 09 22:13:11 2010 +0000 @@ -327,10 +327,12 @@ static int createRenderingContext(void) { HWND layer = HWND_NOTOPMOST; RECT r; - if (WinID < 0) { int style = (vo_border && !vo_fs) ? (WS_OVERLAPPEDWINDOW | WS_SIZEBOX) : WS_POPUP; + if (WinID >= 0) + return 1; + if (vo_fs || vo_ontop) layer = HWND_TOPMOST; if (vo_fs) { changeMode(); @@ -371,7 +373,6 @@ r.bottom = r.top + vo_dheight; AdjustWindowRect(&r, style, 0); SetWindowPos(vo_window, layer, r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_SHOWWINDOW); - } return 1; }