Mouse Confine/Mouse Lock API fails on certain games.

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE/EDuke32/Raze? Did your computer break? Ask here.

Moderator: GZDoom Developers

Forum rules
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!

If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.

We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
merithor
Posts: 13
Joined: Fri May 13, 2022 4:35 pm

Mouse Confine/Mouse Lock API fails on certain games.

Post by merithor »

So I've had this issue for a while, since when I updated my mobo and CPU due to a power failure, certain games using Mouselock API / Mouse confinement will fail to keep the mouse in bounds of the screen.
I have tried CursorLock, free trial of DisplayFusion, DualMonitorTools, while they kept my mouse in the defined areas, its not perfect, especially with Doom Builder in it's 3D mode.

I'll link up my 2 posts in other places, with what I found out what happens after a Reset/OS Reinstall:
https://www.reddit.com/r/pcgamingtechsu ... d_working/

https://answers.microsoft.com/en-us/win ... 3a40b5b3cd

TLDR (did not see the links): Resetting/Reinstalling the OS allows the said programs to work, FOR A WEEK, exact next week of the day it stops. This affects my Laptop too, and figured it's a Windows fault, as my Laptop doesnt have nearly as much installed if not at all, it too fell same issue 1 week later.

So I'm hoping there could be some help from here, as it really hurts that I can't do all the games I want to play. :(

Intel(R) Core(TM) i7-9800X CPU @ 3.80GHz 3.80 GHz
G.Skill Ripjaws V 32GB 4x8 (32GB) DDR4-3200 CL16 RAM (24GB as one of the sticks died earlier this year, problem persisted regardless of RAM change)
EVGA FTW-K X299 LGA 2066 , SATA 6GB/s , USB 3.0/3.1
EVGA FTW-2 GeForce 1080 8GB ICX Gaming (I have also done a Display Driver Uninstall to ensure it wasnt a Graphics Card issue, the games that have cursor lock issue are playable but with out the cursor lock it makes it hard/impossible to play)
-Monitors plugged in: Sceptre M32 1920x1080, PXL2780MW 2560x1440, Acer H233H 1920x1080
Drives: Seagate Firecuda 2TB 5400 RPM Hybrid (Storage/Games) , Samsung 860 EVO 500GB SSD (Operating system Disk)
Razer Ornata Chroma Keyboard, Razer Naga Chroma Mouse, Razer Kraken Pro v3 Headset
merithor
Posts: 13
Joined: Fri May 13, 2022 4:35 pm

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by merithor »

The only other info I can think on is RawInput, I dont know what controls it, if theres a Registry that can be fuddled to fix, or what.
User avatar
Rachael
Posts: 13562
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by Rachael »

The reason why this hasn't gotten any replies is because this situation is so unusual that I, and it seems no one else, has encountered it.

On a technical level it seems like what is happening is your mouse is being read as a pen tablet, which it shouldn't be - but that means it is tracking its own position on the screen. If your mouse is a regular old mouse then that means there is a software layer that is changing how it is being detected - which means you might be playing through a virtual machine or through some sort of remote software.

Unfortunately there isn't much that can be done - disconnect external displays, try a new mouse, etc.

If you want - you can try and change the "in_mouse" cvar in GZDoom, but I doubt it will help much. It has 4 states:
  • 0 - Best choice (for now, it just picks 3 below)
  • 1 - Original Windows input (this was nothing more than tracking where the mouse pointer moved relative to the center of the window, and it would force the mouse cursor to move to the center of the window every frame in order to track it again)
  • 2 - DirectInput - This used DirectInput to poll the mouse movements - it still did the mouse cursor thing as 0, but it did not base its decisions on the movements it detected.
  • 3 - Raw Input - This became available with more recent versions of Windows (Vista, I think) and it should track mouse movement without any bias regarding pointer speed and acceleration - this is supposed to be the mouse's direct raw input to the operating system.
merithor
Posts: 13
Joined: Fri May 13, 2022 4:35 pm

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by merithor »

Thank you for responding.
GzDoom/Skulltag/Doom source ports are good, they work fine and keep the mouse in, its just Doom Builder, StarCraft and some those games the problem persists on.
I have no remote outsourcing for play on my Desktop, and I have turned off all the pen and touch stuff (dont own a Tablet). Is just weird for a week after a Reset it all works, no issue, and then pop, week later is dies.
I have also used one of my generic mice to see if its just my Razer, nope, affected too.

Games that work on capturing the mouse and not letting it vacate the window: Skyrim, Minecraft (modded), Diablo 3 (with it confinement on... How???), Doom Source Ports with Mouse support (essentially Zdoom anything).
But how does D3 work but Starcraft just stops, even with the confinement options turned on... :x

And this is the only part of this forum that I seen that was any form of Tech support, so if this is the wrong spot sorry.
Last edited by merithor on Fri Mar 03, 2023 12:50 pm, edited 1 time in total.
User avatar
Redneckerz
Spotlight Team
Posts: 1053
Joined: Mon Nov 25, 2019 8:54 am
Graphics Processor: Intel (Modern GZDoom)

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by Redneckerz »

Just going to state that Mouse Lock API is now called Pointer Lock API, just to be clear.
Because this is ultra specific, i am going to be blunt and state that even a reinstalle of Windows does not change whatever customary change has occurred on the system since it was bought. Because, by powers of deduction, if this were a general issue, the general public would have cried wolf at this point :)

