From aceece0038df29096b5b6e1012324b066aebbc35 Mon Sep 17 00:00:00 2001 From: Cemu User8 Date: Thu, 21 Sep 2017 14:48:40 -0400 Subject: [PATCH] Updated so that the vJoy device option under the General Tab will show 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. --- mouse2joystick_Custom_CEMU.ahk | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/mouse2joystick_Custom_CEMU.ahk b/mouse2joystick_Custom_CEMU.ahk index 2d666de..388af63 100644 --- a/mouse2joystick_Custom_CEMU.ahk +++ b/mouse2joystick_Custom_CEMU.ahk @@ -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. @@ -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 @@ -835,6 +840,8 @@ exitFunc() { IF (mouse2Joystick) { setStick(0,0) SetStick(0,0, True) + IF (vXBox) + vstick.UnPlug() vstick.Relinquish() }