mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 07:57:22 +00:00
dinput: Notify the desktop window when device input is received.
Avoids letting the display go to sleep while a joystick is being used. Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d4eeb162bb
commit
3edbb2a4fd
|
@ -39,6 +39,8 @@
|
||||||
#include "device_private.h"
|
#include "device_private.h"
|
||||||
#include "dinput_private.h"
|
#include "dinput_private.h"
|
||||||
|
|
||||||
|
#define WM_WINE_NOTIFY_ACTIVITY WM_USER
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(dinput);
|
WINE_DEFAULT_DEBUG_CHANNEL(dinput);
|
||||||
|
|
||||||
static inline IDirectInputDeviceImpl *impl_from_IDirectInputDevice8A(IDirectInputDevice8A *iface)
|
static inline IDirectInputDeviceImpl *impl_from_IDirectInputDevice8A(IDirectInputDevice8A *iface)
|
||||||
|
@ -935,6 +937,8 @@ void queue_event(LPDIRECTINPUTDEVICE8A iface, int inst_id, DWORD data, DWORD tim
|
||||||
/* Event is being set regardless of the queue state */
|
/* Event is being set regardless of the queue state */
|
||||||
if (This->hEvent) SetEvent(This->hEvent);
|
if (This->hEvent) SetEvent(This->hEvent);
|
||||||
|
|
||||||
|
PostMessageW(GetDesktopWindow(), WM_WINE_NOTIFY_ACTIVITY, 0, 0);
|
||||||
|
|
||||||
if (!This->queue_len || This->overflow || ofs < 0) return;
|
if (!This->queue_len || This->overflow || ofs < 0) return;
|
||||||
|
|
||||||
next_pos = (This->queue_head + 1) % This->queue_len;
|
next_pos = (This->queue_head + 1) % This->queue_len;
|
||||||
|
|
Loading…
Reference in a new issue