Search code examples
c#.netwindowsdirectxdxgi

Check when the application has gone fullscreen. (DXGI/DirectX10)


this is my question... There is a way to check when the application has gone fullscreen in DXGI (DX10/11). For going Fullscreen I mean that the system has COMPLETED the mode change. Cause i need it for my application to prevent deadlock and to adjust timing. (I have a multithreaded engine and the Present is not on the message pump thread causing deadlock on mode-change randomly)) Actually I make it wait 1 second continuing to process messages on the message pump thread and it work, but i want something more DETERMINISTIC that says to me "hey, the mode change is complete, you are now in fullscreen mode". :D

Any idea?


Solution

  • Is there any reason you can't run the rendering and message pump threads as the same thread?

    According to the docs there is nothing that tells you the change is complete.

    Strangely, though, DXGI relies on getting responses back from internal SendMessage calls (which occur via the message pump in a multi-threaded environment). So I don't see how delaying your message pump fixes problems. All it will do is make DXGI wait an extra second before continuing to do its stuff. A dead-lock usually implies that you are doing something that causes the message pump to block waiting for the rendering thread to do something.