wined3d: Allow SetCursorProperties on existing cursor
stefandoesinger at gmx.at
Sat Mar 10 11:33:11 CST 2007
Am Samstag 10 März 2007 06:10 schrieb Erich Hoover:
> Real Name:
> Erich Hoover
> The SetCursorProperties call needs to be capable of being performed on
> existing cursors. The current behavior removes the cursor handle at the
> beginning of any SetCursorProperties call (and on Uninit3D). The removal
> of the cursor on SetCursorProperties is counter to the documentation and
> causes some applications to lose the cursor when SetCursorProperties is
> re-issued (See Bug #7619 <http://bugs.winehq.org/show_bug.cgi?id=7619>).
> This patch corrects this issue and permits SetCursorProperties to retrieve
> the gl texture of an old cursor.
> wined3d: Allow SetCursorProperties on existing cursor
This is not completely correct:
The application can Release the d3d surface after setting the cursor. This
would also delete the gl texture used to draw the cursor. Also, the apps can
potentially change the surface and call PreLoad. This would change the cursor
without SetCursorProperties(The cursor texture does not have to be in
D3DPOOL_SCRATCH, so the app can preload it manually).
But you are right, a non-dirty surface causes issues with the current code. I
think you can fix that by modifying LoadTexture not to release the surface
memory is SFLAG_FORCELOAD is passed. (Or better, fix the SFLAG_DONOTFREE
macro in wined3d_private.h). Then, when SetCursorProperties sets the surface
texture to 0 remove SFLAG_INTEXTURE from the surface flags.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070310/3c2a4c2c/attachment.pgp
More information about the wine-devel