Skip to content

Commit

Permalink
SDL cmake fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbarker committed Jan 19, 2025
1 parent 2776965 commit 358ea13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/SDL3-simple-demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.27)
project(clay_examples_sdl3_simple_demo C)
set(CMAKE_C_STANDARD 99)

set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -Wall -Werror")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")

include(FetchContent)
Expand Down
2 changes: 1 addition & 1 deletion examples/SDL3-simple-demo/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static inline Clay_Dimensions SDL_MeasureText(Clay_StringSlice text, Clay_TextEl
TTF_Font *font = gFonts[config->fontId];
int width, height;

if (!TTF_GetStringSize(font, text->chars, text->length, &width, &height)) {
if (!TTF_GetStringSize(font, text.chars, text.length, &width, &height)) {
SDL_LogError(SDL_LOG_CATEGORY_ERROR, "Failed to measure text: %s", SDL_GetError());
}

Expand Down

0 comments on commit 358ea13

Please sign in to comment.