(SOLVED) Mouse erratic (DPI-aware related)

Everything related to 3D programming
User avatar
DK_PETER
Addict
Addict
Posts: 898
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

(SOLVED) Mouse erratic (DPI-aware related)

Post by DK_PETER »

I'd completely forgot about this. Solved it a few of days later.. :oops:

When using WindowedScreen() - remember to activate the DPI awareness in the compiler settings.
Without it the erratic behaviour occurs due to wrong calculations.

Why the WindowedScreen depends on the dpi awareness - i do not know, though.

So, please ignore everything below this.

Best regards
Peter

Hi.
I've confirmed a bug report made by AndreasG.
What happens is that the MouseDelta functions begins to
return positive values only. Quite frankly, I have NO
idea, why this happens - other than some late Windows update
has been modified by Microsoft and that modification interferes
with how the MouseDelta reports values.
The erratic reporting comes from WindowedScreen(). FullScreen is steady and reports correctly.

What I do know is that it is related to Window 8.1 and Windows 10 (All versions - any language).

My setup:
Clean install: Windows 8.1 and Windows 10 Pro.
Both systems has this installed only.
AVG internet suite
GeForce Drivers (latest)
Thunderbird mail
Firefox
PureBasic 5.72 LTS Beta 1 and PureBasic 5.62 (Same erratic behaviour displayed using both)
---------------------------------------------
All updates from Microsoft installed.
---------------------------------------------

What to look for:
No matter how you move your mouse, only large positive values are returned.
If you look at the animated gif, you'll see that it is not persistent.

Thank you in advanced.
Best regards

EDIT:

Image
Last edited by DK_PETER on Sat Sep 12, 2020 2:55 pm, edited 4 times in total.
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
PeDe
Enthusiast
Enthusiast
Posts: 123
Joined: Sun Nov 26, 2017 3:13 pm
Location: Vienna
Contact:

Re: MouseDelta erratic behaviour (Window 8.1 - windows 10)

Post by PeDe »

Windows 10 Version 1909 64-Bit (Build 18363.592)
Sony VAIO Notebook (2013, Intel Pentium CPU 2020M 2.4 GHz, AMD Radeon HD 7650M)
No other Software installed, all drivers from Windows installation.

Code 1 32/64-Bit:
DX9: does not start
DX11: does not start
OpenGL: ok, no problem

PB Example 1 32/64-Bit:
DX9: does not start
DX11: does not start
OpenGL: does not start

PB Example 2 32/64-Bit:
DX9: does not start
DX11: does not start
OpenGL: does start, black and yellow distorted image. No problem with moving mouse.


Same Notebook with Windows 7 64-Bit
No other Software installed, only drivers and online update

Code 1 32/64-Bit:
DX9: does not start
DX11: ok, no problem - EDIT: does not start!
OpenGL: ok, no problem

PB Example 1 32/64-Bit:
DX9: does not start
DX11: ok, no problem - EDIT: does not start!
OpenGL: ok, no problem

PB Example 2 32/64-Bit:
DX9: does not start
DX11: ok, no problem - EDIT: does not start!
OpenGL: ok, no problem

Peter
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: MouseDelta erratic behaviour (Window 8.1 - windows 10)

Post by kenmo »

All 3 examples work OK for me (PB 5.71 x86 on Windows 10) with a Dell mouse.

Can you output what the MouseDelta() values are?

"Small negative values showing up as large positive values" sounds like a bug of unsigned-vs-signed or maybe 16-bit vs 32-bit, or similar.

For example (if MouseDelta was 16-bit) if MouseDelta is supposed to be -5 maybe it's being interpreted as unsigned somewhere, and showing up as +65531 instead (both $FFFB in 16-bit).
User avatar
DK_PETER
Addict
Addict
Posts: 898
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: MouseDelta erratic behaviour (Window 8.1 - windows 10)

Post by DK_PETER »

Edit: Reduced the post...
I appreciate your input.

I now know that it is IDE related (combined with Windows updates).
It is NOT related to 3D only...2D can easily produce the same bizar mouse behaviour.
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Post Reply