1. (window) Any mouse butons in methods "MOUSESTATE" and "MOUSEAXIS" always returns the state for the first buton (mousewheel not working too).
2. (fullscreen) Methods "MOUSESTATE" and "MOUSEAXIS" not working. If use "SYSTEMPOINTER true" methods working but problem with point "1" still exists.
In earlier versions, there was not this problem, but do not know if this case is not the fault "Windows 10".
MOUSESTATE does works here, but you do need to click once on the fullscreen window, before its works for some reason. Im do only use first button.
Simple code for test this problem.
LOCAL mx%,my%,b1%,b2%,b3%,mw%,b1a%,b2a%
LOCAL sx%,sy%
GETDESKTOPSIZE sx,sy
SETSCREEN sx,sy,1
PRESCALER 640,360
LIMITFPS 60,TRUE
//only works if uncomment next line
//SYSTEMPOINTER TRUE
WHILE TRUE
MOUSESTATE mx,my,b1,b2
mw=MOUSEAXIS(2)
b1a=MOUSEAXIS(3)
b2a=MOUSEAXIS(4)
b3=MOUSEAXIS(5)
CLEARSCREEN RGB(204,204,204)
PRINT "MX :"+mx,10,0
PRINT "MY :"+my,10,10
PRINT "B1 :"+b1,10,20
PRINT "B2 :"+b2,10,30
PRINT "B1a:"+b1a,10,40
PRINT "B2a:"+b2a,10,50
PRINT "B3 :"+b3,10,60
PRINT "MW :"+mw,10,70
SHOWSCREEN
WEND
I confirm it works on 006 on win 7, even the full screen.
I never used MOUSEAXIS, the results I get I think are a bit different from what the manual states.
It could really be something in win10, let´s see what others find.
Bug Confirmed.
MOUSESTATE do works in v12
Two issues on my computer px 1366x768 win7 GLB 14.006:
1) MOUSEAXIS(2) 2=Wheel (1 up, -1 down) don't work
2) PRESCALER, scaling with factors 2 don't work
see program
ciao
Qedo
GLOBAL mx%,my%,b1%,b2%,b3%,mw%,b1a%,b2a%,estr_x,estr_y,xfactor#
LOCAL sx#,sy#,a#,Indice%
GLOBAL factor#[]
RESTORE n_factor
REPEAT
READ a
DIMPUSH factor[],a
UNTIL a=0
Indice=0
xfactor=1
GETDESKTOPSIZE sx,sy
SETSCREEN sx,sy,1
//The scaling is done using factors: 1 ok, 1.5 ok, 2 wrong,3 ok,4 ok,8 ok,10 ok, AND all INTEGER numbers above (non verified).
//The scaling won't be reduced TO < 1.0.
SYSTEMPOINTER TRUE
PRESCALER sx/1,sy/1
WHILE TRUE
IF KEY(30) // Key A
Indice=Indice+1
xfactor=factor[Indice]
IF xfactor=0
Indice=0
xfactor=factor[Indice]
ENDIF
SETSCREEN sx,sy,1
PRESCALER sx/xfactor,sy/xfactor
SLEEP 2000
ENDIF
MOUSESTATE mx,my,b1,b2
mw=MOUSEAXIS(2)
b1a=MOUSEAXIS(3)
b2a=MOUSEAXIS(4)
b3=MOUSEAXIS(5)
CLEARSCREEN RGB(0,0,127)
GOSUB pos_stringa //only to correct position of the text
PRINT "MX :"+mx,mx-estr_x,my-estr_y,1
PRINT "MY :"+my,mx-estr_x,my+10-estr_y,1
PRINT "B1 :"+b1,mx-estr_x,my+20-estr_y,1
PRINT "B2 :"+b2,mx-estr_x,my+30-estr_y,1
PRINT "B1a:"+b1a,mx-estr_x,my+40-estr_y,1
PRINT "B2a:"+b2a,mx-estr_x,my+50-estr_y,1
PRINT "B3 :"+b3,mx-estr_x,my+60-estr_y,1
PRINT "MW :"+mw,mx-estr_x,my+70-estr_y,1
SHOWSCREEN
WEND
SUB pos_stringa:
LOCAL tx, ty,sx, sy
estr_x=0
IF LEN ("MX :"+mx,1)>estr_x THEN estr_x=LEN ("MX :"+mx,1)
IF LEN ("MY :"+my,1)>estr_x THEN estr_x=LEN ("MX :"+mx,1)
IF LEN ("B1 :"+b1,1)>estr_x THEN estr_x=LEN ("MX :"+mx,1)
IF LEN ("B2 :"+b2,1)>estr_x THEN estr_x=LEN ("MX :"+mx,1)
IF LEN ("B1a:"+b1a,1)>estr_x THEN estr_x=LEN ("MX :"+mx,1)
IF LEN ("B2a:"+b2a,1)>estr_x THEN estr_x=LEN ("MX :"+mx,1)
IF LEN ("B3 :"+b3,1)>estr_x THEN estr_x=LEN ("MX :"+mx,1)
IF LEN ("MW :"+mw,1)>estr_x THEN estr_x=LEN ("MX :"+mx,1)
GETFONTSIZE tx, ty
estr_y=ty+70
GETSCREENSIZE sx, sy
IF mx < sx/2 THEN estr_x=0
IF my < sy/2 THEN estr_y=0
PRINT "X SCREEN = "+sx,10,sy/2-1.5*ty,1
PRINT "Y SCREEN = "+sy,10,sy/2-.5*ty,1
PRINT "Factor = "+xfactor,10,sy/2+.5*ty,1
PRINT "press key A to change factor",10,sy/2+1.5*ty,1
ENDSUB
STARTDATA n_factor:
DATA 1,1.5,2,3,4,8,10,0
ENDDATA
Confirmed bug with mouseaxis not working proper.
About your other issue with prescaler...
The scaling won't be reduced to < 1.0. as per manual
The perscaler should been in own thread.
He wrote it'd was about scaler 2 only that did not work,rest work.
it should if its a bug.....this is what i found to fix it:
//SETSCREEN sx,sy,1
PRESCALER sx/xfactor,sy/xfactor
is it really a bug?
eg. SETSCREEN sx,sy,1 //this was already called
ps. the mousewheel detection is definetly broken, i tried everything i could think of with it, and even adding mw=mw+mouse shows nothing too.
it stays 0
I don´t get it.
PRESCALER worked fine here.
I agree with the mouse wheel, no response.
Im also confirm the PRESCALER 2,2 issue (ONLY PRESCALER 2,2 not working correctly).
Its can been seen since MOUSESTATE not output correctly at all here as well.
So there is some issues left with the MOUSESTATE, MOUSEAXIS and eventuelly in PRESCALER 2,2 (others works fine as he wrote). Its could also been mouse only issue as well when PRESCALER 2,2 is used.
Applying murphys law; a system based on the number 2, 2 will be broken.
I'm finding that both MOUSESTATE and all parameters in MOUSEAXIS return 0 - but only in release mode. In debug mode, it works, but :
Mouseaxis(3) returns 1 no matter what button is pressed..
Mouseaxis(2) returns 0
I thought i was having a problem with mouseaxis too.....BUT....
Try this.....put all mouseaxis c0mmands exactly right before showscreen.
This solved all my issues with this command.
Somehow, showscreen plays a role in this commands states.
Unlike MOUSESTATE, which can be put at the top of your loops.
Im going to make a silly assumption, mouseaxis uses gettimer() haha
ps. check your mouse for problems, perhaps your button is broken?
Further to the mouse bug - it looks like Bluetooth and touchpad mice cant be used (nothing happens when trying to use these).
That appears to be slightly incorrect - USB mice wont work, unless its in debug mode.
The mouse problem for W10 corncerns all versions after 12.308.
Yes, its a release mode problem (is okay in debug mode)
The mouse problem is still in 14.095
I have Windows 10 and the same Problem with Setmouse and the Mousebutton in V 14.095
The same Code under V 12... works fine.
This is me not to work with V 14.095
I must go back to V12.
MOUSESTATE mx,my,b1,b2 reports b1 as 1 whether b1 OR b2 is pressed. The value for b2 is never returned. This is in Windows 8.XX using version v12.656 and up (inc. 14.095). V10.XX does not have this issue.
GLOBAL mx%, my%, b1%, b2%
WHILE TRUE
MOUSESTATE mx,my,b1,b2
PRINT b1+" "+b2, 20, 20
SHOWSCREEN
WEND
This is definitely appears to be a GLB issue and not Windows 10 as per thread title.
This problem also affects MOUSEAXIS too
Yeah, so I read earlier, but I haven't tested that.
Just wanted to say that the problem does affect some GLB v12.xxx and v14.xxx versions on Windows 8 (and expect Win7 and below too).
Indeed - although I didn't test V12 much as I moved onto V14 :)
14.106 fixed it. You're welcome.
Fixed in 14.106.
Cheers :)
SETMOUSE, MOUSESTATE ist OK, MOUSEAXIS is not fixed
Thanks Kitty.
Thanks Kitty. Maybe in next version mouse wheel start to work :)
Doh. Mousewheel...