Print Screen/Fullscreen question

Started by
12 comments, last by TomKQT 13 years, 12 months ago
Quote:Original post by majek
Thanks Steve you were right, it was changing the window style when I reset the device. is there anything you dont know? :)

Here is my new dilema... My Direct3D class stores a bool p_FullScreen. When ToggleFullScreen() is called its really just calling SetFullScreen(!p_FullScreen)

The BeforeResetDevice() function depends on p_FullScreen to reset the PresentParams, so if I reset the device before toggling fullscreen mode, p_FullScreen will be FALSE, returning the wrong result.
Why not pass a parameter to BeforeResetDevice() to indicate if it's going into fullscreen mode or not? Then your p_FullScreen variable can mean "Is the app currently in fullscreen mode?", and this'll allow you to use BeforeResetDevice() to reset the device without toggling fullscreen mode (E.g. to change resolution).

Quote:Original post by majek
My next question for Steve is... Should I just get rid of the Window::SetFullScreen() function? Since D3D changes the window style for me there's really no point in changing it manually.
It's probably a good idea to change it - AFAIK D3D doesn't change the window style back when going windowed -> fullscreen -> windowed, so you end up with a WS_POPUP style window if you don't change the window style. And it doesn't hurt to make your code symmetrical so the window style is set when going to fullscreen mode too.
Advertisement
Yes, I guess I can live with this. (I use openGL BTW).
Or maybe I should show this wonder in fan-fairs, I could be a trillionaire.
Ok, thanks for all the help! All the more reason to keep learning D3D10/11 Lol

I'm actually converting an opengl app to d3d9, I don't know why though :(
Quote:Original post by Evil SteveIt's probably a good idea to change it - AFAIK D3D doesn't change the window style back when going windowed -> fullscreen -> windowed, so you end up with a WS_POPUP style window if you don't change the window style. And it doesn't hurt to make your code symmetrical so the window style is set when going to fullscreen mode too.


Also, from my experience, there's a problem when going from windowed to fullscreen if you don't set WS_POPUP in Windows XP where windows by default have rounded top corners - everything looks fine in fullscreen and the whole screen is covered, but when you click the top corners (where the rounding would be), you deactivate your window because Windows thinks you clicked outside of it.

This topic is closed to new replies.

Advertisement