Bug: Enhance Pointer Precision

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
fishstik
New User
Posts: 5
Joined: Fri May 28, 2021 5:55 pm

Re: Bug: Enhance Pointer Precision

Post by fishstik »

Sorry about that!

A quick update though. I was messing around with the XMBC settings and I enabled the "Allow XMBC to set the mouse speed and DPI" global setting, then disabled it again. It appears now the Windows EPP and speed settings are staying intact through settings applications and profile switches now.

Not sure what was going on before...

fishstik
New User
Posts: 5
Joined: Fri May 28, 2021 5:55 pm

Re: Bug: Enhance Pointer Precision

Post by fishstik »

Nevermind, it came back :(

On profile switch/settings apply, It seems like it's setting the speed and EPP values from the global setting even though it's disabled.

What made me think it was fixed was that it seems to behave temporarily when you change a value (speed and/or EPP) in the global settings, then disable it. Not sure what triggers it to misbehave again though.

Also just realized there's a log. I'm seeing a bunch of

Code: Select all

NewApplicationSettings: Ignoring mouse speed as XMBC is not allowed to change it
which I assume is expected. I'll take a look what it says next time it misbehaves...

User avatar
phil
Site Admin
Posts: 6762
Joined: Sun Apr 06, 2003 11:12 pm

Re: Bug: Enhance Pointer Precision

Post by phil »

Yeah that is expected, although maybe it should only be coming out when debug logging is enabled (otherwise it could get quite verbose rather quickly!!). I also will be interested if it says anything or nothing at all when it goes wrong - chances are I may have missed a place where the setting can be modified and its not checking the new setting maybe.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

fishstik
New User
Posts: 5
Joined: Fri May 28, 2021 5:55 pm

Re: Bug: Enhance Pointer Precision

Post by fishstik »

Ah, I get those messages without DEBUG enabled. I just enabled it and I'm getting much more output. I still haven't figured out what exactly causes it to start misbehaving again after my temporary fix of toggling the global settings.

I have my Windows mouse settings as follows:

Code: Select all

accel_threshold1 = 6
accel_threshold2 = 10
speed = 20
accel_enabled (enhance pointer precision) = 1
or (6 10 20 1).

When switching to or from GIMP.exe (for which I have a profile set), or when I press 'Apply' or 'Close' on the XMBC Setup dialog, it gets set to

Code: Select all

accel_threshold1 = 0
accel_threshold2 = 0
speed = 20
accel_enabled (enhance pointer precision) = 0
or (0 0 20 0).

Here are the scenarios I found so far that switch my mouse settings from (6 10 20 1) to (0 0 20 0):

When I mouse-over to GIMP:
https://hastebin.com/iwuhuzetop
Of note is the following:

Code: Select all

02-06-2021 10:21:53.225> NewApplicationSettings: Ignoring mouse speed as XMBC is not allowed to change it
02-06-2021 10:21:53.225> NewApplicationSettings: Turning OFF mouse pointer precision
When I press 'Apply' on the XMBC Setup dialog:
https://hastebin.com/enayakicat

When I start XMBC (it switches back to (6 10 20 1) when I shutdown XMBC):
https://hastebin.com/izoyehigah

User avatar
phil
Site Admin
Posts: 6762
Joined: Sun Apr 06, 2003 11:12 pm

Re: Bug: Enhance Pointer Precision

Post by phil »

Aha, thats the problem I bet.... Its ignoring the "allow XMBC to change cursor speeds" when doing the pointer precision...
Can confirm the code does not check it - I will change it to only apply the pointer precision setting IF the 'allow XMBC to set the mouse speed and DPI' is set.

It also seems to be messing up the acceleration values too - thats not good - but I think I see why! ... So that needs to be fixed too.

I will also change the messages to DEBUG log only so they don't flood the normal log!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

User avatar
phil
Site Admin
Posts: 6762
Joined: Sun Apr 06, 2003 11:12 pm

Re: Bug: Enhance Pointer Precision

Post by phil »

Out of interest, what are you using to see / set the
accel_threshold1 = 6
accel_threshold2 = 10

My mouse control panel only has the pointer precision setting, not anything for accelerations.... Im sure it used to be in there but not anymore.
I want to make sure my changes are working but all three values are 0 when XMBC reads them (and Im not sure if that right or not!).
Certainly it was wiping them out and setting them to zero mistakenly which no doubt is the cause of your troubles!

EDIT: Forget that, turning ON pointer precision in control panel is what sets the 6 and 10 (and it appears it cant be changed from that in the normal Windows 10 GUI).
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

fishstik
New User
Posts: 5
Joined: Fri May 28, 2021 5:55 pm

Re: Bug: Enhance Pointer Precision

Post by fishstik »

Thanks for looking at it!

I am using an AutoHotKey script to monitor and set my mouse settings. It issues a DLL call to SystemParametersInfo like so:

Code: Select all

SPI_GETMOUSE      := 0x03
SPI_SETMOUSE      := 0x04
SPI_GETMOUSESPEED := 0x70
SPI_SETMOUSESPEED := 0x71

; set mouse speed
DllCall("SystemParametersInfo", UInt, SPI_SETMOUSESPEED, UInt, 0, UInt, speed, UInt, 0) 
; set mouse accel
NumPut(accelThreshold1, lpParams, 0, "UInt")
NumPut(accelThreshold2, lpParams, 4, "UInt")
NumPut(accelEnabled,    lpParams, 8, "UInt")
DllCall("SystemParametersInfo", UInt, SPI_SETMOUSE, UInt, 0, UInt, &lpParams, UInt, 1)
The 6, 10, 20, and 0 are values that I give it when I do the DLL call with SPI_SETMOUSE. You're right that the acceleration threshold values aren't exposed via the Windows GUI. So that's a bit of a special use-case on my part, sorry! :mrgreen:

Post Reply