Commit 743c266e authored by Arkadiusz Hiler's avatar Arkadiusz Hiler Committed by Alexandre Julliard

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: 's avatarArkadiusz Hiler <ahiler@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent b4abe388
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include <dbt.h>
#include "winsvc.h" #include "winsvc.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/list.h" #include "wine/list.h"
...@@ -142,6 +143,7 @@ void __cdecl plugplay_send_event( DWORD code, const BYTE *data, unsigned int siz ...@@ -142,6 +143,7 @@ void __cdecl plugplay_send_event( DWORD code, const BYTE *data, unsigned int siz
struct event *event; struct event *event;
BroadcastSystemMessageW( BSF_FORCEIFHUNG | BSF_QUERY, NULL, WM_DEVICECHANGE, code, (LPARAM)data ); BroadcastSystemMessageW( BSF_FORCEIFHUNG | BSF_QUERY, NULL, WM_DEVICECHANGE, code, (LPARAM)data );
BroadcastSystemMessageW( BSF_FORCEIFHUNG | BSF_QUERY, NULL, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED, 0 );
EnterCriticalSection( &plugplay_cs ); EnterCriticalSection( &plugplay_cs );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment