Skip to content

Commit

Permalink
SDL3/SDL_GetWindowSurface: Updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
sechshelme authored and SDLWikiBot committed May 5, 2024
1 parent 743da14 commit ac97da9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SDL3/SDL_GetWindowSurface.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ This function is available since SDL 3.0.0.
int main(int argc, char* argv[])
{
SDL_Surface *screen; // even with SDL2, we can still bring ancient code back
SDL_Surface *screen; // even with SDL3, we can still bring ancient code back
SDL_Window *window;
SDL_Surface *image;
SDL_Init(SDL_INIT_VIDEO); // init video
// create the window like normal
window = SDL_CreateWindow("SDL2 Example", 640, 480, 0);
window = SDL_CreateWindow("SDL3 Surface Example", 640, 480, 0);
// but instead of creating a renderer, we can draw directly to the screen
screen = SDL_GetWindowSurface(window);
Expand Down

0 comments on commit ac97da9

Please sign in to comment.