Log In  

When I use vid(3) to change the video resolution, it seems to mess with the mouse() reading.

The code below replicates the error for me (v0.1.0e, Mac version):

function _init()
    vid(3)
end

function _update()
    mx,my,mb=mouse()
end

function _draw()
    cls()
    print( mx .. ":" .. my .. ":" .. mb, 5, 5, 7 )
end

For me, when I run the above code, there are large portions of the screen which do not register "mb" as "1" when I click with the mouse. The only portions of the screen that properly register the mouse button as "1" is a rectangle in the upper-left corner, from (mx=0,my=0) to about (mx=119,my=67).

Weirdly, if you click inside that rectangle, the mouse button registers as a "1" and continues to register as a "1" as long as you hold it down even outside that rectangle, so it only seems to affect the initial mouse-down event.

If I comment out the "vid(3)" line, the mouse works as expected over the entire window, so it appears to be specific to the "vid(3)" video mode.

If I change it to "vid(4)" the rectangle contracts again to about (0,0,53,26), so it seems to be related to the "zoom level" of Picotron's resolution.

P#146624 2024-04-14 17:21 ( Edited 2024-04-14 20:05)

Just a note to say that the bug is still present in v0.1.0f.

P#146997 2024-04-20 05:34
5

Thanks @nephilim -- this is fixed for 0.1.0g

P#147177 2024-04-23 06:05

Awesome! Thanks @zep!

P#147191 2024-04-23 13:55

[Please log in to post a comment]