diff --git a/build.sh b/build.sh index 0bdf540..83d0635 100755 --- a/build.sh +++ b/build.sh @@ -54,9 +54,9 @@ then fi echo "Assembling.." -./bin/uxnasm projects/examples/devices/screen.tal bin/screen.rom +./bin/uxnasm projects/examples/demos/theme.tal bin/theme.rom echo "Running.." -./bin/uxnemu bin/screen.rom +./bin/uxnemu bin/theme.rom echo "Done." diff --git a/src/uxnemu.c b/src/uxnemu.c index 193263e..2db48c0 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -213,8 +213,8 @@ static void domouse(SDL_Event *event) { Uint8 flag = 0x00; - Uint16 x = clamp(event->motion.x - PAD, 0, ppu.width - 1); - Uint16 y = clamp(event->motion.y - PAD, 0, ppu.height - 1); + Uint16 x = clamp(event->motion.x / zoom - PAD, 0, ppu.width - 1); + Uint16 y = clamp(event->motion.y / zoom - PAD, 0, ppu.height - 1); mempoke16(devmouse->dat, 0x2, x); mempoke16(devmouse->dat, 0x4, y); switch(event->button.button) {