James-LG / AutoCursorLock

Locks cursor to specified windows while in focus. Good for games that don't properly lock the cursor.
MIT License
85 stars 2 forks source link

Does not work with Elden Ring (windows 10 64bit) ? #7

Open Bogdanov89 opened 2 months ago

Bogdanov89 commented 2 months ago

I tried this program specifically for Elden Ring, since it notoriously allows the mouse cursor to leave the game window every time any kind of menu has been opened regardless of is it "full screen" or "windowed mode" (map, inventory, equipment etc..).

Unfortunately no matter what i tried the AutoCursorLock did not prevent the Elden Ring from allowing the cursor to wander onto my 2nd monitor.

On a side note its a bit unclear what is the meaning of the above red line "Cursor Locked: False" when the below green line states "Locking Enabled: True"... the messages are contradictory and confusing to a simple end user. No matter what i tried the above message in red did not change from False.

Here is a screenshot of the config (i tried pressing the hotkey many times and exiting & starting up the program). Thanks for trying to solve this really annoying issue Windows imposes on us all.

image

James-LG commented 2 months ago

Yeah they definitely seem a bit confusing. The lower one is basically whether the program is attempting to detect windows to lock on to. The upper one is whether the cursor is locked at that exact moment.

Would "Locking enabled" -> "Window detection enabled" be better? Or something else.


Does the upper "Cursor Locked" change to True when Elden Ring is in focus?

Bogdanov89 commented 2 months ago

Hey thanks for replying & explaining! Honestly i would not mind a more verbose description, be it as the main colored text or as some kind of an additional line of text below the main colored text explaining what the current state & intent is.

I tried ER+AutoCursorLock a few more times and it seems that the above text does change to the green True while ERing is in focus - but the actual mouse cursor itself is not locked in any way. The mouse cursor in Elden Ring behaves the same with or without AutoCursorLock. That is to say that as soon as any kind of map/inventory/equipment is open the mouse can leave the ERing window and the only way to lock it back into ERing is to (furiously) click 5+ times into the game window.

Thank you for working on this issue! image

James-LG commented 2 months ago

Interesting. Can you download and run DebugView (made by Microsoft), and see if there are any errors being printed while using AutoCursorLock?

image

Nzxtime commented 1 month ago

Hi, I have also tried this and in my case the eldenring process doesn't show up in AutoCursorLock (with and without admin rights).

Before, I tried this program but it (also) lets the cursor wander off to other screens slightly.

Aluerie commented 1 month ago

Interesting. Can you download and run DebugView

Also having same issue, the cursor just doesn't get locked within Elden Ring (seems working fine for other windows)

image

Here are the logs from debug view, but there is no error message in here :D image

But to be honest, it's more of Elden Ring problem than your app, probably. Still annoying because they unlock the mouse off the screen in a lot of menus where it makes no sense.

Nzxtime commented 1 month ago

My current workaround is to use Dual Monitor Tools and lock the cursor to a specific monitor and by holding Ctrl I can bypass the lock.

James-LG commented 1 month ago

@Aluerie thanks for testing it with DebugView.

The fact that there are no errors means either Elden Ring is not reporting its window size correctly, or it is actually clearing the window lock.

If it's the window size problem then I could add a setting to lock the cursor to a monitor rather than a window. The difference between that and Dual Monitor tools would be that it locks in when the window is in focus, and unlocks as soon as you alt-tab.

James-LG commented 1 week ago

The next release will support locking the cursor to the monitor the window is on. Hopefully that fixes the issue.

Aluerie commented 1 week ago

Unfortunately, again, it works perfectly with other apps/games but Elden Ring (and Sekiro - also Fromsoft's game) - nope.

The logs again don't have any error. image

James-LG commented 1 week ago

I do own Sekiro so I can test that out later.