diff --git a/SDL2pp/Texture.cc b/SDL2pp/Texture.cc index 7a57687..9b6ceec 100644 --- a/SDL2pp/Texture.cc +++ b/SDL2pp/Texture.cc @@ -50,8 +50,7 @@ Texture::Texture(Renderer& renderer, RWops& rwops) { } Texture::Texture(Renderer& renderer, const std::string& path) { - RWops rwops = RWops::FromFile(path); - texture_ = IMG_LoadTexture_RW(renderer.Get(), rwops.Get(), 0); + texture_ = IMG_LoadTexture(renderer.Get(), path.c_str()); } #endif