So to eliminate this, what is needed is a full on restore to the system as it was bought, or a Windows image that is completely clean.
User avatar
Rachael
Posts: 13562
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by Rachael »

merithor wrote: Fri Mar 03, 2023 12:48 pm And this is the only part of this forum that I seen that was any form of Tech support, so if this is the wrong spot sorry.
Don't worry about it, we're a community here and this tech support forum was never meant for exclusivity to Doom-related stuff. Granted we're probably not going to be as helpful as Stack Overflow or whatever other popular sites of the day anyway because we're not as popular.
merithor
Posts: 13
Joined: Fri May 13, 2022 4:35 pm

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by merithor »

Alright, I went through a completely clean image, OS installed from a portable drive and not the disc, will contact in a week if the problem happens again or if the curse finally lifts itself because clean image was the answer.
merithor
Posts: 13
Joined: Fri May 13, 2022 4:35 pm

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by merithor »

Redneckerz wrote: Fri Mar 03, 2023 3:03 pm Just going to state that Mouse Lock API is now called Pointer Lock API, just to be clear.
Because this is ultra specific, i am going to be blunt and state that even a reinstalle of Windows does not change whatever customary change has occurred on the system since it was bought. Because, by powers of deduction, if this were a general issue, the general public would have cried wolf at this point :)

So to eliminate this, what is needed is a full on restore to the system as it was bought, or a Windows image that is completely clean.
I built the computer, order and put together myself. Just the first time worked fine, but it could also be just my mouse is old (and showing age, scroll wheel double clicks), and if an old mouse can cause the issue, then ordering a new one should "potentially" skirt the issue.
The only custom thing done to the mouse is just installing Razer software, and always set to 900 dpi, and a macro that rarely gets put on unless I play a modded Minecraft skyblock pack.
merithor
Posts: 13
Joined: Fri May 13, 2022 4:35 pm

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by merithor »

The Curse continues....
Running thin on how I can fix this, even got a new mouse, just 1 week.. Or I dont know how to do the clean boot.
The only things that could be culprit is RAM, or Mobo, or GPU in some shape or form... And I cant replace either. :(
merithor
Posts: 13
Joined: Fri May 13, 2022 4:35 pm

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by merithor »

Yeah, I'm at a loss, I dont know where to find a completely clean OS Image, I've done so many variations of Resets, from keeping files, wiping the drive clean, USB to build the OS...
I have figured fully it is OS, as Ubuntu worked even after a week, but I hate how complex it is, I am so used to the applications opening instead of terminal everything to get anything to work.
I just wish I know what the hell MS does that breaks me. I even made a post on StackOverflow just to see if anyone responds (been nearly 3 weeks since posting), had Microsoft Tech email going (no response since a month).

I know it sounds like complaining, but I'm just frustrated that I can't do what I normally do. :(
yum13241
Posts: 781
Joined: Mon May 10, 2021 8:08 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan/Metal Support
Contact:

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by yum13241 »

but I hate how complex it is, I am so used to the applications opening instead of terminal everything to get anything to work.
You'll get used to it. In the mean time, try using graphical package managers and such. Garuda Linux also might work out for you.
I've done so many variations of Resets, from keeping files, wiping the drive clean, USB to build the OS...
DO NOT USE THE WINDOWS BUILT-IN RESET FEATURE! It cannot be trusted. Go to https://www.microsoft.com/software-download (for the MCT) or https://ave9858.github.io/msdl/ for actual isos.

Optionally verify the checksum with https://files.rg-adguard.net/.
SanyaWaffles
Posts: 805
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by SanyaWaffles »

I was encountering something like this when I fresh installed Windows 10 (My Windows 10 and 11 installs before were both buggy in an unrelated way) - and GZDoom (both stock and my in-house fork for game dev) sometimes wouldn't show the cursor if I alt-tabbed a certain way while in menus.

If it happens again I'll try to reproduce it and report my findings, but it seemed to happen with the new install. Before it was fine.

(Also I have to agree with Yum, just go right to the fresh install options from USB using tools like rufus, the built in reset/in place upgrade tools are rocky at best, especially when downloading updated copies)
merithor
Posts: 13
Joined: Fri May 13, 2022 4:35 pm

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by merithor »

Mk, this time I did the USB x Rufus with a iso of latest update Windows (while deleting old partition for no residual files for OS), and this time not log into MS in OS itself, so heres to hoping I dont have the issue.
and just incase, reseated my GPU in new slot, see if slot could be at fault.
yum13241
Posts: 781
Joined: Mon May 10, 2021 8:08 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan/Metal Support
Contact:

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by yum13241 »

USB using tools like rufus
Not to mention Ventoy exists. It's a lifesaver.
merithor
Posts: 13
Joined: Fri May 13, 2022 4:35 pm

Re: Mouse Confine/Mouse Lock API fails on certain games.

Post by merithor »

The attempt failed. :(
Post Reply

Return to “Technical Issues”