diff --git a/README.md b/README.md index f8f6162..555b3d2 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,12 @@ cc src/devices/datetime.c src/devices/system.c src/devices/file.c src/uxn.c -DND ## Devices - `00` system -- `10` console(partial) +- `10` console - `20` screen - `30` audio(missing) - `70` midi(missing) - `80` controller -- `90` mouse(partial) +- `90` mouse - `a0` file - `c0` datetime diff --git a/build.sh b/build.sh index 7585659..6956bfe 100755 --- a/build.sh +++ b/build.sh @@ -32,4 +32,4 @@ bin/uxncli etc/drifblim.rom etc/polycat.tal && mv etc/polycat.rom bin/ echo "Running.." bin/uxn11 bin/polycat.rom -echo "Done." \ No newline at end of file +echo "Done." diff --git a/src/uxn11.c b/src/uxn11.c index 4123405..8207d33 100644 --- a/src/uxn11.c +++ b/src/uxn11.c @@ -148,7 +148,12 @@ processEvent(Uxn *u) } break; case ButtonPress: { XButtonPressedEvent *e = (XButtonPressedEvent *)&ev; - mouse_down(u, &u->dev[0x90], 0x1 << (e->button - 1)); + if(e->button == 4) + mouse_scroll(u, &u->dev[0x90], 0, 1); + else if(e->button == 5) + mouse_scroll(u, &u->dev[0x90], 0, -1); + else + mouse_down(u, &u->dev[0x90], 0x1 << (e->button - 1)); } break; case ButtonRelease: { XButtonPressedEvent *e = (XButtonPressedEvent *)&ev;