Skip to content

Commit

Permalink
fix build after latest SDL3 changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Jun 13, 2024
1 parent 80ef772 commit c05d049
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/showimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ int main(int argc, char *argv[])
SDL_Renderer *renderer = NULL;
SDL_Texture *texture = NULL;
Uint32 flags;
int i, w, h;
float w, h;
int i;
int done = 0;
int quit = 0;
SDL_Event event;
Expand Down Expand Up @@ -165,7 +166,7 @@ int main(int argc, char *argv[])
continue;
}
}
SDL_QueryTexture(texture, NULL, NULL, &w, &h);
SDL_GetTextureSize(texture, &w, &h);

/* Save the image file, if desired */
if (saveFile) {
Expand Down Expand Up @@ -195,7 +196,7 @@ int main(int argc, char *argv[])

/* Show the window */
SDL_SetWindowTitle(window, argv[i]);
SDL_SetWindowSize(window, w, h);
SDL_SetWindowSize(window, (int)w, (int)h);
SDL_ShowWindow(window);

done = quit;
Expand Down

0 comments on commit c05d049

Please sign in to comment.