From 1337221485ce227b48e2d07d9a5104b90d781367 Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Sat, 7 Apr 2018 17:12:08 +0200 Subject: [PATCH] external draw fixes2 --- src/fidgetspinner.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/fidgetspinner.cpp b/src/fidgetspinner.cpp index 762805bd..af1375d8 100644 --- a/src/fidgetspinner.cpp +++ b/src/fidgetspinner.cpp @@ -92,12 +92,11 @@ void DrawSpinner() const glez_rgba_t color = glez_rgba(255, 255, 255, 255); - static glez_texture_t tex = - glez_texture_load_png_rgba("/opt/cathook/data/res/atlas.png"); - while (!tex) - tex = glez_texture_load_png_rgba("/opt/cathook/data/res/atlas.png"); + draw_api::texture_handle_t text = draw_api::create_texture("/opt/cathook/data/res/atlas.png"); + while (!text) + text = draw_api::create_texture("/opt/cathook/data/res/atlas.png"); draw_api::draw_rect_textured(draw::width / 2, draw::height / 2, size, size, colors::white, - {tex}, 0 + 64 * state, (3 + (v9mode ? 1 : 0)) * 64, 64, 64, + text, 0 + 64 * state, (3 + (v9mode ? 1 : 0)) * 64, 64, 64, angle); if (angle > PI * 4) angle -= PI * 4;