DrNseven / D3D12-Hook-ImGui

d3d12 hook with imgui, directx12 hook, dx12 hook, d3d12 api hook
201 stars 50 forks source link

Cyberpunk freezes when menu is open #7

Open MelonHell opened 2 years ago

MelonHell commented 2 years ago

When you press insert, the menu opens and the game freezes, does not respond to any input. Hangs only when closing the menu through the debugger.

Judging by line 201, this should have worked with Cyberpunk.

//cyberpunk 2077 no pants hack (low settings)

As I understand the problem in the method on line 62

LRESULT APIENTRY WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { if (ShowMenu) { ImGui_ImplWin32_WndProcHandler(hwnd, uMsg, wParam, lParam); return true; } return CallWindowProc(Process::WndProc, hwnd, uMsg, wParam, lParam); }

xCENTx commented 2 years ago

CyberPunk Draws its own custom cursor as shown in the image below. image

Upon loading the menu , the game essentially hangs as it doesnt know which cursor to hang control over to ... i think. Idk im not that sure how any of this works. I'm better with memory. but if you inject the menu at launch and press insert during the intro FMV you will notice that DX12 pretty much stops updating immediately and displays a still image of the menu along with the last rendered scene from the game. image

If you leave the game running like this for 90seconds or so , you will be met with this error message image

NOT CYBERPUNK, but relatable: The wndproc is not handled correctly. Inputs are still being passed to the process with the menu open. Probably why you are having issues.

That or i am doing something wrong. I am not a professional.

I just tested this with Elden Ring and its unusable as the mouse inputs are all passed through to the process. Even when trying to utilize io.WantMouseCapture(); correctly. That is why i assumme the wndproc is wrong.

If I could do all of this stuff myself .. I would have no need to use somebody elses universal template.

I think it's safe to say that this template is just that and will still require the user to know how to troubleshoot any and all problems themselves. Its a great starting point tho

image

mrbeardad commented 3 months ago

Cyberpunk 2077 crashed after hook! The log of Cyberpunk says Gpu Crash for unknown reasons!