hooking into wine (GL video capturing app)
trapni at gentoo.org
Thu Mar 10 06:09:59 CST 2011
a few years ago I once developed an application for recording the video of
the 3D games I played via wine (and cedega).
This all worked quite fine these days and I remember that cedega's wine
engine used other libX11 functions to process events than wine itself did
or still does.
In my software, I am overriding the specific library functions I want to
hook in, such as glXSwapBuffers, XNextEvent, XCheckIfEvent, ...
and then do LD_PRELOAD_LIBRARY this when starting wine.
Note, only wine used to use XCheckIfEvent but cedega used some other
function to process events, IIRC.
This all worked fine back in the days I developed it, now I want to
resurrect this project and found myself in troubles.
That is, I can successfully hook into OpenGL library functions, but I just
cannot find a trace on why my XCheckIfEvent is not being used by wine.
A few days back one guy at IRC told me that I have to look at the wine's
x11drv source code, which I did, but all I can see, is, that wine indeed
still seems to use XCheckIfEvent().
Checking my running wine app (with my library preloaded) using lsof I can
see that my library is indeed successfully hooked up into the process
image at least, and so do my hooks to the OpenGL functions work.
As a test, I also hooked up into XOpenDisplay from libX11, it worked, but
still, XCheckIfEvent() does not, and my only clue is, that this piece of
code of wine isn't actually the one processing the events.
As a side note, I need to hook up into libX11 to capture keyboard input to
actually start/stop video recording / screenshotting on keyboard events.
Can anyone please help me out here why I cannot grap wine's keyboard events?
In case of interest, the following is the link to the source code in
More information about the wine-devel