diff --git a/sdlpp/sdlpp_texture.cpp b/sdlpp/sdlpp_texture.cpp index b9431ee..08459c6 100644 --- a/sdlpp/sdlpp_texture.cpp +++ b/sdlpp/sdlpp_texture.cpp @@ -10,11 +10,10 @@ Texture::Texture( std::shared_ptr< Renderer > &renderer, throw "IMG_Load error"; } if ( !color_key.empty() ) { - auto colors = getColorsHEX( color_key ); - SDL_SetColorKey( surface, SDL_TRUE, - SDL_MapRGB( surface->format, std::get< 0 >( colors ), - std::get< 1 >( colors ), - std::get< 2 >( colors ) ) ); + auto color = getSDLColorHEX( color_key ); + SDL_SetColorKey( + surface, SDL_TRUE, + SDL_MapRGB( surface->format, color.r, color.g, color.b ) ); } setTextureFromSurface( renderer, surface ); }