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:
parent
a8834453e0
commit
44cc4c2ad5
@ -6,12 +6,8 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
BOOL WINAPI scrollWindow(
|
||||
_In_ HWND hWnd,
|
||||
_In_ int XAmount,
|
||||
_In_ int YAmount,
|
||||
_In_ const RECT *lpRect,
|
||||
_In_ const RECT *lpClipRect)
|
||||
BOOL WINAPI scrollWindow(HWND hWnd, int XAmount, int YAmount,
|
||||
const RECT* lpRect, const RECT* lpClipRect)
|
||||
{
|
||||
Compat::LogEnter("scrollWindow", hWnd, XAmount, YAmount, lpRect, lpClipRect);
|
||||
BOOL result = CALL_ORIG_FUNC(ScrollWindow)(hWnd, XAmount, YAmount, lpRect, lpClipRect);
|
||||
@ -23,24 +19,24 @@ namespace
|
||||
return result;
|
||||
}
|
||||
|
||||
int WINAPI scrollWindowEx(
|
||||
_In_ HWND hWnd,
|
||||
_In_ int dx,
|
||||
_In_ int dy,
|
||||
_In_ const RECT *prcScroll,
|
||||
_In_ const RECT *prcClip,
|
||||
_In_ HRGN hrgnUpdate,
|
||||
_Out_ LPRECT prcUpdate,
|
||||
_In_ UINT flags)
|
||||
int WINAPI scrollWindowEx(HWND hWnd, int dx, int dy, const RECT* prcScroll, const RECT* prcClip,
|
||||
HRGN hrgnUpdate, LPRECT prcUpdate, UINT flags)
|
||||
{
|
||||
Compat::LogEnter("scrollWindowEx",
|
||||
hWnd, dx, dy, prcScroll, prcClip, hrgnUpdate, prcUpdate, flags);
|
||||
|
||||
if (flags & SW_SMOOTHSCROLL)
|
||||
{
|
||||
flags = LOWORD(flags ^ SW_SMOOTHSCROLL);
|
||||
}
|
||||
|
||||
int result = CALL_ORIG_FUNC(ScrollWindowEx)(
|
||||
hWnd, dx, dy, prcScroll, prcClip, hrgnUpdate, prcUpdate, flags);
|
||||
if (ERROR != result)
|
||||
{
|
||||
CompatGdiScrollFunctions::updateScrolledWindow(hWnd);
|
||||
}
|
||||
|
||||
Compat::LogLeave("scrollWindowEx",
|
||||
hWnd, dx, dy, prcScroll, prcClip, hrgnUpdate, prcUpdate, flags) << result;
|
||||
return result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user