src/video/windib/SDL_dibvideo.c
changeset 45 60a6e045808e
parent 36 13ee9f4834ea
child 46 3dcf26fa9d15
equal deleted inserted replaced
44:25091c75acc4 45:60a6e045808e
   520 		settings.dmPelsWidth = width;
   520 		settings.dmPelsWidth = width;
   521 		settings.dmPelsHeight = height;
   521 		settings.dmPelsHeight = height;
   522 		settings.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL;
   522 		settings.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL;
   523 		if ( ChangeDisplaySettings(&settings, CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL ) {
   523 		if ( ChangeDisplaySettings(&settings, CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL ) {
   524 			video->flags |= SDL_FULLSCREEN;
   524 			video->flags |= SDL_FULLSCREEN;
   525 			if ( screen_pal != NULL ) {
       
   526 			/*	RJR: March 28, 2000
       
   527 				delete identity palette if switching from a palettized mode */
       
   528 				DeleteObject(screen_pal);
       
   529 				screen_pal = NULL;
       
   530 			}
       
   531 			if ( bpp <= 8 )
       
   532 			{
       
   533 			/*	RJR: March 28, 2000
       
   534 				create identity palette switching to a palettized mode */
       
   535 				screen_pal = DIB_CreatePalette(bpp);
       
   536 			}
       
   537 		}
   525 		}
   538 	}
   526 	}
   539 #endif /* !NO_CHANGEDISPLAYSETTINGS */
   527 #endif /* !NO_CHANGEDISPLAYSETTINGS */
       
   528 
       
   529 	/* Reset the palette and create a new one if necessary */
       
   530 	if ( screen_pal != NULL ) {
       
   531 	/*	RJR: March 28, 2000
       
   532 		delete identity palette if switching from a palettized mode */
       
   533 		DeleteObject(screen_pal);
       
   534 		screen_pal = NULL;
       
   535 	}
       
   536 	if ( bpp <= 8 )
       
   537 	{
       
   538 	/*	RJR: March 28, 2000
       
   539 		create identity palette switching to a palettized mode */
       
   540 		screen_pal = DIB_CreatePalette(bpp);
       
   541 	}
   540 
   542 
   541 	style = GetWindowLong(SDL_Window, GWL_STYLE);
   543 	style = GetWindowLong(SDL_Window, GWL_STYLE);
   542 #ifndef _WIN32_WCE
   544 #ifndef _WIN32_WCE
   543 	style &= ~(resizestyle|WS_MAXIMIZE);
   545 	style &= ~(resizestyle|WS_MAXIMIZE);
   544 #endif
   546 #endif