uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 9eb2f9c010eb1bde2c14233681eb88df37fcda80
parent cba316cf3ab694a128e9f321cd68ff7fefbec200
Author: neauoire <aliceffekt@gmail.com>
Date:   Sat, 18 Sep 2021 09:14:45 -0700

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

Diffstat:
M.gitignore | 2++
Msrc/uxnemu.c | 4++++
2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -11,3 +11,5 @@ *snarf *theme + +*.rom diff --git a/src/uxnemu.c b/src/uxnemu.c @@ -187,6 +187,7 @@ quit(void) static int init(void) { + int i; SDL_AudioSpec as; SDL_zero(as); as.freq = SAMPLE_FREQUENCY; @@ -218,6 +219,9 @@ init(void) return error("sdl_texture", SDL_GetError()); if(!(ppu_screen = malloc(ppu.width * ppu.height * sizeof(Uint32)))) return 0; + for(i = ppu.width + ppu.height + PAD * 4 - 1; i >= 0; --i) + ppu_screen[i] = 0; + SDL_UpdateTexture(gTexture, NULL, ppu_screen, sizeof(Uint32)); SDL_StartTextInput(); SDL_ShowCursor(SDL_DISABLE); gRect.x = PAD;