Prof-Butts / xwa_ddraw_d3d11

Direct3D 11 implementation of DDraw.dll for XWA with VR support and New Shaders
MIT License
6 stars 4 forks source link

WaitGetPoses to CockpitLook #41

Closed morallo closed 3 years ago

morallo commented 3 years ago

Place WaitGetPoses() frame sync call in CockpitLook. This improves the latency. Fix pose synchronization between CockpitLook and ddraw by removing the && !g_playerInHangar, which was never True. This fixes some of the jitter, but breaks the tracking in the hangar, because g_b3dRendering=true so ddraw.dll tries to get the poses from CockpitLook when it is not active. WaitGetPoses() is never executed so nothing is rendered to the HMD.

We need to find the real value where the game stores the hangar state and re-add the condition. . Fixed the hangar tracking by using !(*g_playerInHangar) instead.

There is some remaining jitter for (x,y,z) movements, but I strongly suspect this is related with hacking/overwriting the cockpit shake variables.

The updated commit for the Hook_XWACockpitLook submodule corresponds to https://github.com/Prof-Butts/Hook_XWACockpitLook/pull/7

morallo commented 3 years ago

I have fixed the display to HMD in the hangar. As hinted by @Prof-Butts, we need to use the boolean value pointed to by g_playerInHangar instead of the literal variable value.