Skip to content

🚟change in Mouse unlock function to to unlock mouse in the centre #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified SavedKeyLists.ini
Binary file not shown.
34 changes: 18 additions & 16 deletions mouse2joystick_Custom_CEMU.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -334,22 +334,24 @@ controllerSwitch:
SetTimer,mouseTojoystick,%freq%

}
Else { ; Shutting down controller
setStick(0,0) ; Stick in equilibrium.
setStick(0,0, True)
IF (useAltMouseMethod) {
LockMouseToWindow(False)
md.Stop()
}
Else
SetTimer,mouseTojoystick,Off

IF (hideCursor)
show_Mouse() ; No need to show cursor if not hidden.
;DllCall("SystemParametersInfo", UInt, 0x71, UInt, 0, UInt, OrigMouseSpeed, UInt, 0) ; Restore the original speed.
Gui, Controller:Hide

}
Else { ; Shutting down controller
setStick(0,0) ; Stick in equilibrium.
setStick(0,0, True)
; Explicitly move the cursor to the center of the screen
MouseMove, % A_ScreenWidth / 2, % A_ScreenHeight / 2
IF (useAltMouseMethod) {
LockMouseToWindow(False)
md.Stop()
}
Else
SetTimer, mouseTojoystick, Off

IF (hideCursor)
show_Mouse() ; No need to show cursor if not hidden.
;DllCall("SystemParametersInfo", UInt, 0x71, UInt, 0, UInt, OrigMouseSpeed, UInt, 0) ; Restore the original speed.
Gui, Controller: Hide
}

toggle:=!toggle
Return

Expand Down
Binary file modified settings.ini
Binary file not shown.