Comments (16)
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.
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.
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.
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.
And it may not be in the WinAPI I just know that this guy found a way to do it,
from borderless-gaming.
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.
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.
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.
Awesome, thank you for doing this! I would be more than willing to test it out.
from borderless-gaming.
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.
Fantastic! As soon as I'm home from work I will test it and let you know
from borderless-gaming.
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.
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.
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.
the implementation got merged and this issue can be closed.
from borderless-gaming.
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)
- Add keep awake feature
- crash rc1 windows 10 HOT 3
- BG freezes when set to start at windows startup
- Latest release (v10.0.0 Steam) typo
- Random crashing when closing programs HOT 1
- 2 useful functions
- cant buy Dark Mode DLC on Steam HOT 2
- Crash on startup: Process with an Id of xxx is not running. HOT 1
- Dark Mode not working HOT 6
- Save BG window size & position
- Ultrawide support
- resizing the screen in pixels no longer works HOT 5
- Free builds / installers HOT 19
- [Game]: Skyrim SE - Game cursor does not leave bound of original window HOT 1
- Unhandled Exception when opening steam HOT 1
- [Game]: Euro Truck Simulator 2 / Steam - BG makes the Properties window of Euro Truck Simulator Borderless HOT 2
- [Game]: Diablo 4 - Extra Blank space to right of window
- [UI/Language] Newline characters (\r\n) appear in confirmation dialogs. HOT 2
- Albion Alt Tab
- MSft Flight Simulator Steam Edition: Your program does not expand the window (which is v small) but simply sends it to the top left corner. Gemini advised me to buy your program so as to be able to expand that window.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from borderless-gaming.