Fixed issue with mouse zoom
This commit is contained in:
parent
a58ffb9828
commit
de3591c07e
4
build.sh
4
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."
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue