Thread: mouse stuck

Results 1 to 1 of 1
  1. #1
    rehaxxor1337's Avatar
    Join Date
    Jan 2017
    Gender
    male
    Posts
    31
    Reputation
    10
    Thanks
    8

    mouse stuck

    hello guys i need help pls i cant fix this , i work 2 days on it but icant fix it,
    when i open the menu my mouse is working but when i close the menu and i wanna buy a smoke or nade it stuck in the buy menu

    Code:
    HRESULT __stdcall hkEndScene(IDirect3DDevice9* thisptr) {
    
    
    
    	static bool mouse_enabled = false;
    	thisptr->SetRenderState(D3DRS_COLORWRITEENABLE, 0xFFFFFFFF);
    	bool is_renderer_active = renderer->IsActive();
    
    	static auto paste = g_CVar->FindVar("cl_mouseenable");
    	paste->SetValue(!is_renderer_active);
    
    	if (is_renderer_active) {
    		if (mouse_enabled) {
    			mouse_enabled = false;
    		}
    	}
    	else {
    		if (!mouse_enabled) {
    			mouse_enabled = true;
    		}
    	}
    
    	ImGui::GetIO().MouseDrawCursor = is_renderer_active;
    
    	if (!is_renderer_active)
    		return oEndScene(thisptr);
    
    	ImGui_ImplDX9_NewFrame();
    
    	NewMenu();
    
    	ImGui::Render();
    
    	return oEndScene(thisptr);
    }
    
    typedef HRESULT(_stdcall *Present_T)(void*, const RECT*, RECT*, HWND, RGNDATA*);
    Present_T oPresent;
    HRESULT _stdcall hkPresent(LPDIRECT3DDEVICE9 pDevice, RECT* pSourceRect, RECT* pDestRect, HWND hDestWindowOverride, RGNDATA* pDirtyRegion)
    {
    	if (!renderer->IsReady())
    	{
    		renderer->Initialize(FindWindowA("Valve001", NULL), pDevice);
    	}
    	static bool mouse_enabled = false;
    	pDevice->SetRenderState(D3DRS_COLORWRITEENABLE, 0xFFFFFFFF);
    	bool is_renderer_active = renderer->IsActive();
    
    
    	static auto paste = g_CVar->FindVar("cl_mouseenable");
    	paste->SetValue(!is_renderer_active);
    
    	if (is_renderer_active) {
    		if (mouse_enabled) {
    			mouse_enabled = false;
    		}
    	}
    	else {
    		if (!mouse_enabled) {
    			mouse_enabled = true;
    		}
    	}
    
        ImGui::GetIO().MouseDrawCursor = is_renderer_active;
    
        if (!is_renderer_active)
            return oPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
    
        ImGui_ImplDX9_NewFrame();
    
        NewMenu();
    
        ImGui::Render();
    
        return oPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
    }
    can you help me pls

    greetz rehaxxor
    Last edited by T-800; 07-30-2018 at 04:13 AM.

Similar Threads

  1. [Help] Mouse stuck
    By rehaxxor1337 in forum Counter-Strike 2 Discussions
    Replies: 2
    Last Post: 08-28-2018, 05:57 AM
  2. [Help Request] Mouse Stuck :/
    By Smuq in forum CrossFire Help
    Replies: 24
    Last Post: 08-24-2013, 09:37 PM
  3. [Info] How to get lower ping + No mouse stuck! (-20) [Win7 and WinXP]
    By ˘hris. in forum CrossFire Tutorials
    Replies: 84
    Last Post: 04-22-2013, 12:08 PM
  4. [Help] CS:Source Mouse stuck after using Gameingpad
    By poppcorngutten in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 2
    Last Post: 02-07-2012, 08:21 AM
  5. Mouse is stuck and Cannot Move! Help!!!
    By Kippers94 in forum Combat Arms Help
    Replies: 8
    Last Post: 11-07-2010, 03:36 PM