hello
im trying to make a game that can swop from fullscreen to windowed and back.
The problme im haveing is if i start in fullscreen the program works. If i start in windowed it works. but when i try to flick btween all i get is a black screen
The Main Loop
void DarkGDK ( void )
{
CGame game;
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate (60); // Change to 0 To Run as Fast As Pos
//dbCheckDisplayMode ( int iWidth, int iHeight, int iDepth )
dbSetDisplayMode ( 800, 600, 32);
dbSetWindowOff();
game.alien.IniAlien(1,1);
// our main loop
while ( LoopGDK ( ) )
{
// update the screen
game.alien.DrawAlien();
game.alien.AmendXLock(1);
//game.InputHandel();
game.InputHandel();
dbSync ( );
}
// return back to windows
return;
}
The Key Press that changes from windowed to full screen
if (dbKeyState(59)== 1)
{
if (FullScreen == 0)
{
dbSetWindowOn();
FullScreen = 1;
}
else
{
dbSetWindowOff();
FullScreen = 0;
}
}