Browse code

Merge branch 'main' of git.sr.ht:~rabbits/uxn

neauoire authored on 18/09/2021 16:14:45
Showing 2 changed files
... ...
@@ -11,3 +11,5 @@
11 11
 
12 12
 *snarf
13 13
 *theme
14
+
15
+*.rom
... ...
@@ -187,6 +187,7 @@ quit(void)
187 187
 static int
188 188
 init(void)
189 189
 {
190
+	int i;
190 191
 	SDL_AudioSpec as;
191 192
 	SDL_zero(as);
192 193
 	as.freq = SAMPLE_FREQUENCY;
... ...
@@ -218,6 +219,9 @@ init(void)
218 219
 		return error("sdl_texture", SDL_GetError());
219 220
 	if(!(ppu_screen = malloc(ppu.width * ppu.height * sizeof(Uint32))))
220 221
 		return 0;
222
+	for(i = ppu.width + ppu.height + PAD * 4 - 1; i >= 0; --i)
223
+		ppu_screen[i] = 0;
224
+	SDL_UpdateTexture(gTexture, NULL, ppu_screen, sizeof(Uint32));
221 225
 	SDL_StartTextInput();
222 226
 	SDL_ShowCursor(SDL_DISABLE);
223 227
 	gRect.x = PAD;