[PATCH 1/6] server: Add server-side raw input functions definitions

Vincas Miliūnas vincas.miliunas at gmail.com
Tue Jun 14 03:45:04 CDT 2011


This is a partial raw input implementation for mouse and keyboard.

I've read in the IRC chat, that products of tools/make_request should not be included in a patch, so I left them out.

My first attempts were by leeching input events from queue_mouse_message and queue_keyboard_message functions, but I couldn't get mouse cursor movement right. Instead, I copied the way dinput receives input - by installing low level hooks and forwarding input to the server. This is just to get "try 1" out of the door. Of course, it would be better if the input feed would be server-side only.

I hit a very weird bug, where in peek_message function, info.msg.lParam was impossible to set with the proper lParam (it was correct in reply->lparam) value, instead is was overwritten by some constant. That was happening only for the messages sent by the patch using post_message. I guess the tales of server-side dragons hold some truth... If anyone wants to try to reproduce it, just recompile without the unused #include "user.h" in raw_input.c and run user32 tests.

This patch game-tested and works for Quake Live (in_mouse 2 for raw input), World of Tanks and Risen.

Feedback is very much appreciated. Thanks.

---
 server/protocol.def |   79 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 79 insertions(+), 0 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-server-Add-server-side-raw-input-functions-definitio.patch
Type: text/x-patch
Size: 1975 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20110614/8a2d0f55/attachment-0001.bin>


More information about the wine-patches mailing list