diff --git a/src/renderer.c b/src/renderer.c index 8cf40ac..186fb67 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -29,10 +29,9 @@ SDL_Renderer *renderer; SDL_Texture *renderer_texture; void renderer_update() -{ - SDL_LockTexture(renderer_texture, NULL, &(screen->pixels), &(screen->pitch)); +{ + SDL_UpdateTexture(renderer_texture, NULL, screen->pixels, screen->pitch); SDL_RenderCopy(renderer, renderer_texture, NULL, NULL); - SDL_UnlockTexture(renderer_texture); SDL_RenderPresent(renderer); }