Git Product home page Git Product logo

Comments (16)

madpew avatar madpew commented on July 23, 2024

If you want your game to use a whole screen AND catch your mouse, why aren't you playing it in normal fullscreen? As far as I know the only reason to go borderless IS to have the game fullscreen and still be able to move your mouse to the other monitors. I might be missing something so please clarify.

from borderless-gaming.

shauder avatar shauder commented on July 23, 2024

There are more reasons for wanting it. Mainly it will load the rest of the desktop faster and I can see the game and what is going on when I am on the desktop (two monitors). I can alt-tab quicker. Basically the mouse should lock into the app until I alt tab then I can user other apps.

from borderless-gaming.

andrewmd5 avatar andrewmd5 commented on July 23, 2024

Mouse locking is left up to the developers of the game, there is no way I
know of in the WinAPI to bind your mouse to a specific window.

On Sat, Mar 1, 2014 at 7:08 AM, Shane A. Faulkner
[email protected]:

Umm there are more reasons for wanting it. Mainly it will load the rest of
the desktop faster and I can see the game and what is going on when I am on
the desktop (two monitors). I can alt-tab quicker. Basically the mouse
should lock into the app until I alt tab then I can user other apps.

Reply to this email directly or view it on GitHubhttps://github.com//issues/43#issuecomment-36423160
.

from borderless-gaming.

shauder avatar shauder commented on July 23, 2024

There actually is a way. Check out this utility. The only problem I have with this one is it locks it 1 or 2 pixels to far and doesn't work if u move the mouse too fast.

http://dotautilities-forums.net/Thread-Tool-Warcraft-III-Runner

from borderless-gaming.

shauder avatar shauder commented on July 23, 2024

And it may not be in the WinAPI I just know that this guy found a way to do it,

from borderless-gaming.

madpew avatar madpew commented on July 23, 2024

There is an WinAPI Function called ClipCursor that does limit the mousecursor to a given rectangle. If we use the rectangle of the screen the window is on it should work. However this is a global change, so we'd need to figure out a reliable way to enable/disable this on window-switching. polling the currently active window could work. If noone else does I might take a look at this.

from borderless-gaming.

shauder avatar shauder commented on July 23, 2024

The way the app that I linked does it is it allows you to set scroll lock to the hotkey that enables and disables it. Thanks for looking into it.

from borderless-gaming.

madpew avatar madpew commented on July 23, 2024

Good news, I investigated and got this working. The hotkey will work on both bordered and borderless windows. I'll clean up my changes and upload a test-release on my fork. Would you be willing to test it before pushing the changes to master?

from borderless-gaming.

shauder avatar shauder commented on July 23, 2024

Awesome, thank you for doing this! I would be more than willing to test it out.

from borderless-gaming.

madpew avatar madpew commented on July 23, 2024

Ok, I uploaded the version here: http://behind.at/tmp/BorderlessGaming-6-mouselock.zip
Tested and working with KillingFloor.

To test, you need to enable the mouselock-hotkey in the options, select your game and press Scrolllock. This should clip the mouse to your window. Pressing Scrolllock again unlocks the cursor (also windows automatically unlocks the cursor on specific events like alt-tab for example. Due to this you need to press scrolllock twice to re-capture the cursor after its lost.)

from borderless-gaming.

shauder avatar shauder commented on July 23, 2024

Fantastic! As soon as I'm home from work I will test it and let you know

from borderless-gaming.

shauder avatar shauder commented on July 23, 2024

Great job man it works perfectly and even better than the one I had linked as an example! My mouse does not leave the screen with this if I go very fast. The alt-tab is awesome also - great job! The only suggestion I have (if even possible) is re-locking the mouse when the app gets refocused after alt-tab. However, it is not really that needed and pressing the hotkey again twice is no biggy! Thank you again.

from borderless-gaming.

madpew avatar madpew commented on July 23, 2024

Automatic re-locking is (sadly) not possible, but I added a simple fix so it's not needed to press the hotkey twice after loosing the lock.
Thank you for testing and suggesting this feature. I'll submit a pull request and if @Codeusa is ok with it, this feature should end up in the next release.

from borderless-gaming.

shauder avatar shauder commented on July 23, 2024

I'd maybe leave leave it to the double press because it keeps the scroll lock at the same on state. But it is up to you and what you think is better, thank you!

from borderless-gaming.

madpew avatar madpew commented on July 23, 2024

the implementation got merged and this issue can be closed.

from borderless-gaming.

fadster avatar fadster commented on July 23, 2024

This feature is not working for me. Hitting scroll lock with the option enabled does not lock the pointer to the game's monitor.

from borderless-gaming.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.