91
Mess Hall / Re: Playing around with a Descent 3 patcher
« Last post by SaladBadger on July 17, 2021, 04:11:04 PM »I squeezed in two more patches. At this rate I'm going to finish the entirety of my "future goals" list before I get a single release out.... (but at least the source is up on GitHub for anyone to play with).
The first of my new patches fixes a bug with Descent 3 where if you're using the mouse at a decently high framerate, holding it down becomes unreliable. I traced this down to an oddity in the mouse code. The keyboard and joystick code, when timing how long a button's been held for, uses the normal timer code, which by default uses a much higher accuracy means of measuring time. The mouse code, on the other hand, uses a simple MS timer with a resolution of somewhere around 10-16 MS according to MS's docs. This means the game would frequently get deltas of 0 and think you released the mouse. I patched it to use the same high-precision timer as the other input methods.
The second is pretty mundane, but since I was having trouble getting mouse controls right, and the mouse sensitivity controls in the game have limited resolution, I threw on a configurable mouse prescalar which will scale the inputs before the game code gets it. Works well for the moment, but mouse control is still a little rough I feel.
The first of my new patches fixes a bug with Descent 3 where if you're using the mouse at a decently high framerate, holding it down becomes unreliable. I traced this down to an oddity in the mouse code. The keyboard and joystick code, when timing how long a button's been held for, uses the normal timer code, which by default uses a much higher accuracy means of measuring time. The mouse code, on the other hand, uses a simple MS timer with a resolution of somewhere around 10-16 MS according to MS's docs. This means the game would frequently get deltas of 0 and think you released the mouse. I patched it to use the same high-precision timer as the other input methods.
The second is pretty mundane, but since I was having trouble getting mouse controls right, and the mouse sensitivity controls in the game have limited resolution, I threw on a configurable mouse prescalar which will scale the inputs before the game code gets it. Works well for the moment, but mouse control is still a little rough I feel.