Skip to content

Commit

Permalink
clarify creation of shadow surface
Browse files Browse the repository at this point in the history
SDL_SetVideoMode() was later extended in commit 39d062d to include the
fourth clause but without updating the original comment.
  • Loading branch information
mikrosk committed Jul 7, 2024
1 parent 963bc45 commit aba1988
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/SDL_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,10 +893,11 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
}

/* Create a shadow surface if necessary */
/* There are three conditions under which we create a shadow surface:
/* There are four conditions under which we create a shadow surface:
1. We need a particular bits-per-pixel that we didn't get.
2. We need a hardware palette and didn't get one.
3. We need a software surface and got a hardware surface.
4. We need a double-buffered surface and got a plain hardware surface.
*/
if ( !(SDL_VideoSurface->flags & SDL_OPENGL) &&
(
Expand Down

0 comments on commit aba1988

Please sign in to comment.