Skip to content

Commit

Permalink
Workaround SDL cycle memleak and undefined behavior, pin to latest SD…
Browse files Browse the repository at this point in the history
…L_Gpu
  • Loading branch information
RandyGaul committed Oct 23, 2024
1 parent 47a2091 commit 6859a75
Show file tree
Hide file tree
Showing 7 changed files with 150 additions and 59 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ else()
set(SDL_EXAMPLES OFF CACHE BOOL "Do not build SDL examples")
FetchContent_Declare(
SDL3
URL https://github.com/libsdl-org/SDL/archive/88a01fbc964fbea1203071ea3ca2c6f799d4f571.zip
URL https://github.com/libsdl-org/SDL/archive/d9e6fe0b7a22dae7835c62a120f1a22585b0d9c0.zip
DOWNLOAD_EXTRACT_TIMESTAMP ON
CMAKE_ARGS -DSDL_SHARED=$<NOT:${CF_FRAMEWORK_STATIC}> -DSDL_STATIC=${CF_FRAMEWORK_STATIC} -DSDL_TEST_LIBRARY=OFF -DSDL_TESTS=OFF -DSDL_EXAMPLES=OFF
)
Expand Down
1 change: 1 addition & 0 deletions include/cute_draw.h
Original file line number Diff line number Diff line change
Expand Up @@ -1748,6 +1748,7 @@ CF_INLINE void draw_canvas(CF_Canvas canvas, CF_V2 position, CF_V2 scale) { cf_d
CF_INLINE void draw_canvas(CF_Canvas canvas, float x, float y, float sx, float sy) { cf_draw_canvas(canvas, V2(x,y), V2(sx,sy)); }

CF_INLINE void render_to(CF_Canvas canvas, bool clear = false) { cf_render_to(canvas, clear); }
CF_INLINE void render_layers_to(CF_Canvas canvas, int layer_lo, int layer_hi, bool clear = false) { cf_render_layers_to(canvas, layer_lo, layer_hi, clear); }

CF_INLINE CF_TemporaryImage fetch_image(const CF_Sprite* sprite) { return cf_fetch_image(sprite); }
CF_INLINE CF_TemporaryImage fetch_image(const CF_Sprite& sprite) { return cf_fetch_image(&sprite); }
Expand Down
Loading

0 comments on commit 6859a75

Please sign in to comment.