From f43c81ec071be3de9b5f6c54c88f7a4dd4d0f019 Mon Sep 17 00:00:00 2001 From: Julie Marchant Date: Thu, 13 Jun 2019 11:39:45 -0400 Subject: [PATCH] Switch back to SDL_UpdateTexture. Hopefully temporary until I findout what I'm doing wrong. --- src/renderer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); }