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
February 2021
----- 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
2 participants
915 discussions
Start a n
N
ew thread
Zebediah Figura : ntoskrnl: Retrieve information from the user I/O status block for PnP IRPs.
by Alexandre Julliard
11 Feb '21
11 Feb '21
Module: wine Branch: master Commit: 71f71edd8d9eeb341d84ca37b0592f58ec987252 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=71f71edd8d9eeb341d84ca37…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Feb 10 21:42:37 2021 -0600 ntoskrnl: Retrieve information from the user I/O status block for PnP IRPs. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/pnp.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c index 713e469ee7e..04e442a8300 100644 --- a/dlls/ntoskrnl.exe/pnp.c +++ b/dlls/ntoskrnl.exe/pnp.c @@ -80,28 +80,20 @@ static NTSTATUS WINAPI internal_complete( DEVICE_OBJECT *device, IRP *irp, void return STATUS_MORE_PROCESSING_REQUIRED; } -static NTSTATUS send_device_irp( DEVICE_OBJECT *device, IRP *irp, ULONG_PTR *info ) +static void send_device_irp( DEVICE_OBJECT *device, IRP *irp ) { HANDLE event = CreateEventA( NULL, FALSE, FALSE, NULL ); DEVICE_OBJECT *toplevel_device; - NTSTATUS status; irp->IoStatus.u.Status = STATUS_NOT_SUPPORTED; IoSetCompletionRoutine( irp, internal_complete, event, TRUE, TRUE, TRUE ); toplevel_device = IoGetAttachedDeviceReference( device ); - status = IoCallDriver( toplevel_device, irp ); - - if (status == STATUS_PENDING) + if (IoCallDriver( toplevel_device, irp ) == STATUS_PENDING) WaitForSingleObject( event, INFINITE ); - - status = irp->IoStatus.u.Status; - if (info) - *info = irp->IoStatus.Information; IoCompleteRequest( irp, IO_NO_INCREMENT ); ObDereferenceObject( toplevel_device ); CloseHandle( event ); - return status; } static NTSTATUS get_device_id( DEVICE_OBJECT *device, BUS_QUERY_ID_TYPE type, WCHAR **id ) @@ -119,7 +111,9 @@ static NTSTATUS get_device_id( DEVICE_OBJECT *device, BUS_QUERY_ID_TYPE type, WC irpsp->MinorFunction = IRP_MN_QUERY_ID; irpsp->Parameters.QueryId.IdType = type; - return send_device_irp( device, irp, (ULONG_PTR *)id ); + send_device_irp( device, irp ); + *id = (WCHAR *)irp_status.Information; + return irp_status.u.Status; } static NTSTATUS send_pnp_irp( DEVICE_OBJECT *device, UCHAR minor ) @@ -139,7 +133,8 @@ static NTSTATUS send_pnp_irp( DEVICE_OBJECT *device, UCHAR minor ) irpsp->Parameters.StartDevice.AllocatedResources = NULL; irpsp->Parameters.StartDevice.AllocatedResourcesTranslated = NULL; - return send_device_irp( device, irp, NULL ); + send_device_irp( device, irp ); + return irp_status.u.Status; } static NTSTATUS get_device_instance_id( DEVICE_OBJECT *device, WCHAR *buffer ) @@ -172,7 +167,7 @@ static NTSTATUS get_device_instance_id( DEVICE_OBJECT *device, WCHAR *buffer ) return STATUS_SUCCESS; } -static NTSTATUS send_power_irp( DEVICE_OBJECT *device, DEVICE_POWER_STATE power ) +static void send_power_irp( DEVICE_OBJECT *device, DEVICE_POWER_STATE power ) { IO_STATUS_BLOCK irp_status; IO_STACK_LOCATION *irpsp; @@ -189,7 +184,7 @@ static NTSTATUS send_power_irp( DEVICE_OBJECT *device, DEVICE_POWER_STATE power irpsp->Parameters.Power.Type = DevicePowerState; irpsp->Parameters.Power.State.DeviceState = power; - return send_device_irp( device, irp, NULL ); + send_device_irp( device, irp ); } static void load_function_driver( DEVICE_OBJECT *device, HDEVINFO set, SP_DEVINFO_DATA *sp_device ) @@ -393,7 +388,6 @@ static void handle_bus_relations( DEVICE_OBJECT *parent ) DEVICE_RELATIONS *relations; IO_STATUS_BLOCK irp_status; IO_STACK_LOCATION *irpsp; - NTSTATUS status; HDEVINFO set; IRP *irp; ULONG i; @@ -413,9 +407,11 @@ static void handle_bus_relations( DEVICE_OBJECT *parent ) irpsp = IoGetNextIrpStackLocation( irp ); irpsp->MinorFunction = IRP_MN_QUERY_DEVICE_RELATIONS; irpsp->Parameters.QueryDeviceRelations.Type = BusRelations; - if ((status = send_device_irp( parent, irp, (ULONG_PTR *)&relations ))) + send_device_irp( parent, irp ); + relations = (DEVICE_RELATIONS *)irp_status.Information; + if (irp_status.u.Status) { - ERR("Failed to enumerate child devices, status %#x.\n", status); + ERR("Failed to enumerate child devices, status %#x.\n", irp_status.u.Status); SetupDiDestroyDeviceInfoList( set ); return; }
1
0
0
0
Zebediah Figura : ntoskrnl: Copy the IRP I/O status block to the user I/O status block in IoCompleteRequest().
by Alexandre Julliard
11 Feb '21
11 Feb '21
Module: wine Branch: master Commit: c4cd339a21555def8eb64794f226a129718a8390 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c4cd339a21555def8eb64794…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Feb 10 21:42:36 2021 -0600 ntoskrnl: Copy the IRP I/O status block to the user I/O status block in IoCompleteRequest(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 1 + dlls/ntoskrnl.exe/tests/driver.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 9dc5809614a..1829188680d 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -1941,6 +1941,7 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost ) if (irp->Flags & IRP_DEALLOCATE_BUFFER) HeapFree( GetProcessHeap(), 0, irp->AssociatedIrp.SystemBuffer ); + if (irp->UserIosb) *irp->UserIosb = irp->IoStatus; if (irp->UserEvent) KeSetEvent( irp->UserEvent, IO_NO_INCREMENT, FALSE ); IoFreeIrp( irp ); diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index eb4620ad25d..f9329adfc54 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -877,8 +877,8 @@ static void test_call_driver(DEVICE_OBJECT *device) irp->IoStatus.Status = STATUS_SUCCESS; irp->IoStatus.Information = 123; IoCompleteRequest(irp, IO_NO_INCREMENT); - todo_wine ok(iosb.Status == STATUS_SUCCESS, "got status %#x\n", iosb.Status); - todo_wine ok(iosb.Information == 123, "got information %#x\n", iosb.Information); + ok(iosb.Status == STATUS_SUCCESS, "got status %#x\n", iosb.Status); + ok(iosb.Information == 123, "got information %#x\n", iosb.Information); KeInitializeEvent(&event, NotificationEvent, FALSE);
1
0
0
0
Zebediah Figura : ntoskrnl/tests: Test the contents of the user IO_STATUS_BLOCK.
by Alexandre Julliard
11 Feb '21
11 Feb '21
Module: wine Branch: master Commit: eb5d94953a0717629cbca8211b561fda1e30e0b6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eb5d94953a0717629cbca821…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Feb 10 21:42:35 2021 -0600 ntoskrnl/tests: Test the contents of the user IO_STATUS_BLOCK. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/tests/driver.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 5617342d803..eb4620ad25d 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -846,6 +846,8 @@ static void test_call_driver(DEVICE_OBJECT *device) KEVENT event; NTSTATUS status; + iosb.Status = 0xdeadbeef; + iosb.Information = 0xdeadbeef; irp = IoBuildAsynchronousFsdRequest(IRP_MJ_FLUSH_BUFFERS, device, NULL, 0, NULL, &iosb); ok(irp->UserIosb == &iosb, "unexpected UserIosb\n"); ok(!irp->Cancel, "Cancel = %x\n", irp->Cancel); @@ -854,6 +856,10 @@ static void test_call_driver(DEVICE_OBJECT *device) ok(irp->CurrentLocation == 2, "CurrentLocation = %u\n", irp->CurrentLocation); ok(irp->Tail.Overlay.Thread == (PETHREAD)KeGetCurrentThread(), "IRP thread is not the current thread\n"); + ok(!irp->IoStatus.Status, "got status %#x\n", irp->IoStatus.Status); + ok(!irp->IoStatus.Information, "got information %#x\n", irp->IoStatus.Information); + ok(iosb.Status == 0xdeadbeef, "got status %#x\n", iosb.Status); + ok(iosb.Information == 0xdeadbeef, "got information %#x\n", iosb.Information); irpsp = IoGetNextIrpStackLocation(irp); ok(irpsp->MajorFunction == IRP_MJ_FLUSH_BUFFERS, "MajorFunction = %u\n", irpsp->MajorFunction); @@ -863,10 +869,16 @@ static void test_call_driver(DEVICE_OBJECT *device) status = IoCallDriver(device, irp); ok(status == STATUS_PENDING, "IoCallDriver returned %#x\n", status); + ok(!irp->IoStatus.Status, "got status %#x\n", irp->IoStatus.Status); + ok(!irp->IoStatus.Information, "got information %#x\n", irp->IoStatus.Information); + ok(iosb.Status == 0xdeadbeef, "got status %#x\n", iosb.Status); + ok(iosb.Information == 0xdeadbeef, "got information %#x\n", iosb.Information); irp->IoStatus.Status = STATUS_SUCCESS; - irp->IoStatus.Information = 0; + irp->IoStatus.Information = 123; IoCompleteRequest(irp, IO_NO_INCREMENT); + todo_wine ok(iosb.Status == STATUS_SUCCESS, "got status %#x\n", iosb.Status); + todo_wine ok(iosb.Information == 123, "got information %#x\n", iosb.Information); KeInitializeEvent(&event, NotificationEvent, FALSE);
1
0
0
0
Brendan Shanks : dinput: Map Xbox One controller triggers (accelerator/brake) to Rx/Ry on Mac.
by Alexandre Julliard
11 Feb '21
11 Feb '21
Module: wine Branch: master Commit: e9dda86273ed0e6946f6c0048ded372b60836fdd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e9dda86273ed0e6946f6c004…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Thu Feb 11 11:21:21 2021 -0800 dinput: Map Xbox One controller triggers (accelerator/brake) to Rx/Ry on Mac. Signed-off-by: Brendan Shanks <bshanks(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/joystick_osx.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c index bd39ca41b51..805b75639fe 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c @@ -621,6 +621,7 @@ static void get_osx_device_elements(JoystickImpl *device, uint64_t axis_map[8]) IOHIDElementRef device_main_element; CFMutableArrayRef elements; DWORD sliders = 0; + BOOL use_accel_brake_for_rx_ry = TRUE; TRACE("device %p device->id %d\n", device, device->id); @@ -644,6 +645,23 @@ static void get_osx_device_elements(JoystickImpl *device, uint64_t axis_map[8]) CFMutableArrayRef buttons = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); CFMutableArrayRef povs = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); + /* Scan the elements to see if Rx/Ry is present, if not then Accelerator/Brake can be mapped to it. + * (Xbox One controller triggers use accelerator/brake) + */ + for ( idx = 0; idx < cnt; idx++ ) + { + IOHIDElementRef element = ( IOHIDElementRef ) CFArrayGetValueAtIndex( elements, idx ); + IOHIDElementType type = IOHIDElementGetType( element ); + uint32_t usage_page = IOHIDElementGetUsagePage( element ); + uint32_t usage = IOHIDElementGetUsage( element ); + + if (type == kIOHIDElementTypeInput_Misc && usage_page == kHIDPage_GenericDesktop && + (usage == kHIDUsage_GD_Rx || usage == kHIDUsage_GD_Ry)) + { + use_accel_brake_for_rx_ry = FALSE; + } + } + for ( idx = 0; idx < cnt; idx++ ) { IOHIDElementRef element = ( IOHIDElementRef ) CFArrayGetValueAtIndex( elements, idx ); @@ -701,7 +719,17 @@ static void get_osx_device_elements(JoystickImpl *device, uint64_t axis_map[8]) case MAKEUINT64(kHIDPage_GenericDesktop, kHIDUsage_GD_Rx): case MAKEUINT64(kHIDPage_GenericDesktop, kHIDUsage_GD_Ry): case MAKEUINT64(kHIDPage_GenericDesktop, kHIDUsage_GD_Rz): + case MAKEUINT64(kHIDPage_Simulation, kHIDUsage_Sim_Accelerator): + case MAKEUINT64(kHIDPage_Simulation, kHIDUsage_Sim_Brake): { + if (usage == kHIDUsage_Sim_Accelerator || usage == kHIDUsage_Sim_Brake) + { + if (use_accel_brake_for_rx_ry) + TRACE("Using Sim_Accelerator/Brake for GD_Rx/Ry\n"); + else + break; + } + TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_* (%d)\n", usage); axis_map[CFArrayGetCount(axes)]=MAKEUINT64(usage_page, usage); CFArrayAppendValue(axes, element); @@ -864,6 +892,8 @@ static void poll_osx_device_state(LPDIRECTINPUTDEVICE8A iface) case MAKEUINT64(kHIDPage_GenericDesktop, kHIDUsage_GD_Ry): case MAKEUINT64(kHIDPage_GenericDesktop, kHIDUsage_GD_Rz): case MAKEUINT64(kHIDPage_GenericDesktop, kHIDUsage_GD_Slider): + case MAKEUINT64(kHIDPage_Simulation, kHIDUsage_Sim_Accelerator): + case MAKEUINT64(kHIDPage_Simulation, kHIDUsage_Sim_Brake): { int wine_obj = -1; @@ -895,12 +925,14 @@ static void poll_osx_device_state(LPDIRECTINPUTDEVICE8A iface) device->generic.js.lZ = newVal; break; case MAKEUINT64(kHIDPage_GenericDesktop, kHIDUsage_GD_Rx): + case MAKEUINT64(kHIDPage_Simulation, kHIDUsage_Sim_Accelerator): TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_Rx\n"); wine_obj = 3; oldVal = device->generic.js.lRx; device->generic.js.lRx = newVal; break; case MAKEUINT64(kHIDPage_GenericDesktop, kHIDUsage_GD_Ry): + case MAKEUINT64(kHIDPage_Simulation, kHIDUsage_Sim_Brake): TRACE("kIOHIDElementTypeInput_Misc / kHIDUsage_GD_Ry\n"); wine_obj = 4; oldVal = device->generic.js.lRy; @@ -1200,10 +1232,12 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput, has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_Z); break; case MAKEUINT64(kHIDPage_GenericDesktop, kHIDUsage_GD_Rx): + case MAKEUINT64(kHIDPage_Simulation, kHIDUsage_Sim_Accelerator): wine_obj = 3; has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_RX); break; case MAKEUINT64(kHIDPage_GenericDesktop, kHIDUsage_GD_Ry): + case MAKEUINT64(kHIDPage_Simulation, kHIDUsage_Sim_Brake): wine_obj = 4; has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_RY); break;
1
0
0
0
Brendan Shanks : dinput: On Mac, always use both HID usage page and usage for comparisons.
by Alexandre Julliard
11 Feb '21
11 Feb '21
Module: wine Branch: master Commit: e8332dece8209d331285622f4e960f27e328bd3e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e8332dece8209d331285622f…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Thu Feb 11 11:21:20 2021 -0800 dinput: On Mac, always use both HID usage page and usage for comparisons. Signed-off-by: Brendan Shanks <bshanks(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/joystick_osx.c | 77 ++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 37 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e8332dece8209d331285…
1
0
0
0
Henri Verbeet : wined3d: Add some TRACEs to command stream callbacks.
by Alexandre Julliard
11 Feb '21
11 Feb '21
Module: wine Branch: master Commit: 7ba0cc908506b821abef10ea2748e55d9de10787 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7ba0cc908506b821abef10ea…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Feb 11 11:52:16 2021 +0100 wined3d: Add some TRACEs to command stream callbacks. I.e., those used with wined3d_cs_init_object() and wined3d_cs_destroy_object(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/adapter_gl.c | 6 ++++++ dlls/wined3d/adapter_vk.c | 6 ++++++ dlls/wined3d/buffer.c | 2 ++ dlls/wined3d/device.c | 4 ++++ dlls/wined3d/palette.c | 2 ++ dlls/wined3d/query.c | 2 ++ dlls/wined3d/resource.c | 2 ++ dlls/wined3d/sampler.c | 4 ++++ dlls/wined3d/shader.c | 4 ++++ dlls/wined3d/state.c | 6 ++++++ dlls/wined3d/swapchain.c | 2 ++ dlls/wined3d/texture.c | 2 ++ dlls/wined3d/vertexdeclaration.c | 2 ++ dlls/wined3d/view.c | 12 ++++++++++++ 14 files changed, 56 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7ba0cc908506b821abef…
1
0
0
0
Henri Verbeet : wined3d: Create the backbuffer rendertarget view only after calling adapter_init_3d().
by Alexandre Julliard
11 Feb '21
11 Feb '21
Module: wine Branch: master Commit: b9a440d15d84e7967f70b38291d2f85767fb7a6f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b9a440d15d84e7967f70b382…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Feb 11 11:52:15 2021 +0100 wined3d: Create the backbuffer rendertarget view only after calling adapter_init_3d(). Otherwise we may not be able to acquire a context to create the view. In practice, this is only an issue for d3d9 and earlier in combination with the Vulkan backend. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index a400221ee30..f61708219ac 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1088,6 +1088,24 @@ HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device, str if (device->d3d_initialized) return WINED3DERR_INVALIDCALL; + device->swapchain_count = 1; + if (!(device->swapchains = heap_calloc(device->swapchain_count, sizeof(*device->swapchains)))) + { + ERR("Failed to allocate swapchain array.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + device->swapchains[0] = swapchain; + + for (i = 0; i < ARRAY_SIZE(device->state.fb.render_targets); ++i) + if (device->state.fb.render_targets[i]) + wined3d_rtv_bind_count_dec(device->state.fb.render_targets[i]); + + memset(device->state.fb.render_targets, 0, sizeof(device->state.fb.render_targets)); + if (FAILED(hr = device->adapter->adapter_ops->adapter_init_3d(device))) + goto err_out; + device->d3d_initialized = TRUE; + swapchain_desc = &swapchain->state.desc; if (swapchain_desc->backbuffer_count && swapchain_desc->backbuffer_bind_flags & WINED3D_BIND_RENDER_TARGET) { @@ -1104,28 +1122,12 @@ HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device, str NULL, &wined3d_null_parent_ops, &device->back_buffer_view))) { ERR("Failed to create rendertarget view, hr %#x.\n", hr); - return hr; + device->adapter->adapter_ops->adapter_uninit_3d(device); + device->d3d_initialized = FALSE; + goto err_out; } } - device->swapchain_count = 1; - if (!(device->swapchains = heap_calloc(device->swapchain_count, sizeof(*device->swapchains)))) - { - ERR("Failed to allocate swapchain array.\n"); - hr = E_OUTOFMEMORY; - goto err_out; - } - device->swapchains[0] = swapchain; - - for (i = 0; i < ARRAY_SIZE(device->state.fb.render_targets); ++i) - if (device->state.fb.render_targets[i]) - wined3d_rtv_bind_count_dec(device->state.fb.render_targets[i]); - - memset(device->state.fb.render_targets, 0, sizeof(device->state.fb.render_targets)); - if (FAILED(hr = device->adapter->adapter_ops->adapter_init_3d(device))) - goto err_out; - device->d3d_initialized = TRUE; - device_init_swapchain_state(device, swapchain); TRACE("All defaults now set up.\n"); @@ -1147,11 +1149,6 @@ err_out: heap_free(device->swapchains); device->swapchains = NULL; device->swapchain_count = 0; - if (device->back_buffer_view) - { - wined3d_rendertarget_view_decref(device->back_buffer_view); - device->back_buffer_view = NULL; - } return hr; }
1
0
0
0
Alexandre Julliard : server: Remove the load/unload_dll requests and the dll list.
by Alexandre Julliard
11 Feb '21
11 Feb '21
Module: wine Branch: master Commit: e7fa4fd14702d008431bed68a548037d606ef7a2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e7fa4fd14702d008431bed68…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 11 16:19:40 2021 +0100 server: Remove the load/unload_dll requests and the dll list. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loader.c | 19 --------- include/wine/server_protocol.h | 36 +---------------- server/process.c | 87 ------------------------------------------ server/process.h | 10 ----- server/protocol.def | 14 ------- server/request.h | 9 ----- server/trace.c | 19 +-------- 7 files changed, 2 insertions(+), 192 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e7fa4fd14702d008431b…
1
0
0
0
Alexandre Julliard : ntdll/tests: Relax a broken result on Windows.
by Alexandre Julliard
11 Feb '21
11 Feb '21
Module: wine Branch: master Commit: 7c85b365d109dfe7dcb947b9377e96d3e78724c3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7c85b365d109dfe7dcb947b9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 11 15:27:58 2021 +0100 ntdll/tests: Relax a broken result on Windows. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/om.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 1878a480cb8..e93f11e1126 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -2500,7 +2500,7 @@ static void test_object_types(void) memset( info, 0xcc, sizeof(*info) ); status = pNtQueryObject( NULL, ObjectTypesInformation, info, len, &retlen ); ok( retlen <= len + 16, "wrong len %x/%x\n", len, retlen ); - ok( len == retlen || broken( retlen == len + 16 || retlen == len - 16 ), /* wow64 */ + ok( len == retlen || broken( retlen >= len - 32 && retlen <= len + 32 ), /* wow64 */ "wrong len %x/%x\n", len, retlen ); ok( !status, "NtQueryObject failed %x\n", status ); if (!status)
1
0
0
0
Alexandre Julliard : ntdll: Close the debug port on thread exit.
by Alexandre Julliard
11 Feb '21
11 Feb '21
Module: wine Branch: master Commit: 7163c78234ecce7e2b5aa531927f573c7d4e5d54 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7163c78234ecce7e2b5aa531…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 11 14:17:03 2021 +0100 ntdll: Close the debug port on thread exit. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/debugger.c | 95 ++++++++++++++++++++++++++++++++++++++---- dlls/ntdll/loader.c | 2 + dlls/ntdll/thread.c | 1 - 3 files changed, 90 insertions(+), 8 deletions(-) diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c index 55bcd62f379..118984eec75 100644 --- a/dlls/kernel32/tests/debugger.c +++ b/dlls/kernel32/tests/debugger.c @@ -1779,12 +1779,49 @@ static char *cmd; static DWORD WINAPI debug_and_exit(void *arg) { STARTUPINFOA si = { sizeof(si) }; + HANDLE debug; + ULONG val = 0; + NTSTATUS status; BOOL ret; ret = CreateProcessA(NULL, cmd, NULL, NULL, TRUE, DEBUG_PROCESS, NULL, NULL, &si, &pi); ok(ret, "CreateProcess failed, last error %#x.\n", GetLastError()); + debug = pDbgUiGetThreadDebugObject(); + status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, + &val, sizeof(val), NULL ); + ok( !status, "NtSetInformationDebugObject failed %x\n", status ); + *(HANDLE *)arg = debug; Sleep(200); + ExitThread(0); +} + +static DWORD WINAPI debug_and_wait(void *arg) +{ + STARTUPINFOA si = { sizeof(si) }; + HANDLE debug = *(HANDLE *)arg; + ULONG val = 0; + NTSTATUS status; + BOOL ret; + + pDbgUiSetThreadDebugObject( debug ); + ret = CreateProcessA(NULL, cmd, NULL, NULL, TRUE, DEBUG_PROCESS, NULL, NULL, &si, &pi); + ok(ret, "CreateProcess failed, last error %#x.\n", GetLastError()); + debug = pDbgUiGetThreadDebugObject(); + status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, + &val, sizeof(val), NULL ); + ok( !status, "NtSetInformationDebugObject failed %x\n", status ); + Sleep(INFINITE); + ExitThread(0); +} + +static DWORD WINAPI create_debug_port(void *arg) +{ + STARTUPINFOA si = { sizeof(si) }; + NTSTATUS status = pDbgUiConnectToDbg(); + + ok( !status, "DbgUiConnectToDbg failed %x\n", status ); *(HANDLE *)arg = pDbgUiGetThreadDebugObject(); + Sleep( INFINITE ); ExitThread(0); } @@ -1844,19 +1881,23 @@ static void test_kill_on_exit(const char *argv0) exit_code = run_child_wait( cmd, event ); ok( exit_code == STATUS_DEBUGGER_INACTIVE, "exit code = %08x\n", exit_code); - /* test that threads don't close the debug port on exit */ + /* test that threads close the debug port on exit */ thread = CreateThread(NULL, 0, debug_and_exit, &debug, 0, &tid); WaitForSingleObject( thread, 1000 ); ok( debug != 0, "no debug port\n" ); - SetEvent( event ); - WaitForSingleObject( pi.hProcess, 100 ); - GetExitCodeProcess( pi.hProcess, &exit_code ); - ok( exit_code == STILL_ACTIVE, "exit code = %08x\n", exit_code); val = 0; status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, &val, sizeof(val), NULL ); - ok( !status, "NtSetInformationDebugObject failed %x\n", status ); - CloseHandle( debug ); + ok( status == STATUS_INVALID_HANDLE || broken(status == STATUS_SUCCESS), /* wow64 */ + "NtSetInformationDebugObject failed %x\n", status ); + SetEvent( event ); + if (!status) + { + WaitForSingleObject( pi.hProcess, 100 ); + GetExitCodeProcess( pi.hProcess, &exit_code ); + ok( exit_code == STILL_ACTIVE, "exit code = %08x\n", exit_code); + CloseHandle( debug ); + } WaitForSingleObject( pi.hProcess, 1000 ); GetExitCodeProcess( pi.hProcess, &exit_code ); ok( exit_code == 0, "exit code = %08x\n", exit_code); @@ -1864,6 +1905,46 @@ static void test_kill_on_exit(const char *argv0) CloseHandle( pi.hThread ); CloseHandle( thread ); + /* but not on forced exit */ + status = pNtCreateDebugObject( &debug, DEBUG_ALL_ACCESS, &attr, DEBUG_KILL_ON_CLOSE ); + ok( !status, "NtCreateDebugObject failed %x\n", status ); + thread = CreateThread(NULL, 0, debug_and_wait, &debug, 0, &tid); + Sleep( 100 ); + ok( debug != 0, "no debug port\n" ); + val = 1; + status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, + &val, sizeof(val), NULL ); + ok( status == STATUS_SUCCESS, "NtSetInformationDebugObject failed %x\n", status ); + TerminateThread( thread, 0 ); + status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, + &val, sizeof(val), NULL ); + ok( status == STATUS_SUCCESS, "NtSetInformationDebugObject failed %x\n", status ); + WaitForSingleObject( pi.hProcess, 300 ); + GetExitCodeProcess( pi.hProcess, &exit_code ); + todo_wine + ok( exit_code == STATUS_DEBUGGER_INACTIVE || broken(exit_code == STILL_ACTIVE), /* wow64 */ + "exit code = %08x\n", exit_code); + CloseHandle( pi.hProcess ); + CloseHandle( pi.hThread ); + CloseHandle( thread ); + CloseHandle( debug ); + + debug = 0; + thread = CreateThread(NULL, 0, create_debug_port, &debug, 0, &tid); + Sleep(100); + ok( debug != 0, "no debug port\n" ); + val = 0; + status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, + &val, sizeof(val), NULL ); + ok( status == STATUS_SUCCESS, "NtSetInformationDebugObject failed %x\n", status ); + TerminateThread( thread, 0 ); + status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, + &val, sizeof(val), NULL ); + ok( status == STATUS_SUCCESS, "NtSetInformationDebugObject failed %x\n", status ); + CloseHandle( debug ); + CloseHandle( thread ); + + CloseHandle( event ); heap_free(cmd); } diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 378b812868c..84cb7a04ba0 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -3278,6 +3278,8 @@ void WINAPI LdrShutdownThread(void) RtlReleasePebLock(); RtlLeaveCriticalSection( &loader_section ); + if (DbgUiGetThreadDebugObject()) NtClose( DbgUiGetThreadDebugObject() ); + RtlFreeThreadActivationContextStack(); } diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 8e5a3a3a3a3..425e8770294 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -85,7 +85,6 @@ void WINAPI RtlExitUserThread( ULONG status ) NtQueryInformationThread( GetCurrentThread(), ThreadAmILastThread, &last, sizeof(last), NULL ); if (last) RtlExitUserProcess( status ); LdrShutdownThread(); - RtlFreeThreadActivationContextStack(); for (;;) NtTerminateThread( GetCurrentThread(), status ); }
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
92
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Results per page:
10
25
50
100
200