14.006 (windows 10) Mouse problem

Previous topic - Next topic

salmax

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".
8bit forever!

spacefractal

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.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

salmax

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
8bit forever!

erico

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.

spacefractal

#4
Bug Confirmed.

MOUSESTATE do works in v12
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Qedo

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

Hemlos

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
Bing ChatGpt is pretty smart :O

spacefractal

The perscaler should been in own thread.

He wrote it'd was about scaler 2 only that did not work,rest work.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Hemlos

#8
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
Bing ChatGpt is pretty smart :O

erico

I don´t get it.

PRESCALER worked fine here.
I agree with the mouse wheel, no response.

spacefractal

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.



Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Hemlos

Applying murphys law; a system based on the number 2, 2 will be broken.
Bing ChatGpt is pretty smart :O

MrTAToad

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

Hemlos

#13
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?
Bing ChatGpt is pretty smart :O

MrTAToad

#14
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.