Browse code

Repaired zoom

neauoire authored on 28/08/2021 20:44:53
Showing 1 changed files
... ...
@@ -112,7 +112,14 @@ redraw(Uxn *u)
112 112
 {
113 113
 	if(devsystem->dat[0xe])
114 114
 		inspect(&ppu, u->wst.dat, u->wst.ptr, u->rst.ptr, u->ram.dat);
115
-	SDL_BlitSurface(idxSurface, NULL, winSurface, &gRect);
115
+	if(rgbaSurface == NULL)
116
+		SDL_BlitScaled(idxSurface, NULL, winSurface, &gRect);
117
+	else if(zoom == 1)
118
+		SDL_BlitSurface(idxSurface, NULL, winSurface, &gRect);
119
+	else {
120
+		SDL_BlitSurface(idxSurface, NULL, rgbaSurface, NULL);
121
+		SDL_BlitScaled(rgbaSurface, NULL, winSurface, &gRect);
122
+	}
116 123
 	SDL_UpdateWindowSurface(gWindow);
117 124
 	reqdraw = 0;
118 125
 }