Unset mouse wheel after eval

This commit is contained in:
neauoire 2021-05-29 15:05:43 -07:00
parent 3276b370e8
commit 70edfce206
1 changed files with 2 additions and 3 deletions

View File

@ -162,9 +162,7 @@ domouse(SDL_Event *event)
switch(event->type) {
case SDL_MOUSEBUTTONDOWN:
devmouse->dat[6] |= flag;
if(flag == 0x10 && (devmouse->dat[6] & 0x01))
if(flag == 0x01 && (devmouse->dat[6] & 0x10))
break;
break;
case SDL_MOUSEBUTTONUP:
devmouse->dat[6] &= (~flag);
break;
@ -353,6 +351,7 @@ start(Uxn *u)
case SDL_MOUSEWHEEL:
devmouse->dat[7] = event.wheel.y;
evaluxn(u, mempeek16(devmouse->dat, 0));
devmouse->dat[7] = 0;
break;
case SDL_MOUSEBUTTONUP:
case SDL_MOUSEBUTTONDOWN: