Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> --- The overall goal of this patchset is to avoid letting the system go to sleep when a joystick is being used. On Windows, receiving input from a joystick which is currently being read by dinput can be easily shown to reset the system idle timer. dlls/dinput/device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 7b83a39..fc43fb5 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -39,6 +39,8 @@ #include "device_private.h" #include "dinput_private.h" +#define WM_WINE_NOTIFY_ACTIVITY WM_USER + WINE_DEFAULT_DEBUG_CHANNEL(dinput); static inline IDirectInputDeviceImpl *impl_from_IDirectInputDevice8A(IDirectInputDevice8A *iface) @@ -968,6 +970,8 @@ void queue_event(LPDIRECTINPUTDEVICE8A iface, int inst_id, DWORD data, DWORD tim } } + SendMessageW(GetDesktopWindow(), WM_WINE_NOTIFY_ACTIVITY, 0, 0); + This->queue_head = next_pos; /* Send event if asked */ } -- 2.7.4