I think my threads are becoming dead locked... this is what's happening.
I create a thread and a mutex to load assets in the startup game state while display a startup graphic. It all works great. No problems unless I change the resolution to full screen the game for a different resolution. Windowed mode or full screen of same resolution all works fine.
I call ChangeDisplaySettings before creating the game window and DirectX.
I'm not sure what to make of this and I tried some work arounds but it seems like the threads get stuck at WaitForSingleObject. At least that's what it seems like.
Any suggestions?
ChangeDisplaySettings causing threads to dead lock
If you're using D3D there's no need to call ChangeDisplaySettings - the D3D API has calls available that will do this automatically for you (Reset or ResizeTarget/ResizeBuffers).
Despite that, and going from your mention of using multiple threads, I expect that you're changing the mode from a different thread to the one used for creating the window and Device.
Despite that, and going from your mention of using multiple threads, I expect that you're changing the mode from a different thread to the one used for creating the window and Device.
I expect that you're changing the mode from a different thread to the one used for creating the window and Device.
I'm changing it from the main game thread. The thread I'm using to load assets is created at the time of load and released when finished. Thanks for the info. I'll look into Reset or ResizeTarget/ResizeBuffers.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement