mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-05 22:05:04 +00:00
Fixed issue with ctrl/key
This commit is contained in:
parent
8c1cf40cb1
commit
229a0f0184
1 changed files with 2 additions and 2 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue