From ef18903f531ee44f55462e85d6f2840dd042f46a Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Sat, 7 Sep 2024 11:02:01 +0200 Subject: [PATCH] [sdl2] fix black corners on buttons' textures --- src/ui_sdl2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui_sdl2.c b/src/ui_sdl2.c index 1c0fdb7..193acbf 100644 --- a/src/ui_sdl2.c +++ b/src/ui_sdl2.c @@ -548,7 +548,7 @@ static void create_buttons_textures( void ) SDL_SetRenderTarget( renderer, buttons_textures[ i ].up ); // Fill the button and outline - __draw_rect( 1, 1, BUTTONS[ i ].w - 2, BUTTONS[ i ].h - 2, BUTTON ); + __draw_rect( 0, 0, BUTTONS[ i ].w, BUTTONS[ i ].h, BUTTON ); // draw edge of button // left @@ -613,13 +613,13 @@ static void create_buttons_textures( void ) } // }}} - // DOWN {{{ //FIXME + // DOWN {{{ buttons_textures[ i ].down = SDL_CreateTexture( renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, BUTTONS[ i ].w, BUTTONS[ i ].h ); SDL_SetRenderTarget( renderer, buttons_textures[ i ].down ); // Fill the button and outline - __draw_rect( 1, 1, BUTTONS[ i ].w - 2, BUTTONS[ i ].h - 2, BUTTON ); + __draw_rect( 0, 0, BUTTONS[ i ].w, BUTTONS[ i ].h, BUTTON ); // draw edge of button // left