Fixed issue with ctrl/key

This commit is contained in:
neauoire 2021-05-19 12:23:20 -07:00
parent 8c1cf40cb1
commit 229a0f0184
1 changed files with 2 additions and 2 deletions

View File

@ -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));
}