Fixed issue with mouse where scroll-x would trigger click events

This commit is contained in:
Devine Lu Linvega 2024-03-07 11:02:18 -08:00
parent 8fb5a11731
commit 45fd270e9d
1 changed files with 5 additions and 1 deletions

View File

@ -171,6 +171,10 @@ emu_event(Uxn *u)
mouse_scroll(u, &u->dev[0x90], 0, 1);
else if(e->button == 5)
mouse_scroll(u, &u->dev[0x90], 0, -1);
else if(e->button == 6)
mouse_scroll(u, &u->dev[0x90], 1, 0);
else if(e->button == 7)
mouse_scroll(u, &u->dev[0x90], -1, 0);
else
mouse_down(u, &u->dev[0x90], 0x1 << (e->button - 1));
} break;
@ -267,7 +271,7 @@ main(int argc, char **argv)
int i = 1;
char *rom;
if(i != argc && argv[i][0] == '-' && argv[i][1] == 'v') {
fprintf(stdout, "Uxn11 - Varvara Emulator, 4 Mar 2023.\n");
fprintf(stdout, "Uxn11 - Varvara Emulator, 7 Mar 2023.\n");
i++;
}
rom = i == argc ? "boot.rom" : argv[i++];