Advice fixing #13683 (DirectX mouse overlay?)

Christopher Thielen christopher at
Wed Mar 19 16:45:15 CDT 2014

I determined this isn't the User32 cursor stuff. It's probably a D3D 
surface with incorrect properties.

Can anyone recommend an OpenGL debugger or other mechanism for exploring 
the surfaces of a given scene and playing with their properties? My 
guess is the tools are pretty primitive for this kind of thing.

On 2/18/14, 7:19 PM, Christopher Thielen wrote:
> Good point. Maybe knowing the offset isn't too useful for now.
> I still haven't figured out through what mechanism the game draws this
> missing cursor. The D3D9 cursor functions never make a sound in the logs
> and while the User32 LoadCursor/SetCursor/clipping stuff is called an
> awful lot on initialization, it looks like it's always for the system
> cursors. I also pasted in a method to dump to a .bmp file anything that
> goes through LoadIcon and wound up with one icon I don't recall and
> another which was simply Wine's icon.
> So, my hunch now is that the game draws the cursor using DirectX and
> uses User32 only for setting mouse clipping.
> Is there a decent way to dump as a file every DX resource loaded that's
> under a certain size? I'd like to confirm my theory and maybe if I'm
> lucky figure out which DX surface/texture is being drawn incorrectly (if
> any).
> - Christopher Thielen
> On 02/18/2014 12:16 AM, Stefan Dösinger wrote:
>> Am 18.02.2014 um 06:12 schrieb Christopher Thielen
>> <christopher at>:
>>> Two questions:
>>> 1) Is there a way to add timestamps to the TRACE statements in Wine?
>> WINEDEBUG=+timestamp
>> This adds timestamps to other traces, so you can do e.g.
>> WINEDEBUG=d3d,timestamp to get a d3d trace with timestamps.
>>> 2) If I know which file is opened by the game, is there a way to
>>> debug from that point on, i.e. capture the fopen() and enable
>>> +cursor,+resource,+d3d TRACES for say, only 5 seconds after that
>>> point? Something along those lines?
>> Afaik no. You could use some search and replace tricks in text editors
>> or with command line text tools though.
>>> I can find the exact offset within the data file used to load the
>>> missing resource - but I'd need a way to know when a fread() was that
>>> far along. I figure if I can determine that I can determine if the
>>> cursor is loaded as a Windows cursor or as a D3D surface and go from
>>> there.
>> Note that there are plenty of ways to open and read files. fopen and
>> fread are just one of them. There are win32 equivalents of those C
>> functions, and there are specific resource loading functions which
>> you’ve probably already seen.

More information about the wine-devel mailing list