From c84b5015e4c8b22173317cfc20e1b5ced202bd09 Mon Sep 17 00:00:00 2001 From: neauoire Date: Sat, 28 Aug 2021 13:44:53 -0700 Subject: [PATCH] Repaired zoom --- src/uxnemu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/uxnemu.c b/src/uxnemu.c index 4d501ba..4c8f892 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -112,7 +112,14 @@ redraw(Uxn *u) { if(devsystem->dat[0xe]) inspect(&ppu, u->wst.dat, u->wst.ptr, u->rst.ptr, u->ram.dat); - SDL_BlitSurface(idxSurface, NULL, winSurface, &gRect); + if(rgbaSurface == NULL) + SDL_BlitScaled(idxSurface, NULL, winSurface, &gRect); + else if(zoom == 1) + SDL_BlitSurface(idxSurface, NULL, winSurface, &gRect); + else { + SDL_BlitSurface(idxSurface, NULL, rgbaSurface, NULL); + SDL_BlitScaled(rgbaSurface, NULL, winSurface, &gRect); + } SDL_UpdateWindowSurface(gWindow); reqdraw = 0; }