Original Post
Hi! I have never really understood how to manage a fullscreen toggling, I'm currently doing something very simple, and possibly as stupid : I get the "Could not go fullscreen" warning and then all calls to SetFVF and other things fail. I'm pretty sure I'm not doing it the good way. BTW, I have set the D3DPP.BackBufferFormat to R5G6B5 and not unknown. And my window style is the following : _Windowstyle = WS_OVERLAPPED | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; I'm surely not doing it the good way, could anyone give me a tip or point me a tutorial?
//Make a copy of the D3DPP currently used
D3DPRESENT_PARAMETERS d3dpp = _D3DPP;
//Set the windowed flag to false
d3dpp.Windowed = FALSE;
//Hide the cursor
ShowCursor(FALSE);
//Reset device using the new params
if( FAILED( _Renderer->_D3DDevice->Reset(&d3dpp) ) )
{
FE2D_LOG(40,"Could not go fullscreen");
return false;
}
//It worked, set the D3DPP currently used to the temp one
_D3DPP = d3dpp;