Skyrim
0 of 0

File information

Last updated

Original upload

Created by

DevourerPi

Uploaded by

DevourerPi

Virus scan

Safe to use

About this mod

It uses HOOK to add a "sleep" function to try to optimize CPU usage.

Requirements
Permissions and credits
Donations
Present Plugin
It uses HOOK to add the "Sleep" function to the DirectX9 core (d3d9.dll) to try to optimize the CPU usage. It should be noted that this is not to make the game use more CPU, but to reduce the CPU usage without affecting performance.




Required runtime and runtime environment

1. Skyrim 1.9.32.0
2. 
Skyrim Script Extender (SKSE) 1.7.3 : http://skse.silverlock.org/



Specific functional realization principle


HOOK Direct3DCreate9 to obtain the interface pointer of the Direct3D object of type LPDIRECT3D9, it has a member function IDirect3D9::CreateDevice, so as long as you find the virtual function table of the Direct3D object according to the Direct3D object interface pointer, and then determine the IDirect3D9:: CreateDevice's memory address, you can hook this function to obtain a device object pointer of type LPDIRECT3DDEVICE9, and then find the virtual function table of the device object according to the device object pointer, and find the address of IDirect3DDevice9::Present in the memory according to the virtual function table. It performs HOOK and adds the sleep function to it.

The above is the working principle of the Present plug-in. Of course, there is still a part I haven’t mentioned. You can check the source code to understand.



Finally, let’s talk about the specific application scenarios of this plug-in.

In fact, it does not bring significant performance improvement. If your CPU itself has a lot of free time when running Skyrim, then this plug-in may not help you at all, or you can try to use it to save power (Uh, maybe Laptops are more interested in this, haha). Its effect depends on your operating platform. In actual tests, it does not seem to be effective for every user. It may be more suitable for lower-end computers to install this plug-in.


 - Sorry that English is not my native language. If there are any inappropriate vocabulary in the MOD description, please give me feedback, thank you!