Rebzzel / kiero

Universal graphical hook for a D3D9-D3D12, OpenGL and Vulkan based games.
MIT License
1.03k stars 219 forks source link

Screen goes black when trying to minimize game #25

Closed user-grinch closed 3 years ago

user-grinch commented 3 years ago

I've hooked ImGui window in GTA SA (DirectX9). Everything works fine but whenever I try to alt-tab out of the game the screen goes black. Then if I return to the game everything works fine.

This is my present hook, https://pastebin.com/YhSnx0NL

I read something similar about it here. I tried using the same reset as well but the same thing, https://pastebin.com/ehCWZGYh

I've tried to test which might be causing this issue and seems like something in keiro::init()?

user-grinch commented 3 years ago

I fixed it by calling ImGui_ImplDX9_InvalidateDeviceObjects(); if the game changed from fullscreen to windowed or vice versa.