wineconsole: Use IOCTL_CONDRV_GET_RENDERER_EVENTS to fetch events.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
845156cc3d
commit
a0d325333f
|
@ -243,20 +243,20 @@ static void WINECON_SetColors(struct inner_data *data, const struct config_data*
|
||||||
void WINECON_GrabChanges(struct inner_data* data)
|
void WINECON_GrabChanges(struct inner_data* data)
|
||||||
{
|
{
|
||||||
struct console_renderer_event evts[256];
|
struct console_renderer_event evts[256];
|
||||||
int i, num, ev_found;
|
int i, ev_found;
|
||||||
|
DWORD num;
|
||||||
HANDLE h;
|
HANDLE h;
|
||||||
|
|
||||||
if (data->in_grab_changes) return;
|
if (data->in_grab_changes) return;
|
||||||
|
|
||||||
SERVER_START_REQ( get_console_renderer_events )
|
if (!DeviceIoControl( data->hSynchro, IOCTL_CONDRV_GET_RENDERER_EVENTS, NULL, 0, evts,
|
||||||
|
sizeof(evts), &num, NULL ) || !num)
|
||||||
{
|
{
|
||||||
wine_server_set_reply( req, evts, sizeof(evts) );
|
ERR( "failed to get renderer events: %u\n", GetLastError() );
|
||||||
req->handle = wine_server_obj_handle( data->hSynchro );
|
data->dying = TRUE;
|
||||||
if (!wine_server_call_err( req )) num = wine_server_reply_size(reply) / sizeof(evts[0]);
|
return;
|
||||||
else num = 0;
|
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
num /= sizeof(*evts);
|
||||||
if (!num) {WINE_WARN("hmm renderer signaled but no events available\n"); return;}
|
|
||||||
WINE_TRACE( "got %u events\n", num );
|
WINE_TRACE( "got %u events\n", num );
|
||||||
|
|
||||||
/* FIXME: should do some event compression here (cursor pos, update) */
|
/* FIXME: should do some event compression here (cursor pos, update) */
|
||||||
|
|
Loading…
Reference in New Issue