Skip to content

Commit

Permalink
Updated so that the vJoy device option under the General Tab will sho…
Browse files Browse the repository at this point in the history
…w 1-4 when vXbox is active, sometimes with CEMU it will only recognize one of the four, and it isn't always number 1.

You must have CEMU input settings open and change the number (closing the settings each time with 'OK') until CEMU says that the XInput device is connected.
  • Loading branch information
CemuUser8 committed Sep 21, 2017
1 parent 4d3230e commit aceece0
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions mouse2joystick_Custom_CEMU.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
; Credit to author(s) of vJoy @ http://vjoystick.sourceforge.net/site/
; evilC did the CvJoyInterface.ahk
;
version := "v0.3.0.1"
version := "v0.3.0.2"
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Expand Down Expand Up @@ -237,22 +237,27 @@ initCvJoyInterface:
vXBox := False
}
ValidDevices := ""
Loop 15
{
IF (vGenInterface.Devices[A_Index].IsAvailable())
ValidDevices .= A_Index . "|"
}


IF (vXBox) {
IF (!isObject(vStick)) {
vGenInterface.UnPlugAll() ; Not sure how this interacts when a real controller is also plugged in. But I seem to notice that there is an issue if not controller #1
Global vstick := vGenInterface.xDevices[1]
vstick.Acquire()
TrayTip,, % "Controller #" vstick.GetLedNumber()
IF (isObject(vStick)) {
vStick.Unplug()
vStick.Relinquish()
}
ValidDevices := "1|2|3|4|"
;vGenInterface.UnPlugAll() ; Not sure how this interacts when a real controller is also plugged in. But I seem to notice that there is an issue if not ran.
Global vstick := vGenInterface.xDevices[vJoyDevice]
vstick.Acquire()
TrayTip,, % "Controller #" vstick.GetLedNumber()

}
Else
Else {
Loop 15 {
IF (vGenInterface.Devices[A_Index].IsAvailable())
ValidDevices .= A_Index . "|"
}
Global vstick := vGenInterface.Devices[vJoyDevice]
}
Return

; Hotkey labels
Expand Down Expand Up @@ -835,6 +840,8 @@ exitFunc() {
IF (mouse2Joystick) {
setStick(0,0)
SetStick(0,0, True)
IF (vXBox)
vstick.UnPlug()
vstick.Relinquish()
}

Expand Down

0 comments on commit aceece0

Please sign in to comment.