Guest User

Untitled

a guest
Jan 24th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. void __stdcall limitFps(){
  2. DWORD curTick = GetTickCount();
  3. if(curTick - lastTick < 1000/maxFPS){
  4.         Sleep(1000/maxFPS - (curTick - lastTick));
  5.         }
  6. lastTick = curTick;
  7. }
  8.  
  9. void _declspec(naked) EngineHook(){
  10.     limitFps();
  11.     _asm RET
  12. }
Add Comment
Please, Sign In to add comment