Results 1 to 1 of 1
  1. #1
    KesN's Avatar
    Join Date
    Sep 2017
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0

    Question Need Help with Syncing Function call to FPS

    Howdy,
    I'm trying to automatically do frame perfect button presses in a game, but I've run into a bit of a snag.

    I've managed to simulate what I'd like to do in a game running OpenGL by detour hooking glfwSwapBuffers and calling a function like so
    Code:
    DWORD jmpBackAddy;
    DWORD _funcAddy;
    void __declspec(naked) ourFunct() {
    	__asm {
    		push ebp
    		mov ebp, esp
    		sub esp, 8
    		call [_funcAddy]
    		jmp [jmpBackAddy]
    	}
    }
    
    void Test()
    {
    	//Call this
    }
    
    DWORD __stdcall mainLoop(LPVOID param)
    {
    
    	int hookLength = 6;
    	DWORD hookAddress = *(DWORD*)(0x4DA3E0); //SwapBuffers
    	jmpBackAddy = hookAddress + hookLength;
    	_funcAddy = (DWORD)Test;
    	Hook((void*)hookAddress, ourFunct, hookLength);
    
    	while (true)
    	{
    
    		if (GetAsyncKeyState(VK_ESCAPE) & 1)
                             break;
    	}
    	FreeLibraryAndExitThread((HMODULE)param, NULL);
    }
    But the game I intended for this to work on uses DirectX 11 and I can't find a function to hook in the same way.

    Is there a better way of achieving this? Am I stupid? Probably, but any help would be greatly appreciated.
    Last edited by KesN; 04-03-2020 at 02:41 PM.

Similar Threads

  1. [Solved] Need Help with FindWindow() function
    By fluffybananas22 in forum Call of Duty: Black Ops 3 Help
    Replies: 1
    Last Post: 05-29-2016, 02:14 AM
  2. [Solved] I need help with FPS in game
    By IloveFishies in forum CrossFire Help
    Replies: 17
    Last Post: 10-04-2012, 03:24 PM
  3. Need help with fps
    By Jizzyz in forum Other First Person Shooter Hacks
    Replies: 0
    Last Post: 03-17-2012, 09:31 PM
  4. [Solved] Need Help With FPS.
    By [SMA] Paradise` in forum Combat Arms Help
    Replies: 9
    Last Post: 12-03-2011, 08:42 PM
  5. Need help with UCE Called BlackJosephEngine.exe
    By 1vincent in forum Combat Arms Hacks & Cheats
    Replies: 3
    Last Post: 08-02-2008, 11:17 AM