equal
deleted
inserted
replaced
636 if (SDL_VideoSurface->format->palette) { |
636 if (SDL_VideoSurface->format->palette) { |
637 SDL_VideoSurface->flags |= SDL_HWPALETTE; |
637 SDL_VideoSurface->flags |= SDL_HWPALETTE; |
638 SDL_DitherColors(SDL_VideoSurface->format->palette->colors, |
638 SDL_DitherColors(SDL_VideoSurface->format->palette->colors, |
639 SDL_VideoSurface->format->BitsPerPixel); |
639 SDL_VideoSurface->format->BitsPerPixel); |
640 SDL_AddPaletteWatch(SDL_VideoSurface->format->palette, |
640 SDL_AddPaletteWatch(SDL_VideoSurface->format->palette, |
641 SDL_VideoPaletteChanged, NULL); |
641 SDL_VideoPaletteChanged, SDL_VideoSurface); |
642 SDL_SetPaletteColors(SDL_VideoSurface->format->palette, |
642 SDL_SetPaletteColors(SDL_VideoSurface->format->palette, |
643 SDL_VideoSurface->format->palette->colors, 0, |
643 SDL_VideoSurface->format->palette->colors, 0, |
644 SDL_VideoSurface->format->palette->ncolors); |
644 SDL_VideoSurface->format->palette->ncolors); |
645 } |
645 } |
646 |
646 |
662 SDL_VideoSurface->format->palette); |
662 SDL_VideoSurface->format->palette); |
663 } else { |
663 } else { |
664 SDL_DitherColors(SDL_ShadowSurface->format->palette->colors, |
664 SDL_DitherColors(SDL_ShadowSurface->format->palette->colors, |
665 SDL_ShadowSurface->format->BitsPerPixel); |
665 SDL_ShadowSurface->format->BitsPerPixel); |
666 } |
666 } |
|
667 SDL_AddPaletteWatch(SDL_ShadowSurface->format->palette, |
|
668 SDL_VideoPaletteChanged, SDL_ShadowSurface); |
667 } |
669 } |
668 } |
670 } |
669 SDL_PublicSurface = |
671 SDL_PublicSurface = |
670 (SDL_ShadowSurface ? SDL_ShadowSurface : SDL_VideoSurface); |
672 (SDL_ShadowSurface ? SDL_ShadowSurface : SDL_VideoSurface); |
671 |
673 |