Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 18 May 2001
Offline Last Active Feb 24 2015 10:12 PM

#5154937 Bizarre D3D9 hResult error: "The drive cannot find the sector requested....

Posted by on 20 May 2014 - 06:36 PM

Hi.  Did you run scandisk with both checkboxes checked, or with both the ./F and /R switches (chkdsk /f /r)?  The /R switch, or the bottom checkbox, repairs bad sectors by copying the data to another location and marking the sector so it won't be accessed anymore.  Check your logs after running, if it found any bad sectors run it again and see if it finds anymore.....or if it finds a lot of bad sectors.....replace the drive.  The /R switch may run for a long time depending on how many bad sectors it finds....maybe hours.  BACK UP YOUR HARD DRIVE BEFORE SCANNING WITH /R.....if your boot sector is bad the /R switch can cook your operating system and cause much sorrow.    


Also scandisk isn't 100% reliable, for example it won't find problems with the drive motor, which would still cause errors if it's failing.  If you can't get past your error message you should clone the drive and replace it.  IMO you should replace the drive now.....I'm not a DX expert but I don't think hardware errors are a result of bad code because code never directly accesses hardware, so you can't write any code that would access the hard drive in the wrong way, etc...all of this is negotiated by DX and the bios.  Also if you suddenly have bad sectors then more will probably follow, and keep in mind that you're only seeing bad sectors that your program is trying to access.....there may be many more.  .    


If you're dealing with a drive failure you'll never find the source of the problem until you repair or replace the drive.  If the drive crashes before you replace it recovering will be a lot more difficult, or impossible, or very expensive, so make sure you're backed up.     

#5128735 How to increase 2D sprite rendering performance

Posted by on 04 February 2014 - 08:55 AM

You can try rendering to a rendertarget and then presenting to the screen, instead of rendering directly to the screen.  

#4962762 XNA: Changing text that follows mouse cursor?

Posted by on 24 July 2012 - 04:27 PM

It bears saying for others who may read this post that the above method is absolutely the wrong way to implement a custom cursor because the system cursor normally updates many times faster than the graphic device and your cursor will flash when your frame rate slows down.

In this case, because I require changing text to track the mouse cursor, it appears to be the only way to do it. For any normal type of custom mouse cursor, and even for cursors with 256 colors and animated cursors, THIS is the way to do it....changes the actual system cursor, rather than hiding it and replacing it with a graphic that displays many times slower: http://allenwp.com/blog/2011/04/04/changing-the-windows-mouse-cursor-in-xna/.

There is nothing "horribly inefficient" in my code. I'm simply trying to do something a little out of the ordinary.

#4962648 XNA: Changing text that follows mouse cursor?

Posted by on 24 July 2012 - 10:27 AM

I think when you hid the cursor and replaced it with a Texture2D that you effectively slowed your mouse updates down to the speed of the game updates. In this case the cursor performance might be unacceptably slow in a graphically intense game.

My saving grace here would be that this particular screen is not that graphically intense.....so you may be right. I'll give it a shot!