diff --git a/dlls/mciavi32/mmoutput.c b/dlls/mciavi32/mmoutput.c index c932ab4cf3c..ee0481c59c7 100644 --- a/dlls/mciavi32/mmoutput.c +++ b/dlls/mciavi32/mmoutput.c @@ -140,11 +140,7 @@ static BOOL MCIAVI_GetInfoVideo(WINE_MCIAVI* wma, const MMCKINFO* mmckList, MMCK TRACE("bih.biClrUsed=%d\n", wma->inbih->biClrUsed); TRACE("bih.biClrImportant=%d\n", wma->inbih->biClrImportant); - wma->source.left = 0; - wma->source.top = 0; - wma->source.right = wma->inbih->biWidth; - wma->source.bottom = wma->inbih->biHeight; - + SetRect(&wma->source, 0, 0, wma->inbih->biWidth, wma->inbih->biHeight); wma->dest = wma->source; return TRUE; diff --git a/dlls/mciavi32/wnd.c b/dlls/mciavi32/wnd.c index c7dcf61d07c..66c7565e31d 100644 --- a/dlls/mciavi32/wnd.c +++ b/dlls/mciavi32/wnd.c @@ -122,9 +122,11 @@ BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARM if (dwFlags & MCI_DGV_OPEN_PARENT) hParent = lpOpenParms->hWndParent; if (dwFlags & MCI_DGV_OPEN_WS) dwStyle = lpOpenParms->dwStyle; - rc.left = rc.top = 0; - rc.right = (wma->hic ? wma->outbih : wma->inbih)->biWidth; - rc.bottom = (wma->hic ? wma->outbih : wma->inbih)->biHeight; + if (wma->hic) + SetRect(&rc, 0, 0, wma->outbih->biWidth, wma->outbih->biHeight); + else + SetRect(&rc, 0, 0, wma->inbih->biWidth, wma->inbih->biHeight); + AdjustWindowRect(&rc, dwStyle, FALSE); if (!(dwStyle & (WS_CHILD|WS_POPUP))) /* overlapped window ? */ { @@ -161,10 +163,8 @@ DWORD MCIAVI_mciPut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PUT_PARMS lpParms) if (dwFlags & MCI_DGV_RECT) { /* In MCI, RECT structure is used differently: rc.right = width & rc.bottom = height * So convert input MCI RECT into a normal RECT */ - rc.left = lpParms->rc.left; - rc.top = lpParms->rc.top; - rc.right = lpParms->rc.left + lpParms->rc.right; - rc.bottom = lpParms->rc.top + lpParms->rc.bottom; + SetRect(&rc, lpParms->rc.left, lpParms->rc.top, lpParms->rc.left + lpParms->rc.right, + lpParms->rc.top + lpParms->rc.bottom); } else { GetClientRect(wma->hWndPaint, &rc); } @@ -235,10 +235,7 @@ DWORD MCIAVI_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms) } if (dwFlags & MCI_DGV_WHERE_SOURCE) { if (dwFlags & MCI_DGV_WHERE_MAX) { - rc.left = 0; - rc.top = 0; - rc.right = wma->inbih->biWidth; - rc.bottom = wma->inbih->biHeight; + SetRect(&rc, 0, 0, wma->inbih->biWidth, wma->inbih->biHeight); TRACE("WHERE_SOURCE_MAX %s\n", wine_dbgstr_rect(&rc)); } else { TRACE("WHERE_SOURCE %s\n", wine_dbgstr_rect(&wma->source)); @@ -265,10 +262,7 @@ DWORD MCIAVI_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms) /* In MCI, RECT structure is used differently: rc.right = width & rc.bottom = height * So convert the normal RECT into a MCI RECT before returning */ - lpParms->rc.left = rc.left; - lpParms->rc.top = rc.top; - lpParms->rc.right = rc.right - rc.left; - lpParms->rc.bottom = rc.bottom - rc.top; + SetRect(&lpParms->rc, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); LeaveCriticalSection(&wma->cs); return 0;