1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

Disabled smooth scrolling

Prevents a visual artifact where the area that is supposed to scroll out of view
remains static during the smooth scrolling animation.
This commit is contained in:
narzoul 2016-04-18 22:32:27 +02:00
parent a8834453e0
commit 44cc4c2ad5

View File

@ -6,12 +6,8 @@
namespace namespace
{ {
BOOL WINAPI scrollWindow( BOOL WINAPI scrollWindow(HWND hWnd, int XAmount, int YAmount,
_In_ HWND hWnd, const RECT* lpRect, const RECT* lpClipRect)
_In_ int XAmount,
_In_ int YAmount,
_In_ const RECT *lpRect,
_In_ const RECT *lpClipRect)
{ {
Compat::LogEnter("scrollWindow", hWnd, XAmount, YAmount, lpRect, lpClipRect); Compat::LogEnter("scrollWindow", hWnd, XAmount, YAmount, lpRect, lpClipRect);
BOOL result = CALL_ORIG_FUNC(ScrollWindow)(hWnd, XAmount, YAmount, lpRect, lpClipRect); BOOL result = CALL_ORIG_FUNC(ScrollWindow)(hWnd, XAmount, YAmount, lpRect, lpClipRect);
@ -23,24 +19,24 @@ namespace
return result; return result;
} }
int WINAPI scrollWindowEx( int WINAPI scrollWindowEx(HWND hWnd, int dx, int dy, const RECT* prcScroll, const RECT* prcClip,
_In_ HWND hWnd, HRGN hrgnUpdate, LPRECT prcUpdate, UINT flags)
_In_ int dx,
_In_ int dy,
_In_ const RECT *prcScroll,
_In_ const RECT *prcClip,
_In_ HRGN hrgnUpdate,
_Out_ LPRECT prcUpdate,
_In_ UINT flags)
{ {
Compat::LogEnter("scrollWindowEx", Compat::LogEnter("scrollWindowEx",
hWnd, dx, dy, prcScroll, prcClip, hrgnUpdate, prcUpdate, flags); hWnd, dx, dy, prcScroll, prcClip, hrgnUpdate, prcUpdate, flags);
if (flags & SW_SMOOTHSCROLL)
{
flags = LOWORD(flags ^ SW_SMOOTHSCROLL);
}
int result = CALL_ORIG_FUNC(ScrollWindowEx)( int result = CALL_ORIG_FUNC(ScrollWindowEx)(
hWnd, dx, dy, prcScroll, prcClip, hrgnUpdate, prcUpdate, flags); hWnd, dx, dy, prcScroll, prcClip, hrgnUpdate, prcUpdate, flags);
if (ERROR != result) if (ERROR != result)
{ {
CompatGdiScrollFunctions::updateScrolledWindow(hWnd); CompatGdiScrollFunctions::updateScrolledWindow(hWnd);
} }
Compat::LogLeave("scrollWindowEx", Compat::LogLeave("scrollWindowEx",
hWnd, dx, dy, prcScroll, prcClip, hrgnUpdate, prcUpdate, flags) << result; hWnd, dx, dy, prcScroll, prcClip, hrgnUpdate, prcUpdate, flags) << result;
return result; return result;