Am Samstag 10 März 2007 06:10 schrieb Erich Hoover:
Real Name: Erich Hoover Description: 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. Changelog: 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.