Mouse Confine/Mouse Lock API fails on certain games.
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.
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.
-
- Posts: 13
- Joined: Fri May 13, 2022 4:35 pm
Mouse Confine/Mouse Lock API fails on certain games.
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
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
-
- Posts: 13
- Joined: Fri May 13, 2022 4:35 pm
Re: Mouse Confine/Mouse Lock API fails on certain games.
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.
-
- Posts: 13793
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Mouse Confine/Mouse Lock API fails on certain games.
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:
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.
-
- Posts: 13
- Joined: Fri May 13, 2022 4:35 pm
Re: Mouse Confine/Mouse Lock API fails on certain games.
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...
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.
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...
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.
-
- Spotlight Team
- Posts: 1090
- Joined: Mon Nov 25, 2019 8:54 am
- Graphics Processor: Intel (Modern GZDoom)
Re: Mouse Confine/Mouse Lock API fails on certain games.
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.
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.
-
- Posts: 13793
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Mouse Confine/Mouse Lock API fails on certain games.
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.
-
- Posts: 13
- Joined: Fri May 13, 2022 4:35 pm
Re: Mouse Confine/Mouse Lock API fails on certain games.
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.
-
- Posts: 13
- Joined: Fri May 13, 2022 4:35 pm
Re: Mouse Confine/Mouse Lock API fails on certain games.
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.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.
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.
-
- Posts: 13
- Joined: Fri May 13, 2022 4:35 pm
Re: Mouse Confine/Mouse Lock API fails on certain games.
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.
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.
-
- Posts: 13
- Joined: Fri May 13, 2022 4:35 pm
Re: Mouse Confine/Mouse Lock API fails on certain games.
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.
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.
-
- Posts: 853
- 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
Re: Mouse Confine/Mouse Lock API fails on certain games.
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.but I hate how complex it is, I am so used to the applications opening instead of terminal everything to get anything to work.
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.I've done so many variations of Resets, from keeping files, wiping the drive clean, USB to build the OS...
Optionally verify the checksum with https://files.rg-adguard.net/.
-
- Posts: 819
- 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
Re: Mouse Confine/Mouse Lock API fails on certain games.
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)
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)
-
- Posts: 13
- Joined: Fri May 13, 2022 4:35 pm
Re: Mouse Confine/Mouse Lock API fails on certain games.
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.
and just incase, reseated my GPU in new slot, see if slot could be at fault.
-
- Posts: 853
- 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
Re: Mouse Confine/Mouse Lock API fails on certain games.
Not to mention Ventoy exists. It's a lifesaver.USB using tools like rufus
-
- Posts: 13
- Joined: Fri May 13, 2022 4:35 pm
Re: Mouse Confine/Mouse Lock API fails on certain games.
The attempt failed.