From ed50d8456374f335130382e62cafb58c29d5e667 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 4 Dec 2022 21:18:18 +0200 Subject: [PATCH] Fix D3D9 overlay --- od-win32/direct3d.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index 3fee1cd4..4a04b8da 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -1841,10 +1841,10 @@ static int createmask2texture (struct d3dstruct *d3d, const TCHAR *filename) xmult = d3d->mask2texture_multx; ymult = d3d->mask2texture_multy; - d3d->mask2rect.left *= (LONG)xmult; - d3d->mask2rect.right *= (LONG)xmult; - d3d->mask2rect.top *= (LONG)ymult; - d3d->mask2rect.bottom *= (LONG)ymult; + d3d->mask2rect.left = (LONG)(d3d->mask2rect.left * xmult); + d3d->mask2rect.right = (LONG)(d3d->mask2rect.right * xmult); + d3d->mask2rect.top = (LONG)(d3d->mask2rect.top * ymult); + d3d->mask2rect.bottom = (LONG)(d3d->mask2rect.bottom * ymult); d3d->mask2texture_wwx = d3d->mask2texture_w * xmult; if (d3d->mask2texture_wwx > d3d->window_w) d3d->mask2texture_wwx = (float)d3d->window_w; -- 2.47.3