[sdl2] fix black corners on buttons' textures

This commit is contained in:
Gwenhael Le Moine 2024-09-07 11:02:01 +02:00
parent 4c5f7f070b
commit ef18903f53
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -548,7 +548,7 @@ static void create_buttons_textures( void )
SDL_SetRenderTarget( renderer, buttons_textures[ i ].up ); SDL_SetRenderTarget( renderer, buttons_textures[ i ].up );
// Fill the button and outline // 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 // draw edge of button
// left // left
@ -613,13 +613,13 @@ static void create_buttons_textures( void )
} }
// }}} // }}}
// DOWN {{{ //FIXME // DOWN {{{
buttons_textures[ i ].down = buttons_textures[ i ].down =
SDL_CreateTexture( renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, BUTTONS[ i ].w, BUTTONS[ i ].h ); SDL_CreateTexture( renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, BUTTONS[ i ].w, BUTTONS[ i ].h );
SDL_SetRenderTarget( renderer, buttons_textures[ i ].down ); SDL_SetRenderTarget( renderer, buttons_textures[ i ].down );
// Fill the button and outline // 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 // draw edge of button
// left // left