<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"><pre>Am Samstag 10 März 2007 06:10 schrieb Erich Hoover:<br>&gt;<i> Real Name:<br></i>&gt;<i>
     Erich Hoover<br></i>&gt;<i> Description:<br></i>&gt;<i>     The SetCursorProperties call needs to be capable of being performed on<br></i>&gt;<i> existing cursors.  The current behavior removes the cursor handle at the
<br></i>&gt;<i> beginning of any SetCursorProperties call (and on Uninit3D).  The removal<br></i>&gt;<i> of the cursor on SetCursorProperties is counter to the documentation and<br></i>&gt;<i> causes some applications to lose the cursor when SetCursorProperties is
<br></i>&gt;<i> re-issued (See Bug #7619 &lt;<a href="http://bugs.winehq.org/show_bug.cgi?id=7619">http://bugs.winehq.org/show_bug.cgi?id=7619</a>&gt;). <br></i>&gt;<i> This patch corrects this issue and permits SetCursorProperties to retrieve
<br></i>&gt;<i> the gl texture of an old cursor.<br></i>&gt;<i> Changelog:<br></i>&gt;<i>     wined3d: Allow SetCursorProperties on existing cursor<br></i>This is not completely correct:<br><br>The application can Release the d3d surface after setting the cursor. This 
<br>would also delete the gl texture used to draw the cursor. Also, the apps can <br>potentially change the surface and call PreLoad. This would change the cursor <br>without SetCursorProperties(The cursor texture does not have to be in 
<br>D3DPOOL_SCRATCH, so the app can preload it manually).<br><br>But you are right, a non-dirty surface causes issues with the current code. I <br>think you can fix that by modifying LoadTexture not to release the surface 
<br>memory is SFLAG_FORCELOAD is passed. (Or better, fix the SFLAG_DONOTFREE <br>macro in wined3d_private.h). Then, when SetCursorProperties sets the surface <br>texture to 0 remove SFLAG_INTEXTURE from the surface flags.
</pre></blockquote><div>The API documentation doesn&#39;t say anything about an application releasing the d3d surface, but the documentation in the code seems to indicate that the gl texture needs to remain when the surface is deleted - I did nothing to change this.&nbsp; What I did see as requiring a change is the call to &quot;glDeleteTextures(1, &amp;This-&gt;cursorTexture);&quot; at the beginning of SetCursorProperties.&nbsp; Maybe I&#39;m not understanding you correctly, but in my mind it is necessary to remove this call so that applications that re-use the same cursor can do so.&nbsp; This change (in combination with the change for non-dirty surfaces) was also experimentally verified to fix the problem I was experiencing (See 
<a href="http://bugs.winehq.org/show_bug.cgi?id=7619">Bug #7619</a>).&nbsp; I will look into changing/implementing the flags to eliminate the &quot;non-dirty surface&quot; problem.<br><br></div>Erich Hoover<br><a href="mailto:ehoover@mines.edu">
ehoover@mines.edu</a><br>