Skip to content

Commit

Permalink
Merge pull request #3 from MisanthropicShayna/development
Browse files Browse the repository at this point in the history
Merging development branch with master branch
  • Loading branch information
PsychedelicShayna authored Oct 27, 2019
2 parents ee2970a + be369b9 commit fa6140b
Show file tree
Hide file tree
Showing 16 changed files with 583 additions and 644 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
!source/
!.gitignore
!LICENSE
!README.md
!screenshots
*.user
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Mouselock
# Cursor Locker Redux

This is the source code for a Skyrim utility published on the Nexus. https://www.nexusmods.com/skyrim/mods/95474
This is the repository for a program hosted on NexusMods https://www.nexusmods.com/skyrim/mods/95474

If you're like me, and you constantly have other windows open on your other monitors, you probably experienced a phenomena at some point where if you scroll your mouse in game, it can scroll down a window on a completely separate monitor. This is due to the fact that Skyrim does not actually lock the cursor while you're playing, instead the cursor is actually just invisibly moving around in the background, which means your cursor can also wander onto other monitors and perform inputs that were never intended.
Compared to the original Mouselock utility, the redux version has a graphical user interface, as well as bug fixes, and all around cleaner and more efficient programming. You can find pre-compiled binaries in the releases section if you'd rather not compile it yourself. This project uses Qt5 which is cross-platform, however it is currently only compatible with Windows since it relies on WinAPI to function.

To solve this pet peeve of mine, I wrote a small C++ program that essentially just locks your cursor to the center of your main monitor upon pressing a key. This works universally, so if there are any other games that don't lock the cursor, this program will work on them as well, since it's not really program specific. Optionally, you can also set it so that it automatically starts and stops when another program starts and stops.

## Building
If you plan on building this yourself, you will need a [Qt5 Environment](https://www.qt.io/download-open-source) as well as a copy of the dynamic link libraries needed for Qt to function, since by default Qt does not statically link its own libraries. You can also find the necessary libraries included in the pre-compiled versions in the releases section.

The repository includes a Qt `.pro` project file which is already pre-configured and should work straight out of the box. You will however need a compatible compiler such as MSVC15 or MSVC17 -- or really just any compiler that is compatible with Windows' libraries.

## Screenshot
![](screenshots/screenshot-1.png?raw=true)
Binary file removed build/x86/Mouselock.exe
Binary file not shown.
Binary file added screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions source/CursorLockerQt.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
QT += core gui widgets

TARGET = CursorLocker
TEMPLATE = app

DEFINES += QT_DEPRECATED_WARNINGS

CONFIG += c++17

CONFIG(debug, debug|release): DEFINES += DEBUG
CONFIG(release, debug|release): DEFINES += RELEASE

SOURCES += \
main.cxx \
main_window_dlg.cxx

HEADERS += \
main_window_dlg.hxx

FORMS += \
main_window_dlg.ui

LIBS += \
-lUser32
Loading

0 comments on commit fa6140b

Please sign in to comment.