mouse.delta discrepancy

Official forum for open source FreePIE discussion and development.
Post Reply
DrDim
One Eyed Hopeful
Posts: 24
Joined: Mon Jan 05, 2015 4:33 am

mouse.delta discrepancy

Post by DrDim »

Hi!.

I made a script or a game (Dark Forces) that translates vertical mouse movement into button presses. Works perfectly fine on my machine:

http://steamcommunity.com/app/32400/dis ... 693466476/

However another player reports that it behaves differently on his PC. We narrowed it down to the mouse.deltaY values. Apparently he only gets values other than 0 when he slowly moves his mouse and even then it's 0 most of the time. This is not an issue on my end.

Any idea what may cause this discrepancy? Maybe different mouse settings?

Here's a simplified version of the script (the advanced version is smoothing the input instead of using "raw" values but essentially it's the same):

Code: Select all

if starting:
	toggleUp = 0
	toggleDown = 0

if mouse.deltaY > 0:
	toggleUp = 1
	toggleDown = 0
	counter = 0
elif mouse.deltaY < 0:
	toggleUp = 0
	toggleDown = 1
	counter = 0
else:
	toggleUp = 0
	toggleDown = 0
	
keyboard.setKey(Key.PageUp, toggleUp)
keyboard.setKey(Key.PageDown, toggleDown)

diagnostics.watch(keyboard.getKeyDown(Key.PageUp))
diagnostics.watch(keyboard.getKeyDown(Key.PageDown))
diagnostics.watch(mouse.deltaY)
FrenchyKiel
One Eyed Hopeful
Posts: 47
Joined: Thu Oct 03, 2013 7:10 am

Re: mouse.delta discrepancy

Post by FrenchyKiel »

Make sure "Enhanced pointer precision" is not ticked
Post Reply

Return to “FreePIE”