GLBasic forum

Main forum => Bug Reports => Topic started by: salmax on 2015-Aug-20

Title: 14.006 (windows 10) Mouse problem
Post by: salmax on 2015-Aug-20
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".
Title: Re: 14.006 (windows 10) Mouse problem
Post by: spacefractal on 2015-Aug-20
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.
Title: Re: 14.006 (windows 10) Mouse problem
Post by: salmax on 2015-Aug-20
Simple code for test this problem.

Code (glbasic) Select

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
Title: Re: 14.006 (windows 10) Mouse problem
Post by: erico on 2015-Aug-20
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.
Title: Re: 14.006 (windows 10) Mouse problem
Post by: spacefractal on 2015-Aug-20
Bug Confirmed.

MOUSESTATE do works in v12
Title: Re: 14.006 (windows 10) Mouse problem
Post by: Qedo on 2015-Aug-20
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

Code (glbasic) Select

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
Title: Re: 14.006 (windows 10) Mouse problem
Post by: Hemlos on 2015-Aug-20
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
Title: Re: 14.006 (windows 10) Mouse problem
Post by: spacefractal on 2015-Aug-21
The perscaler should been in own thread.

He wrote it'd was about scaler 2 only that did not work,rest work.
Title: Re: 14.006 (windows 10) Mouse problem
Post by: Hemlos on 2015-Aug-21
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
Title: Re: 14.006 (windows 10) Mouse problem
Post by: erico on 2015-Aug-21
I don´t get it.

PRESCALER worked fine here.
I agree with the mouse wheel, no response.
Title: Re: 14.006 (windows 10) Mouse problem
Post by: spacefractal on 2015-Aug-21
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.



Title: Re: 14.006 (windows 10) Mouse problem
Post by: Hemlos on 2015-Aug-22
Applying murphys law; a system based on the number 2, 2 will be broken.
Title: Re: 14.006 (windows 10) Mouse problem
Post by: MrTAToad on 2015-Aug-25
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
Title: Re: 14.006 (windows 10) Mouse problem
Post by: Hemlos on 2015-Aug-25
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?
Title: Re: 14.006 (windows 10) Mouse problem
Post by: MrTAToad on 2015-Aug-26
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.
Title: Re: 14.006 (windows 10) Mouse problem
Post by: Robert on 2015-Sep-19
The mouse problem for W10 corncerns all versions after 12.308.
Title: Re: 14.006 (windows 10) Mouse problem
Post by: MrTAToad on 2015-Sep-19
Yes, its a release mode problem (is okay in debug mode)
Title: Re: 14.006 (windows 10) Mouse problem
Post by: MrTAToad on 2015-Nov-21
The mouse problem is still in 14.095
Title: Re: 14.006 (windows 10) Mouse problem
Post by: mull on 2015-Nov-24
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.
Title: Re: 14.006 (windows 10) Mouse problem
Post by: Ian Price on 2015-Nov-25
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.

Code (glbasic) Select

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.
Title: Re: 14.006 (windows 10) Mouse problem
Post by: MrTAToad on 2015-Nov-25
This problem also affects MOUSEAXIS too
Title: Re: 14.006 (windows 10) Mouse problem
Post by: Ian Price on 2015-Nov-25
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).
Title: Re: 14.006 (windows 10) Mouse problem
Post by: MrTAToad on 2015-Nov-26
Indeed - although I didn't test V12 much as I moved onto V14 :)
Title: Re: 14.006 (windows 10) Mouse problem
Post by: Kitty Hello on 2015-Nov-26
14.106 fixed it. You're welcome.
Title: Re: 14.006 (windows 10) Mouse problem
Post by: Kitty Hello on 2015-Nov-26
Fixed in 14.106.
Title: Re: 14.006 (windows 10) Mouse problem
Post by: Ian Price on 2015-Nov-26
Cheers :)
Title: Re: 14.006 (windows 10) Mouse problem
Post by: mull on 2015-Nov-27
SETMOUSE, MOUSESTATE ist OK, MOUSEAXIS is not fixed
Title: Re: 14.006 (windows 10) Mouse problem
Post by: UBERmonkeybot on 2015-Nov-27
Thanks Kitty.
Title: Re: 14.006 (windows 10) Mouse problem
Post by: salmax on 2015-Nov-28
Thanks Kitty. Maybe in next version mouse wheel start to work :)
Title: Re: 14.006 (windows 10) Mouse problem
Post by: Kitty Hello on 2015-Nov-29
Doh. Mousewheel...