Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectX9 example becomes unresponsive when rendering interrupted by external activity #1464

Closed
KriyenKP opened this issue Nov 28, 2017 · 2 comments

Comments

@KriyenKP
Copy link

Not sure how to word the issue title really...but hopefully my description explains it.

Basically what i found is that when the rendering is interrupted ImGui stops responding to user input but only on the graphical level. So if I cause a UAC dialog to popup from another application, or if I lock my pc and unlock it, this happens. The buttons no longer react to being hovered on and the dialogs all don't respond. I thought maybe I broke something but I did it on a clean build of the example project (the direct x 9 one ) and the same happens. The functions of the buttons however still respond. So I have a button to launch a url and the button fires when clicked, but the graphical ImGui changes don't. So no hover, pressed or state changes happen.

@ocornut ocornut changed the title ImGui Becomes unresponsive when rendering interrupted by external activity DirectX9 example becomes unresponsive when rendering interrupted by external activity Nov 28, 2017
@ocornut
Copy link
Owner

ocornut commented Nov 28, 2017

Hello, I can confirm the issue, it seems to only happen with the DirectX9 demo and it's not really a problem in core imgui. I think we need to change the code in main.cpp to handle Lost Devices:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb174714(v=vs.85).aspx

@ocornut
Copy link
Owner

ocornut commented Nov 28, 2017

Should be fixed with the code I committed in main.cpp

        // Handle loss of D3D9 device
        if (result == D3DERR_DEVICELOST && g_pd3dDevice->TestCooperativeLevel() == D3DERR_DEVICENOTRESET)
        {
            ImGui_ImplDX9_InvalidateDeviceObjects();
            g_pd3dDevice->Reset(&g_d3dpp);
            ImGui_ImplDX9_CreateDeviceObjects();
        }

@ocornut ocornut closed this as completed Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants