Archived

This topic is now archived and is closed to further replies.

RonHiler

Cursor Issues with Win98 users

Recommended Posts

Hey guys, I use DX 8.0, using D3D, DInput, and DSound for my game. I''ve had reports for a while that on Win98 machines, the cursor does not appear. I was using the regular windows cursor with default handling (which works fine on WinXP machines). I figured changing over to a custom cursor might fix this problem. So I did that. Here''s the initialization code during the D3D init sequence //create the cursor surface and load it r = D3DDevice->CreateImageSurface(32, 32, TextureFormat, &CursorBitmap); GetCurrentDirectory(250, FileName); lstrcat (FileName, "\\Client\\Graphics\\UserInterface\\Cursor.bmp"); r = D3DXLoadSurfaceFromFile(CursorBitmap, NULL, NULL, FileName, NULL, D3DX_FILTER_NONE, 0xff000000, NULL); Then in the message loop: case WM_SETCURSOR: { // Turn off window cursor SetCursor( NULL ); Direct3D.SetCursor(); return true; // prevent Windows from setting cursor to window class cursor } with: void D3DClass::SetCursor() { Direct3D.D3DDevice->SetCursorProperties(0, 0, CursorBitmap); Direct3D.D3DDevice->ShowCursor(true); } This gives me a custom cursor in WinXP. Alas, I get the same report from my Win98 users, no cursor. They have the *functionality* of a cursor (they can click on stuff) but no graphic. What gives? Do I need to manually draw the damn thing during each scene render? Advice appreciated! Thanks, -Ron

Share this post


Link to post
Share on other sites
I don''t recall if Win98 had a drop-shadow effect for the mouse or not, but if it did, it might cause problems.

The issue is:
quote:
Tom Forsyth wrote
The other problem is that the TNT (and many other cards) don''t support the default mouse cursor with the alpha-blended drop-shadow, so it''s all done using a software emulation that is pretty rubbish. Try turning the drop-shadow off (somewhere in the Control Panel settings - I forget where) and see if that helps. Alternatively, if you are using a custom bitmap, try using only a two-colour 32x32 bitmap - pretty much every card supports that. Any sort of fancier cursor is going to run into software emulation problems.



Anyway, the best thing to do would be to install Win98 and test it yourself. Sounds painful, I know. The horror of going back to the BSOD, but you''ll just do little testing

Whatever the problem is, you might want to expose an "option" to draw the cursor manually - as a workaround.

Muhammad Haggag

Share this post


Link to post
Share on other sites
Thanks for the reply.

Yesterday I changed the surface to a texture, turned off the hardware drawing (D3DDevice->ShowCursor(false)), and just drew the cursor manually at the end of my rendering routine at the coords of the mouse. It''s only two more tris in the scene, so no big deal. This worked for everyone just fine. I still don''t really understand why Win98 was having issues when WinXP wasn''t, but okay, whatever

I like this way better anyway, now I know there won''t be driver issues to deal with, and I can modify my custom cursor graphic pretty easily (I will be changing the cursor graphic during item dragging, for instance).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I had a problem like that the other day with the mouse in my opengl app. the cursor would flicker a bit and take a piece of the last frame with it. Turns out mouse trails was turned on but set to zero trails. Was messing everything up. I toggled it off and fixed the problem.

Share this post


Link to post
Share on other sites