Closed ghost closed 2 years ago
It's hard to believe that d3d9 hook has anything to do with the performance issues users are encountering. That hook only re-routes all d3d9 procedure calls through our code so we can do some not-so-extensive checks (like macro detection). Also, that thing is copied straight from sobeit src. So, if sobeit works for them without this 100% CPU crap, AC should work too.
On May 17, 2017 20:12, "zeksteinplus" notifications@github.com wrote:
gta_sa.exe is using 70% of CPU. If i remove CDirectX::HookD3DFunctions() from CLoader, all things get back to normal. Any ideas about this?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Whitetigerswt/SAMP_AC_v2/issues/199, or mute the thread https://github.com/notifications/unsubscribe-auth/AMSO_5yKI6axK5mYMM1jnb5s2uZEYTK2ks5r6yqIgaJpZM4NeLtp .
d3d9 hook is important for AC ? If to say, i disable d3d9 hook, there will be cheats that will not be discovered? I saw in the code that is used for detecting screenshot, alt-tab and etc.
Cheat detection shouldn't be affected, however pause detection will be. You won't be able to differentiate between paused and non-paused AC players.
But before you go there, maybe we could find the real issue. Build a client without these lines and see if CPU usage is still high: https://github.com/Whitetigerswt/SAMP_AC_v2/blob/master/acv2/DirectX%20Hooks/CD3D9DeviceProxy.cpp#L93-L102
Also, comment out this line in another build: https://github.com/Whitetigerswt/SAMP_AC_v2/blob/master/acv2/DirectX%20Hooks/CD3D9DeviceProxy.cpp#L86
https://github.com/Whitetigerswt/SAMP_AC_v2/blob/master/acv2/DirectX%20Hooks/CD3D9DeviceProxy.cpp#L86 With this removed, it lowers from 70% to 40% ( with the d3d9 line removed, it stay at 20% )
What if you remove both blocks? Will it stay at 20%?
If i remove both, same case like i remove the last one( 40% ) If i remove only the first one, nothing happens.
I'd really like to troubleshoot this issue, but I can't reproduce it on my machine. CPU always stays at ~20%, no matter if d3d9 hooks are installed or not.
Can you disable this part and check again the CPU usage? https://github.com/Whitetigerswt/SAMP_AC_v2/blob/master/acv2/DirectX%20Hooks/CMessageProxy.cpp#L96-L163
Also, what are your CPU specs?
With that lines of code commented, let's say its 90% fixed, like 28% not 20%.
gta_sa.exe is using 70% of CPU. If i remove CDirectX::HookD3DFunctions() from CLoader, all things get back to normal. Any ideas about this?