uxn

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

commit 229a0f0184a88a90fa188d9c650ec34ecc858dd3
parent 8c1cf40cb1c4d08ce3eb3d5e35ea930770364c64
Author: neauoire <aliceffekt@gmail.com>
Date:   Wed, 19 May 2021 12:23:20 -0700

Fixed issue with ctrl/key

Diffstat:
Msrc/emulator.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/emulator.c b/src/emulator.c @@ -334,7 +334,7 @@ start(Uxn *u) case SDL_TEXTINPUT: case SDL_KEYDOWN: case SDL_KEYUP: - if(event.text.text[0] >= ' ' || event.text.text[0] <= '~') + if(event.text.text[0] >= ' ' && event.text.text[0] <= '~') devctrl->dat[3] = event.text.text[0]; doctrl(u, &event, event.type == SDL_KEYDOWN); evaluxn(u, mempeek16(devctrl->dat, 0)); @@ -362,7 +362,7 @@ start(Uxn *u) evaluxn(u, mempeek16(devscreen->dat, 0)); if(reqdraw) redraw(ppu.output, u); - if(!bench){ + if(!bench) { elapsed = (SDL_GetPerformanceCounter() - start) / (double)SDL_GetPerformanceFrequency() * 1000.0f; SDL_Delay(clamp(16.666f - elapsed, 0, 1000)); }