After executing the application, user clicks the start button. At the time I want to change the display to different dimensions. But doing that the screen becomes black and images doesn't paste.
while ( LoopGDK ( ) )
{
if(dbMouseClick()==1){
int x=dbMouseX(), y=dbMouseY();
if(x>370 && x<498 && y>240 && y<368){
dbDeleteImage(1);
dbDeleteImage(2);
bg_exist=false;
}
}
if(!dbSpriteExist(1)&&bg_exist==false){
dbSetDisplayMode(800,224,32);
dbPasteImage(3,0,0);
}
dbSprite(2,370,240,2);
dbPasteImage(1,0,0);
dbSync ( );
}