emu: don't call SDL_UpdateTexture with NULL pixels

This commit is contained in:
Sigrid Solveig Haflínudóttir 2021-09-17 17:22:12 +02:00
parent 373a797e1e
commit 8d98d6d6ef
1 changed files with 0 additions and 1 deletions

View File

@ -216,7 +216,6 @@ init(void)
gTexture = SDL_CreateTexture(gRenderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, ppu.width + PAD * 2, ppu.height + PAD * 2); gTexture = SDL_CreateTexture(gRenderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, ppu.width + PAD * 2, ppu.height + PAD * 2);
if(gTexture == NULL || SDL_SetTextureBlendMode(gTexture, SDL_BLENDMODE_NONE)) if(gTexture == NULL || SDL_SetTextureBlendMode(gTexture, SDL_BLENDMODE_NONE))
return error("sdl_texture", SDL_GetError()); return error("sdl_texture", SDL_GetError());
SDL_UpdateTexture(gTexture, NULL, ppu_screen, 4);
if(!(ppu_screen = malloc(ppu.width * ppu.height * sizeof(Uint32)))) if(!(ppu_screen = malloc(ppu.width * ppu.height * sizeof(Uint32))))
return 0; return 0;
SDL_StartTextInput(); SDL_StartTextInput();