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

Austin English austinenglish at gmail.com
Tue Jun 14 19:31:39 CDT 2011


2011/6/14 Vincas Miliūnas <vincas.miliunas at gmail.com>:
> 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(-)

Howdy Vincas,

This patch breaks the compile:
$ patch -p1 < ~/75274
$ ./tools/make_requests
$ ./configure --disable-tests
$ make

make[1]: Entering directory `/home/austin/wine-git/server'
gcc -o wineserver async.o atom.o change.o class.o clipboard.o
completion.o console.o debugger.o device.o directory.o event.o fd.o
file.o handle.o hook.o mach.o mailslot.o main.o mapping.o mutex.o
named_pipe.o object.o process.o procfs.o ptrace.o queue.o region.o
registry.o request.o semaphore.o serial.o signal.o snapshot.o sock.o
symlink.o thread.o timer.o token.o trace.o unicode.o user.o window.o
winstation.o        -L../libs/wine -lwine ../libs/port/libwine_port.a
 -Wl,--rpath,\$ORIGIN/../libs/wine
request.o:(.rodata+0x494): undefined reference to
`req_get_raw_input_device_list'
request.o:(.rodata+0x498): undefined reference to
`req_register_raw_input_device'
request.o:(.rodata+0x49c): undefined reference to
`req_unregister_raw_input_device'
request.o:(.rodata+0x4a0): undefined reference to `req_is_raw_input_data'
request.o:(.rodata+0x4a4): undefined reference to `req_get_raw_input_data'
request.o:(.rodata+0x4a8): undefined reference to
`req_get_registered_raw_input_devices'
request.o:(.rodata+0x4ac): undefined reference to `req_add_raw_input_data'
request.o:(.rodata+0x4b0): undefined reference to
`req_get_raw_input_device_info'
collect2: ld returned 1 exit status
make[1]: *** [wineserver] Error 1
make[1]: Leaving directory `/home/austin/wine-git/server'
make: *** [server] Error 2

which you implement in patch 5. Every patch needs to stand on its own,
without breaking the tests/compile. For such a complicated changeset,
it's probably best to send the tests in on their own first, with the
failing tests wrapped in todo_wine().

See also http://wiki.winehq.org/SubmittingPatches

BTW, thanks for working on this, I used your earlier patches to play a
bit of Brink ;-).

-- 
-Austin



More information about the wine-devel mailing list