Skip to content

Commit

Permalink
updated for the latest SDL_ttf API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
captain0xff committed Oct 25, 2024
1 parent d80f917 commit 0267ea1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/testgputext.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ int main(int argc, char *argv[])
rot_angle = SDL_fmodf(rot_angle + 0.01, 2 * SDL_PI_F);

int tw, th;
TTF_Text *text = check_error_ptr(TTF_CreateText_Wrapped(engine, font, str, 0, 0));
TTF_Text *text = check_error_ptr(TTF_CreateText(engine, font, str, 0));
check_error_bool(TTF_GetTextSize(text, &tw, &th));
text->color = (SDL_FColor){ 1.0f, 1.0f, 0.0f, 1.0f };
TTF_SetTextWrapWidth(text, 0);

// Create a model matrix to make the text rotate
SDL_Mat4X4 model;
Expand All @@ -355,7 +355,7 @@ int main(int argc, char *argv[])

// Get the text data and queue the text in a buffer for drawing later
TTF_GPUAtlasDrawSequence *sequence = TTF_GetGPUTextDrawData(text);
queue_text(&geometry_data, sequence, &text->color);
queue_text(&geometry_data, sequence, &((SDL_FColor) {1.0f, 1.0f, 0.0f, 1.0f}));

set_geometry_data(&context, &geometry_data);

Expand Down

1 comment on commit 0267ea1

@madebr
Copy link
Contributor

@madebr madebr commented on 0267ea1 Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What C standard is required for this?
The CMake script does not set a minimum C standard.

Please sign in to comment.