winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
596 discussions
Start a n
N
ew thread
Jacek Caban : wow64win: Implement more user callbacks.
by Alexandre Julliard
16 Aug '22
16 Aug '22
Module: wine Branch: master Commit: 6d8b1887a5e84dbda6c2abf778583d8397ab7dec URL:
https://gitlab.winehq.org/wine/wine/-/commit/6d8b1887a5e84dbda6c2abf778583d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 16 14:22:21 2022 +0200 wow64win: Implement more user callbacks. --- dlls/user32/user_main.c | 25 ++++++++--- dlls/win32u/font.c | 4 +- dlls/win32u/message.c | 1 + dlls/wow64win/user.c | 115 +++++++++++++++++++++++++++++++++++++++++++++--- include/ntuser.h | 3 +- 5 files changed, 134 insertions(+), 14 deletions(-) diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index bc817089e46..f16f8e04464 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -125,8 +125,17 @@ static NTSTATUS WINAPI User32DrawScrollBar( const struct draw_scroll_bar_params static NTSTATUS WINAPI User32DrawText( const struct draw_text_params *params, ULONG size ) { + RECT rect = params->rect; + int ret; + size -= FIELD_OFFSET( struct draw_text_params, str ); - return DrawTextW( params->hdc, params->str, size / sizeof(WCHAR), params->rect, params->flags ); + ret = DrawTextW( params->hdc, params->str, size / sizeof(WCHAR), &rect, params->flags ); + if (params->ret_rect) + { + *params->ret_rect = rect; + return ret; + } + return NtCallbackReturn( &rect, sizeof(rect), ret ); } static NTSTATUS WINAPI User32ImmProcessKey( const struct imm_process_key_params *params, ULONG size ) @@ -180,12 +189,16 @@ static BOOL WINAPI User32LoadDriver( const WCHAR *path, ULONG size ) static NTSTATUS WINAPI User32UnpackDDEMessage( const struct unpack_dde_message_params *params, ULONG size ) { - struct unpack_dde_message_result *result = params->result; - result->wparam = params->wparam; - result->lparam = params->lparam; + struct unpack_dde_message_result result = { .wparam = params->wparam, .lparam = params->lparam }; + size -= FIELD_OFFSET( struct unpack_dde_message_params, data ); - return unpack_dde_message( params->hwnd, params->message, &result->wparam, &result->lparam, - params->data, size ); + if (!unpack_dde_message( params->hwnd, params->message, &result.wparam, &result.lparam, + params->data, size )) + return FALSE; + + if (params->result) *params->result = result; + else NtCallbackReturn( &result, sizeof(result), TRUE ); + return TRUE; } static const void *kernel_callback_table[NtUserCallCount] = diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index 5ea89c9220e..e26c7bfa316 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -6610,10 +6610,12 @@ INT WINAPI DrawTextW( HDC hdc, const WCHAR *str, INT count, RECT *rect, UINT fla size = FIELD_OFFSET( struct draw_text_params, str[count] ); if (!(params = malloc( size ))) return 0; params->hdc = hdc; - params->rect = rect; + params->rect = *rect; + params->ret_rect = rect; params->flags = flags; if (count) memcpy( params->str, str, count * sizeof(WCHAR) ); ret = KeUserModeCallback( NtUserDrawText, params, size, &ret_ptr, &ret_len ); + if (ret_len == sizeof(*rect)) *rect = *(const RECT *)ret_ptr; free( params ); return ret; } diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 24e6dcf368c..f4f134e213b 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -2009,6 +2009,7 @@ static int peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags, params->lparam = info.msg.lParam; if (size) memcpy( params->data, buffer, size ); ret = KeUserModeCallback( NtUserUnpackDDEMessage, params, len, &ret_ptr, &len ); + if (len == sizeof(result)) result = *(struct unpack_dde_message_result *)ret_ptr; free( params ); if (!ret) continue; /* ignore it */ info.msg.wParam = result.wparam; diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 178b609e508..bb17e034eb2 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -287,6 +287,39 @@ struct win_proc_params32 ULONG procW; }; +struct win_event_hook_params32 +{ + DWORD event; + ULONG hwnd; + LONG object_id; + LONG child_id; + ULONG handle; + DWORD tid; + DWORD time; + ULONG proc; + WCHAR module[MAX_PATH]; +}; + +struct draw_text_params32 +{ + ULONG hdc; + int count; + RECT rect; + ULONG ret_rect; + UINT flags; + WCHAR str[1]; +}; + +struct unpack_dde_message_params32 +{ + ULONG result; + ULONG hwnd; + UINT message; + LONG wparam; + LONG lparam; + char data[1]; +}; + static MSG *msg_32to64( MSG *msg, const MSG32 *msg32 ) { if (!msg32) return NULL; @@ -480,8 +513,22 @@ static NTSTATUS WINAPI wow64_NtUserCallSendAsyncCallback( void *arg, ULONG size static NTSTATUS WINAPI wow64_NtUserCallWinEventHook( void *arg, ULONG size ) { - FIXME( "\n" ); - return 0; + struct win_event_hook_params *params = arg; + struct win_event_hook_params32 params32; + + params32.event = params->event; + params32.hwnd = HandleToUlong( params->hwnd ); + params32.object_id = params->object_id; + params32.child_id = params->child_id; + params32.handle = HandleToUlong( params->handle ); + params32.tid = params->tid; + params32.time = params->time; + params32.proc = PtrToUlong( params->proc ); + + size -= FIELD_OFFSET( struct win_event_hook_params, module ); + if (size) memcpy( params32.module, params->module, size ); + return dispatch_callback( NtUserCallWinEventHook, ¶ms32, + FIELD_OFFSET( struct win_event_hook_params32, module ) + size); } static NTSTATUS WINAPI wow64_NtUserCallWinProc( void *arg, ULONG size ) @@ -766,8 +813,31 @@ static NTSTATUS WINAPI wow64_NtUserDrawScrollBar( void *arg, ULONG size ) static NTSTATUS WINAPI wow64_NtUserDrawText( void *arg, ULONG size ) { - FIXME( "\n" ); - return 0; + struct draw_text_params *params = arg; + struct draw_text_params32 *params32; + RECT *rect_ptr = params->ret_rect; + ULONG ret_len, len; + void *ret_ptr; + NTSTATUS ret; + + len = (size - FIELD_OFFSET( struct draw_text_params, str )) / sizeof(WCHAR); + if (!(params32 = Wow64AllocateTemp( FIELD_OFFSET( struct draw_text_params32, str[len] )))) + return 0; + + params32->hdc = HandleToUlong( params->hdc ); + params32->count = params->count; + params32->rect = params->rect; + params32->ret_rect = 0; + params32->flags = params->flags; + if (len) memcpy( params32->str, params->str, len * sizeof(WCHAR) ); + + ret = Wow64KiUserCallbackDispatcher( NtUserDrawText, params, size, &ret_ptr, &ret_len ); + if (ret_len == sizeof(RECT) && rect_ptr) + { + *rect_ptr = *(const RECT *)ret_ptr; + return ret; + } + return NtCallbackReturn( ret_ptr, ret_len, ret ); } static NTSTATUS WINAPI wow64_NtUserFreeCachedClipboardData( void *arg, ULONG size ) @@ -874,8 +944,41 @@ static NTSTATUS WINAPI wow64_NtUserRenderSynthesizedFormat( void *arg, ULONG siz static NTSTATUS WINAPI wow64_NtUserUnpackDDEMessage( void *arg, ULONG size ) { - FIXME( "\n" ); - return 0; + struct unpack_dde_message_params *params = arg; + struct unpack_dde_message_params32 *params32; + struct unpack_dde_message_result result; + struct + { + LONG wparam; + LONG lparam; + } *result32; + void *ret_ptr; + ULONG ret_len; + + size -= FIELD_OFFSET( struct unpack_dde_message_params, data ); + if (!(params32 = Wow64AllocateTemp( FIELD_OFFSET( struct unpack_dde_message_params32, data[size] )))) + return 0; + + params32->result = 0; + params32->hwnd = HandleToUlong( params->hwnd ); + params32->message = params->message; + params32->wparam = params->wparam; + params32->lparam = params->lparam; + if (size) memcpy( params32->data, params->data, size ); + size = FIELD_OFFSET( struct unpack_dde_message_params32, data[size] ); + + if (!Wow64KiUserCallbackDispatcher( NtUserUnpackDDEMessage, params32, size, &ret_ptr, &ret_len )) + return FALSE; + if (ret_len == sizeof(*result32)) + { + result32 = ret_ptr; + result.wparam = result32->wparam; + result.lparam = result32->lparam; + } + + if (!params->result) NtCallbackReturn( &result, sizeof(result), TRUE ); + *params->result = result; + return TRUE; } static NTSTATUS WINAPI wow64_NtUserCallFreeIcon( void *arg, ULONG size ) diff --git a/include/ntuser.h b/include/ntuser.h index 7c375e43999..326d0371998 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -184,7 +184,8 @@ struct draw_text_params { HDC hdc; int count; - RECT *rect; /* FIXME: Use NtCallbackReturn instead */ + RECT rect; + RECT *ret_rect; /* FIXME: Use NtCallbackReturn instead */ UINT flags; WCHAR str[1]; };
1
0
0
0
Jacek Caban : wow64win: Implement NtUserCallWindowsHook thunk.
by Alexandre Julliard
16 Aug '22
16 Aug '22
Module: wine Branch: master Commit: 57d66ecc5ff2d7fd78628c74d81c4e6c1a4469c5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/57d66ecc5ff2d7fd78628c74d81c4e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 16 13:23:21 2022 +0200 wow64win: Implement NtUserCallWindowsHook thunk. --- dlls/wow64win/user.c | 251 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 248 insertions(+), 3 deletions(-) diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 0432d55ec9c..178b609e508 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -145,6 +145,15 @@ typedef struct DWORD dwExStyle; } CREATESTRUCT32; +typedef struct +{ + LONG lResult; + LONG lParam; + LONG wParam; + DWORD message; + ULONG hwnd; +} CWPRETSTRUCT32; + typedef struct { ULONG hwnd; @@ -179,6 +188,56 @@ typedef struct ULONG itemData; } DRAWITEMSTRUCT32; +typedef struct +{ + ULONG lParam; + ULONG wParam; + UINT message; + ULONG hwnd; +} CWPSTRUCT32; + +typedef struct +{ + POINT pt; + ULONG hwnd; + UINT wHitTestCode; + ULONG dwExtraInfo; + DWORD mouseData; +} MOUSEHOOKSTRUCTEX32; + +typedef struct +{ + POINT pt; + DWORD mouseData; + DWORD flags; + DWORD time; + ULONG dwExtraInfo; +} MSLLHOOKSTRUCT32; + +typedef struct +{ + DWORD vkCode; + DWORD scanCode; + DWORD flags; + DWORD time; + ULONG dwExtraInfo; +} KBDLLHOOKSTRUCT32; + +typedef struct +{ + UINT message; + UINT paramL; + UINT paramH; + DWORD time; + ULONG hwnd; +} EVENTMSG32; + +typedef struct +{ + BOOL fMouse; + ULONG hWndActive; +} CBTACTIVATESTRUCT32; + typedef struct { UINT CtlType; @@ -241,7 +300,7 @@ static MSG *msg_32to64( MSG *msg, const MSG32 *msg32 ) return msg; } -static MSG32 *msg_64to32( MSG *msg, MSG32 *msg32 ) +static MSG32 *msg_64to32( const MSG *msg, MSG32 *msg32 ) { if (!msg32) return NULL; @@ -358,6 +417,19 @@ static PAINTSTRUCT *paintstruct_32to64( PAINTSTRUCT *ps, const PAINTSTRUCT32 *ps return ps; } +static MOUSEHOOKSTRUCTEX32 *mousehookstruct_64to32( const MOUSEHOOKSTRUCTEX *hook, + MOUSEHOOKSTRUCTEX32 *hook32 ) +{ + if (!hook) return NULL; + + hook32->pt = hook->pt; + hook32->hwnd = HandleToUlong( hook->hwnd ); + hook32->wHitTestCode = hook->wHitTestCode; + hook32->dwExtraInfo = hook->dwExtraInfo; + hook32->mouseData = hook->mouseData; + return hook32; +} + static NTSTATUS dispatch_callback( ULONG id, void *args, ULONG len ) { void *ret_ptr; @@ -444,10 +516,183 @@ static NTSTATUS WINAPI wow64_NtUserCallWinProc( void *arg, ULONG size ) return NtCallbackReturn( &result, sizeof(result), status ); } +static UINT hook_lparam_64to32( struct win_hook_params *params, const void *lp, void *lp32 ) +{ + if (!params->lparam_size) return 0; + + switch (params->id) + { + case WH_SYSMSGFILTER: + case WH_MSGFILTER: + case WH_GETMESSAGE: + msg_64to32( lp, lp32 ); + return sizeof(MSG32); + + case WH_CBT: + switch (params->code) + { + case HCBT_CREATEWND: + if (lp) + { + const CREATESTRUCTW *cs = lp; + CREATESTRUCT32 *cs32 = lp32; + createstruct_64to32( cs, cs32 ); + cs32->lpszName = PtrToUlong( cs->lpszName ); + cs32->lpszClass = PtrToUlong( cs->lpszClass ); + } + return sizeof(CREATESTRUCT32); + + case HCBT_ACTIVATE: + if (lp) + { + const CBTACTIVATESTRUCT *cbt = lp; + CBTACTIVATESTRUCT32 *cbt32 = lp32; + cbt32->fMouse = cbt->fMouse; + cbt32->hWndActive = HandleToUlong( cbt->hWndActive ); + } + return sizeof(CBTACTIVATESTRUCT32); + + case HCBT_CLICKSKIPPED: + mousehookstruct_64to32( lp, lp32 ); + return sizeof(MOUSEHOOKSTRUCTEX32); + } + break; + + case WH_CALLWNDPROC: + if (lp) + { + const CWPSTRUCT *cwp = lp; + CWPSTRUCT32 *cwp32 = lp32; + cwp32->lParam = cwp->lParam; + cwp32->wParam = cwp->wParam; + cwp32->message = cwp->message; + cwp32->hwnd = HandleToUlong( cwp->hwnd ); + } + return sizeof(CWPSTRUCT32); + + case WH_CALLWNDPROCRET: + if (lp) + { + const CWPRETSTRUCT *cwpret = lp; + CWPRETSTRUCT32 *cwpret32 = lp32; + cwpret32->lResult = cwpret->lResult; + cwpret32->lParam = cwpret->lParam; + cwpret32->wParam = cwpret->wParam; + cwpret32->message = cwpret->message; + cwpret32->hwnd = HandleToUlong( cwpret->hwnd ); + } + return sizeof(CWPRETSTRUCT32); + + case WH_MOUSE: + mousehookstruct_64to32( lp, lp32 ); + return sizeof(MOUSEHOOKSTRUCTEX32); + + case WH_MOUSE_LL: + if (lp) + { + const MSLLHOOKSTRUCT *hook = lp; + MSLLHOOKSTRUCT32 *hook32 = lp32; + hook32->pt = hook->pt; + hook32->mouseData = hook->mouseData; + hook32->flags = hook->flags; + hook32->time = hook->time; + hook32->dwExtraInfo = hook->dwExtraInfo; + } + return sizeof(MSLLHOOKSTRUCT32); + + case WH_KEYBOARD_LL: + if (lp) + { + const KBDLLHOOKSTRUCT *hook = lp; + KBDLLHOOKSTRUCT32 *hook32 = lp32; + hook32->vkCode = hook->vkCode; + hook32->scanCode = hook->scanCode; + hook32->flags = hook->flags; + hook32->time = hook->time; + hook32->dwExtraInfo = hook->dwExtraInfo; + } + return sizeof(KBDLLHOOKSTRUCT32); + + case WH_JOURNALRECORD: + if (lp) + { + const EVENTMSG *event = lp; + EVENTMSG32 *event32 = lp32; + + event32->message = event->message; + event32->paramL = event->paramL; + event32->paramH = event->paramH; + event32->time = event->time; + event32->hwnd = HandleToUlong( event->hwnd ); + } + return sizeof(EVENTMSG32); + } + + if (lp) memcpy( lp32, lp, params->lparam_size ); + return params->lparam_size; +} + static NTSTATUS WINAPI wow64_NtUserCallWindowsHook( void *arg, ULONG size ) { - FIXME( "\n" ); - return 0; + struct win_hook_params *params = arg; + struct + { + ULONG proc; + ULONG handle; + DWORD pid; + DWORD tid; + int id; + int code; + ULONG wparam; + ULONG lparam; + UINT lparam_size; + BOOL prev_unicode; + BOOL next_unicode; + } *params32; + void *ret_lparam = (void *)params->lparam; + UINT lparam32_size = 0, module_size, size32; + void *ret_ptr; + ULONG ret_len; + NTSTATUS ret; + + lparam32_size = hook_lparam_64to32( params, NULL, NULL ); + module_size = size - params->lparam_size - sizeof(*params); + + size32 = sizeof(*params32) + lparam32_size + module_size; + if (!(params32 = Wow64AllocateTemp( size32 ))) return 0; + params32->proc = (UINT_PTR)params->proc; + params32->handle = HandleToUlong( params->handle ); + params32->pid = params->pid; + params32->tid = params->tid; + params32->id = params->id; + params32->code = params->code; + params32->wparam = params->wparam; + params32->lparam = params->lparam_size ? 0 : params->lparam; + params32->lparam_size = lparam32_size; + params32->prev_unicode = params->prev_unicode; + params32->next_unicode = params->next_unicode; + if (lparam32_size) hook_lparam_64to32( params, params + 1, params32 + 1 ); + if (module_size) + memcpy( (char *)(params32 + 1) + params32->lparam_size, + (const char *)params + size - module_size, module_size ); + + ret = Wow64KiUserCallbackDispatcher( NtUserCallWindowsHook, params32, size32, &ret_ptr, &ret_len ); + + switch (params->id) + { + case WH_SYSMSGFILTER: + case WH_MSGFILTER: + case WH_GETMESSAGE: + msg_32to64( (MSG *)(params + 1), (const MSG32 *)(params32 + 1) ); + if (ret_lparam) + { + memcpy( ret_lparam, params + 1, params->lparam_size ); + return ret; + } + return NtCallbackReturn( params + 1, params->lparam_size, ret ); + } + + return ret; } static NTSTATUS WINAPI wow64_NtUserCopyImage( void *arg, ULONG size )
1
0
0
0
Jacek Caban : win32u: Use a client copy of windows hook lparam when calling hook procs.
by Alexandre Julliard
16 Aug '22
16 Aug '22
Module: wine Branch: master Commit: caad1672782a20c813bc07daead13348263fea37 URL:
https://gitlab.winehq.org/wine/wine/-/commit/caad1672782a20c813bc07daead133…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 16 12:35:09 2022 +0200 win32u: Use a client copy of windows hook lparam when calling hook procs. Instead of leaking kernel pointers. --- dlls/user32/hook.c | 38 +++++++++++++- dlls/user32/user_private.h | 2 +- dlls/win32u/defwnd.c | 6 +-- dlls/win32u/hook.c | 116 +++++++++++++++++++++++++++++++++---------- dlls/win32u/input.c | 6 +-- dlls/win32u/message.c | 28 ++++++----- dlls/win32u/tests/win32u.c | 1 - dlls/win32u/win32u_private.h | 3 +- dlls/win32u/window.c | 10 ++-- include/ntuser.h | 2 +- 10 files changed, 157 insertions(+), 55 deletions(-)
1
0
0
0
Paul Gofman : ddraw: Restore full complex attachment chain in ddraw_surface7_Restore().
by Alexandre Julliard
16 Aug '22
16 Aug '22
Module: wine Branch: master Commit: f48f5155eee169666ed36d324f90fd9884f63793 URL:
https://gitlab.winehq.org/wine/wine/-/commit/f48f5155eee169666ed36d324f90fd…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon Aug 15 20:16:58 2022 -0500 ddraw: Restore full complex attachment chain in ddraw_surface7_Restore(). --- dlls/ddraw/surface.c | 12 ++++++++++-- dlls/ddraw/tests/ddraw1.c | 2 +- dlls/ddraw/tests/ddraw2.c | 2 +- dlls/ddraw/tests/ddraw4.c | 2 +- dlls/ddraw/tests/ddraw7.c | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index afba0d5ac4b..038539632e1 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -3787,6 +3787,7 @@ static HRESULT WINAPI ddraw_surface1_IsLost(IDirectDrawSurface *iface) static HRESULT WINAPI ddraw_surface7_Restore(IDirectDrawSurface7 *iface) { struct ddraw_surface *surface = impl_from_IDirectDrawSurface7(iface); + struct ddraw_surface *attachment; unsigned int i; TRACE("iface %p.\n", iface); @@ -3832,10 +3833,17 @@ static HRESULT WINAPI ddraw_surface7_Restore(IDirectDrawSurface7 *iface) return DDERR_WRONGMODE; surface->is_lost = FALSE; + for(i = 0; i < MAX_COMPLEX_ATTACHED; i++) { - if (surface->complex_array[i]) - surface->complex_array[i]->is_lost = FALSE; + attachment = surface->complex_array[i]; + while (attachment) + { + attachment->is_lost = FALSE; + attachment = attachment->complex_array[0]; + if (attachment == surface->complex_array[i]) + break; + } } return DD_OK; diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 8d5896e45a0..1629660aedc 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -8241,7 +8241,7 @@ static void test_lost_device(void) ok(back_buffer2 != back_buffer, "Got the same surface.\n"); ok(back_buffer2 != surface, "Got the same surface.\n"); hr = IDirectDrawSurface_IsLost(back_buffer2); - todo_wine ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(back_buffer2); if (ds) diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 22cd59ec9b0..0aea1587156 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -9236,7 +9236,7 @@ static void test_lost_device(void) ok(back_buffer2 != back_buffer, "Got the same surface.\n"); ok(back_buffer2 != surface, "Got the same surface.\n"); hr = IDirectDrawSurface_IsLost(back_buffer2); - todo_wine ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(back_buffer2); if (ds) diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index c1bd91dec88..ab37adc000a 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -10655,7 +10655,7 @@ static void test_lost_device(void) ok(back_buffer2 != back_buffer, "Got the same surface.\n"); ok(back_buffer2 != surface, "Got the same surface.\n"); hr = IDirectDrawSurface4_IsLost(back_buffer2); - todo_wine ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface4_Release(back_buffer2); if (ds) diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 8ea566cee4c..c72ea64c17d 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -10405,7 +10405,7 @@ static void test_lost_device(void) ok(back_buffer2 != back_buffer, "Got the same surface.\n"); ok(back_buffer2 != surface, "Got the same surface.\n"); hr = IDirectDrawSurface7_IsLost(back_buffer2); - todo_wine ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); + ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); IDirectDrawSurface7_Release(back_buffer2); if (ds)
1
0
0
0
Paul Gofman : ddraw/tests: Add more tests for restoring complex surfaces.
by Alexandre Julliard
16 Aug '22
16 Aug '22
Module: wine Branch: master Commit: 4c0efe444d4fa45eb0fec84980eb255c88780c21 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4c0efe444d4fa45eb0fec84980eb25…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon Aug 15 20:04:10 2022 -0500 ddraw/tests: Add more tests for restoring complex surfaces. --- dlls/ddraw/tests/ddraw1.c | 44 +++++++++++++++++++++++++++++++++++-- dlls/ddraw/tests/ddraw2.c | 44 +++++++++++++++++++++++++++++++++++-- dlls/ddraw/tests/ddraw4.c | 56 +++++++++++++++++++++++++++++++++++++++++++++-- dlls/ddraw/tests/ddraw7.c | 56 ++++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 191 insertions(+), 9 deletions(-)
1
0
0
0
Zebediah Figura : d3d11: Implement D3D11_FEATURE_FORMAT_SUPPORT.
by Alexandre Julliard
16 Aug '22
16 Aug '22
Module: wine Branch: master Commit: b34b5da644d2dc039c3956a073131bf56713f459 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b34b5da644d2dc039c3956a073131b…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Aug 10 12:18:22 2022 -0500 d3d11: Implement D3D11_FEATURE_FORMAT_SUPPORT. This allows Guild Wars 2 to start. --- dlls/d3d11/device.c | 12 ++++++++++++ dlls/d3d11/tests/d3d11.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 79b972df671..65706a414d8 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -4198,6 +4198,18 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device2 return S_OK; } + case D3D11_FEATURE_FORMAT_SUPPORT: + { + D3D11_FEATURE_DATA_FORMAT_SUPPORT *data = feature_support_data; + if (feature_support_data_size != sizeof(*data)) + { + WARN("Invalid size %u for D3D11_FEATURE_FORMAT_SUPPORT.\n", feature_support_data_size); + return E_INVALIDARG; + } + + return d3d11_device_CheckFormatSupport(iface, data->InFormat, &data->OutFormatSupport); + } + default: FIXME("Unhandled feature %#x.\n", feature); return E_NOTIMPL; diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 034b5e4320f..5e00bc7a336 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -20993,6 +20993,7 @@ static void check_format_support(ID3D11Device *device, const unsigned int *forma static void test_format_support(const D3D_FEATURE_LEVEL feature_level) { unsigned int format_support[DXGI_FORMAT_B4G4R4A4_UNORM + 1]; + D3D11_FEATURE_DATA_FORMAT_SUPPORT feature_data; struct device_desc device_desc; ID3D11Device *device; DXGI_FORMAT format; @@ -21054,11 +21055,32 @@ static void test_format_support(const D3D_FEATURE_LEVEL feature_level) return; } + feature_data.InFormat = DXGI_FORMAT_R8G8B8A8_UNORM; + + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_FORMAT_SUPPORT, NULL, 0); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_FORMAT_SUPPORT, &feature_data, 0); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_FORMAT_SUPPORT, &feature_data, sizeof(feature_data) - 1); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_FORMAT_SUPPORT, &feature_data, sizeof(feature_data) / 2); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_FORMAT_SUPPORT, &feature_data, sizeof(feature_data) + 1); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_FORMAT_SUPPORT, &feature_data, sizeof(feature_data) * 2); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); + support = 0xdeadbeef; hr = ID3D11Device_CheckFormatSupport(device, ~0u, &support); ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); ok(!support, "Got unexpected format support %#x.\n", support); + feature_data.InFormat = ~0u; + feature_data.OutFormatSupport = 0xdeadbeef; + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_FORMAT_SUPPORT, &feature_data, sizeof(feature_data)); + ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); + ok(!feature_data.OutFormatSupport, "Got unexpected format support %#x.\n", feature_data.OutFormatSupport); + memset(format_support, 0, sizeof(format_support)); for (format = DXGI_FORMAT_UNKNOWN; format <= DXGI_FORMAT_B4G4R4A4_UNORM; ++format) { @@ -21073,6 +21095,14 @@ static void test_format_support(const D3D_FEATURE_LEVEL feature_level) "Got unexpected format support %#x", format); } + feature_data.InFormat = format; + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_FORMAT_SUPPORT, + &feature_data, sizeof(feature_data)); + ok((hr == S_OK && feature_data.OutFormatSupport) || (hr == E_FAIL && !feature_data.OutFormatSupport), + "Got unexpected hr %#lx, format_support %#x.\n", hr, feature_data.OutFormatSupport); + ok(feature_data.OutFormatSupport == format_support[format], "Expected format support %#x, got %#x.\n", + format_support[format], feature_data.OutFormatSupport); + winetest_pop_context(); }
1
0
0
0
Zebediah Figura : d3d11: Always return E_FAIL for formats which have no support flags.
by Alexandre Julliard
16 Aug '22
16 Aug '22
Module: wine Branch: master Commit: 74ad023154e00cb5273ad855d29e463f13a544c3 URL:
https://gitlab.winehq.org/wine/wine/-/commit/74ad023154e00cb5273ad855d29e46…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Aug 10 12:13:01 2022 -0500 d3d11: Always return E_FAIL for formats which have no support flags. --- dlls/d3d11/device.c | 2 +- dlls/d3d11/tests/d3d11.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 0ae695901da..79b972df671 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -3959,7 +3959,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device2 * | D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD; } - return S_OK; + return *format_support ? S_OK : E_FAIL; } static HRESULT STDMETHODCALLTYPE d3d11_device_CheckMultisampleQualityLevels(ID3D11Device2 *iface, diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index eab45931d2d..034b5e4320f 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -21062,15 +21062,18 @@ static void test_format_support(const D3D_FEATURE_LEVEL feature_level) memset(format_support, 0, sizeof(format_support)); for (format = DXGI_FORMAT_UNKNOWN; format <= DXGI_FORMAT_B4G4R4A4_UNORM; ++format) { + winetest_push_context("format %#x", format); + hr = ID3D11Device_CheckFormatSupport(device, format, &format_support[format]); - ok(hr == S_OK || (hr == E_FAIL && !format_support[format]), - "Got unexpected result for format %#x: hr %#lx, format_support %#x.\n", - format, hr, format_support[format]); + ok((hr == S_OK && format_support[format]) || (hr == E_FAIL && !format_support[format]), + "Got unexpected hr %#lx, format_support %#x.\n", hr, format_support[format]); if (format_support[format] & D3D11_FORMAT_SUPPORT_MIP_AUTOGEN) { ok(format_support[format] & D3D11_FORMAT_SUPPORT_TEXTURE2D, - "Got unexpected format support %#x for format %#x", format_support[format], format); + "Got unexpected format support %#x", format); } + + winetest_pop_context(); } for (format = DXGI_FORMAT_UNKNOWN; format <= DXGI_FORMAT_B4G4R4A4_UNORM; ++format)
1
0
0
0
Zebediah Figura : d3d11/tests: Use winetest_push_context() to print explicit feature levels.
by Alexandre Julliard
16 Aug '22
16 Aug '22
Module: wine Branch: master Commit: 2208ec0851d0efd10fe27671409580e42ca7d960 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2208ec0851d0efd10fe27671409580…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Aug 10 11:47:44 2022 -0500 d3d11/tests: Use winetest_push_context() to print explicit feature levels. --- dlls/d3d11/tests/d3d11.c | 114 +++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 57 deletions(-)
1
0
0
0
Rémi Bernon : mf: Only enumerate types for decoders / converter if down type is missing.
by Alexandre Julliard
16 Aug '22
16 Aug '22
Module: wine Branch: master Commit: 935e3d12de01b2821c992363135cec9d57a098bf URL:
https://gitlab.winehq.org/wine/wine/-/commit/935e3d12de01b2821c992363135cec…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Aug 11 14:12:27 2022 +0200 mf: Only enumerate types for decoders / converter if down type is missing. --- dlls/mf/tests/mf.c | 4 ++-- dlls/mf/topology_loader.c | 23 ++++++++++++++--------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index dd61a10fc77..eccf4f51e4c 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -2349,7 +2349,7 @@ static void test_topology_loader(void) .input_type = &audio_pcm_44100, .output_type = &audio_pcm_48000, .sink_method = MF_CONNECT_ALLOW_CONVERTER, .source_method = -1, .current_input = &audio_pcm_48000, .expected_result = S_OK, - .flags = LOADER_EXPECTED_CONVERTER | LOADER_SET_ENUMERATE_SOURCE_TYPES | LOADER_TODO, + .flags = LOADER_EXPECTED_CONVERTER | LOADER_SET_ENUMERATE_SOURCE_TYPES, }, { /* PCM -> PCM, different enumerated bps, no current type, sink allow decoder */ @@ -2432,7 +2432,7 @@ static void test_topology_loader(void) /* RGB32 -> Any Video, no current output type, refuse input type */ .input_type = &video_i420_1280, .output_type = &video_dummy, .sink_method = -1, .source_method = -1, .expected_result = S_OK, - .flags = LOADER_NO_CURRENT_OUTPUT | LOADER_SET_INVALID_INPUT | LOADER_EXPECTED_CONVERTER | LOADER_TODO, + .flags = LOADER_NO_CURRENT_OUTPUT | LOADER_SET_INVALID_INPUT | LOADER_EXPECTED_CONVERTER, }, }; diff --git a/dlls/mf/topology_loader.c b/dlls/mf/topology_loader.c index 4560e3a578d..eb652f526dd 100644 --- a/dlls/mf/topology_loader.c +++ b/dlls/mf/topology_loader.c @@ -240,7 +240,7 @@ static HRESULT topology_branch_fill_media_type(IMFMediaType *up_type, IMFMediaTy } static HRESULT topology_branch_connect(IMFTopology *topology, MF_CONNECT_METHOD method_mask, - struct topology_branch *branch); + struct topology_branch *branch, BOOL enumerate_source_types); static HRESULT topology_branch_connect_down(IMFTopology *topology, MF_CONNECT_METHOD method_mask, struct topology_branch *branch, IMFMediaType *up_type); static HRESULT topology_branch_connect_indirect(IMFTopology *topology, MF_CONNECT_METHOD method_mask, @@ -318,7 +318,7 @@ static HRESULT topology_branch_connect_indirect(IMFTopology *topology, MF_CONNEC IMFTransform_Release(transform); if (SUCCEEDED(hr)) - hr = topology_branch_connect(topology, method_mask, &down_branch); + hr = topology_branch_connect(topology, method_mask, &down_branch, !down_type); if (SUCCEEDED(hr)) hr = IMFTopology_AddNode(topology, node); if (SUCCEEDED(hr)) @@ -411,9 +411,8 @@ static HRESULT topology_branch_foreach_up_types(IMFTopology *topology, MF_CONNEC } static HRESULT topology_branch_connect(IMFTopology *topology, MF_CONNECT_METHOD method_mask, - struct topology_branch *branch) + struct topology_branch *branch, BOOL enumerate_source_types) { - UINT32 enumerate_source_types; MF_CONNECT_METHOD method; HRESULT hr; @@ -422,8 +421,7 @@ static HRESULT topology_branch_connect(IMFTopology *topology, MF_CONNECT_METHOD if (FAILED(IMFTopologyNode_GetUINT32(branch->up.node, &MF_TOPONODE_CONNECT_METHOD, &method))) method = MF_CONNECT_DIRECT; - if (SUCCEEDED(IMFTopology_GetUINT32(topology, &MF_TOPOLOGY_ENUMERATE_SOURCE_TYPES, &enumerate_source_types)) - && enumerate_source_types) + if (enumerate_source_types) { if (method & MF_CONNECT_RESOLVE_INDEPENDENT_OUTPUTTYPES) hr = topology_branch_foreach_up_types(topology, method_mask & MF_CONNECT_ALLOW_DECODER, branch); @@ -456,7 +454,8 @@ static HRESULT topology_branch_connect(IMFTopology *topology, MF_CONNECT_METHOD return hr; } -static HRESULT topology_loader_resolve_branches(struct topoloader_context *context, struct list *branches) +static HRESULT topology_loader_resolve_branches(struct topoloader_context *context, struct list *branches, + BOOL enumerate_source_types) { struct list new_branches = LIST_INIT(new_branches); struct topology_branch *branch, *next; @@ -474,7 +473,8 @@ static HRESULT topology_loader_resolve_branches(struct topoloader_context *conte else if (FAILED(hr = topology_branch_clone_nodes(context, branch))) WARN("Failed to clone nodes for branch %s\n", debugstr_topology_branch(branch)); else - hr = topology_branch_connect(context->output_topology, MF_CONNECT_ALLOW_DECODER, branch); + hr = topology_branch_connect(context->output_topology, MF_CONNECT_ALLOW_DECODER, + branch, enumerate_source_types); topology_branch_destroy(branch); if (FAILED(hr)) @@ -639,6 +639,7 @@ static HRESULT WINAPI topology_loader_Load(IMFTopoLoader *iface, IMFTopology *in struct list branches = LIST_INIT(branches); struct topoloader_context context = { 0 }; struct topology_branch *branch, *next; + UINT32 enumerate_source_types; IMFTopology *output_topology; MF_TOPOLOGY_TYPE node_type; IMFTopologyNode *node; @@ -705,8 +706,12 @@ static HRESULT WINAPI topology_loader_Load(IMFTopoLoader *iface, IMFTopology *in if (SUCCEEDED(hr) && list_empty(&branches)) hr = MF_E_TOPO_UNSUPPORTED; + if (FAILED(IMFTopology_GetUINT32(input_topology, &MF_TOPOLOGY_ENUMERATE_SOURCE_TYPES, + &enumerate_source_types))) + enumerate_source_types = 0; + while (SUCCEEDED(hr) && !list_empty(&branches)) - hr = topology_loader_resolve_branches(&context, &branches); + hr = topology_loader_resolve_branches(&context, &branches, enumerate_source_types); LIST_FOR_EACH_ENTRY_SAFE(branch, next, &branches, struct topology_branch, entry) {
1
0
0
0
Rémi Bernon : mf: Only allow converter connection if decoder didn't accept down type.
by Alexandre Julliard
16 Aug '22
16 Aug '22
Module: wine Branch: master Commit: 826a9ce1ab55879b905e915101f05c1f2a51d219 URL:
https://gitlab.winehq.org/wine/wine/-/commit/826a9ce1ab55879b905e915101f05c…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Aug 11 13:53:15 2022 +0200 mf: Only allow converter connection if decoder didn't accept down type. --- dlls/mf/topology_loader.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/mf/topology_loader.c b/dlls/mf/topology_loader.c index 09fb9322261..4560e3a578d 100644 --- a/dlls/mf/topology_loader.c +++ b/dlls/mf/topology_loader.c @@ -281,8 +281,13 @@ static HRESULT topology_branch_connect_indirect(IMFTopology *topology, MF_CONNEC if (FAILED(hr = MFCreateTopologyNode(MF_TOPOLOGY_TRANSFORM_NODE, &node))) return hr; - if (decoder) + if (!decoder) + method_mask = MF_CONNECT_DIRECT; + else + { IMFTopologyNode_SetUINT32(node, &MF_TOPONODE_DECODER, 1); + method_mask = MF_CONNECT_ALLOW_CONVERTER; + } if (FAILED(hr = MFTEnumEx(category, MFT_ENUM_FLAG_ALL, &input_info, decoder ? NULL : &output_info, &activates, &count))) return hr; @@ -307,11 +312,13 @@ static HRESULT topology_branch_connect_indirect(IMFTopology *topology, MF_CONNEC hr = topology_branch_fill_media_type(up_type, down_type); if (SUCCEEDED(hr)) hr = IMFTransform_SetOutputType(transform, 0, down_type, 0); + if (SUCCEEDED(hr)) + method_mask = MF_CONNECT_DIRECT; } IMFTransform_Release(transform); if (SUCCEEDED(hr)) - hr = topology_branch_connect(topology, decoder ? MF_CONNECT_ALLOW_CONVERTER : MF_CONNECT_DIRECT, &down_branch); + hr = topology_branch_connect(topology, method_mask, &down_branch); if (SUCCEEDED(hr)) hr = IMFTopology_AddNode(topology, node); if (SUCCEEDED(hr))
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
60
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Results per page:
10
25
50
100
200