ja pinta el logo en tamany 1:1
moguda la logica del main a la classe Logo
This commit is contained in:
@@ -494,7 +494,7 @@ void Surface::copyToTexture(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
int pitch = 0;
|
||||
|
||||
// Bloquea la textura para modificar los píxeles directamente
|
||||
if (SDL_LockTexture(texture, nullptr, reinterpret_cast<void **>(&pixels), &pitch) != 0)
|
||||
if (!SDL_LockTexture(texture, nullptr, reinterpret_cast<void **>(&pixels), &pitch))
|
||||
{
|
||||
throw std::runtime_error("Failed to lock texture: " + std::string(SDL_GetError()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user