Fix palette creation in windowed mode at 8 bpp
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4046
This commit is contained in:
parent
6cae9e66ce
commit
16d06770f8
1 changed files with 14 additions and 12 deletions
|
@ -522,6 +522,11 @@ SDL_Surface *DIB_SetVideoMode(_THIS, SDL_Surface *current,
|
||||||
settings.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL;
|
settings.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL;
|
||||||
if ( ChangeDisplaySettings(&settings, CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL ) {
|
if ( ChangeDisplaySettings(&settings, CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL ) {
|
||||||
video->flags |= SDL_FULLSCREEN;
|
video->flags |= SDL_FULLSCREEN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* !NO_CHANGEDISPLAYSETTINGS */
|
||||||
|
|
||||||
|
/* Reset the palette and create a new one if necessary */
|
||||||
if ( screen_pal != NULL ) {
|
if ( screen_pal != NULL ) {
|
||||||
/* RJR: March 28, 2000
|
/* RJR: March 28, 2000
|
||||||
delete identity palette if switching from a palettized mode */
|
delete identity palette if switching from a palettized mode */
|
||||||
|
@ -534,9 +539,6 @@ SDL_Surface *DIB_SetVideoMode(_THIS, SDL_Surface *current,
|
||||||
create identity palette switching to a palettized mode */
|
create identity palette switching to a palettized mode */
|
||||||
screen_pal = DIB_CreatePalette(bpp);
|
screen_pal = DIB_CreatePalette(bpp);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* !NO_CHANGEDISPLAYSETTINGS */
|
|
||||||
|
|
||||||
style = GetWindowLong(SDL_Window, GWL_STYLE);
|
style = GetWindowLong(SDL_Window, GWL_STYLE);
|
||||||
#ifndef _WIN32_WCE
|
#ifndef _WIN32_WCE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue