DX10 setfullscreenstate not working on second monitor

398 views Asked by At

I have two display monitors connected to my pc.

I am using DirectX 10. I have a basic app, when I press space button I call;

swapChain->SetFullscreenState(true, 0);

to make it fullscreen.

It works well on my main monitor, but when I move the app to other monitor and press space button it does not work. Also throws first-chance exception.

Is it enough to just call SetFullscreenState function ? Or do I have to make sth else ? Thanks for help.

Edit : I solved this problem. You must assign your monitor to an IDXGIOutput type variable and pass it to SetFullscreenState function as second parameter.

swapChain->SetFullscreenState(true, &curr_monitor);
0

There are 0 answers