Commit Graph

13 Commits

Author SHA1 Message Date
Alexandre Julliard 088a787a2c makefiles: Make -mno-cygwin the default.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Rémi Bernon f5ca06016d plugplay: Broadcast WM_DEVICECHANGE message asynchronously.
It may otherwise trigger a nasty race condition, where:

1) For explorer.exe to register the CLSID_ShellWindows classes, it
   needs RpcSS service to be started,

2) services.exe may start WinePlugPlay service group first, waiting for
   its startup to complete,

3) during startup and early device enumeration, hidclass.sys may call
   IoSetDeviceInterfaceState, which calls plugplay_send_event [1],

4) plugplay_send_event tries to broadcast a WM_DEVICECHANGE message with
   BSF_QUERY, waiting for the individual threads to reply,

5) which times-out because window threads are waiting on explorer.exe
   to create its desktop window and reply to the WM_NULL SendMessage.

This happens more likely as there is threads with message queues
being started, each waiting on the desktop window to reply. Usually
explorer.exe is able to reply to some messages with the implicit
message processing while creating its window, but not all of them.

[1] Not completely sure how, it looks like some RPC too, but before
    RpcSs is started?

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 23:01:38 +01:00
Arkadiusz Hiler 743c266e64 plugplay: Send WM_DEVICECHANGE with DBT_DEVNODES_CHANGED with each event.
Windows sends *a lot* of those messages whenever there's a device / drive /
etc. appearing or disappearing.

This fixes controller hotplug in Doom (2016).

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 21:23:27 +01:00
Michael Stefaniuc d638cca0fe plugplay: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 10:40:09 +02:00
Zebediah Figura 7addca95b5 ntoskrnl.exe: Move the BroadcastSystemMessage() call to plugplay_send_event().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 10:49:18 +02:00
Zebediah Figura d80101f17a ntoskrnl.exe: Broadcast device notifications to registered handlers.
Based on a patch by Micah N Gorrell.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 10:48:06 +02:00
Zebediah Figura 6cf777ebd5 sechost: Implement I_ScRegisterDeviceNotification().
Based on a patch by Micah N Gorrell.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 10:47:45 +02:00
Alexandre Julliard ed6a5e97e0 programs: Make all program entrypoints cdecl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 17:05:47 +02:00
Alexandre Julliard 76e6883a5e makefiles: Build stub services with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 11:32:32 +02:00
Alexandre Julliard 86b1f94d28 makefiles: Get rid of the MAKE_PROG_RULES variable. 2014-01-02 12:12:57 +01:00
Alexandre Julliard c9eee73450 makefiles: Define __WINESRC__ when building programs. 2012-01-23 16:07:37 +01:00
Alexandre Julliard da35622b83 makefiles: Disable use of Unicode macros globally for all the programs. 2012-01-20 13:14:16 +01:00
Hans Leidekker 2133b6c38d programs: Add a stubbed PlugPlay service. 2011-01-31 17:39:49 +01:00