mouseZspeed madness

Blitz3D Forums/Blitz3D Beginners Area/mouseZspeed madness

koekjesbaby(Posted 2004) [#1]
if i run this code, scroll a little and switch to another program (say: a chat window) the mouseZspeed sometimes changes to a random(?) number. if i do not scroll in the blitz window and change the focus to other windows, nothing happens (well, the scoll value doesn't change).

why?

Graphics 200,200,16,2
SetBuffer(BackBuffer())

temp = 0
While Not KeyHit(1)
	Cls
	scroll = MouseZSpeed()
	If scroll <> 0 Then
		temp = scroll
		
	EndIf
	
	Text 10,10, temp
	Flip(0)
Wend



eBusiness(Posted 2004) [#2]
MouseZSpeed return the difference in wheel position since last call, just call MouseZ() instead.


Zethrax(Posted 2004) [#3]
Yes, I've encountered this problem. I posted a bug report about it several months ago.


eBusiness(Posted 2004) [#4]
Oh, like that, well that's strange. Ahh, it's not a random number, when you switch away from the Blitz program (or back to, hard to tell) the wheel counter (the one returned from MouseZ()) is reset. If you replace MouseZSpeed() with MouseZ() you will see a similar bug.