Last active
August 31, 2017 18:16
-
-
Save Geroyuni/5709476b6485cdd371370f5f32ca3b9e to your computer and use it in GitHub Desktop.
CemuJoystick (AutoHotKey script)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; https://gist.github.com/Geroyuni/5709476b6485cdd371370f5f32ca3b9e | |
; Made for generic USB Joystick. May not work in XInput/better controllers | |
; | |
; JoystickR UP + (Y + X): Toggle fullscreen | |
; JoystickR DOWN + (Y + X): Toggle cemuhook | |
; JoystickR LEFT + (Y + X): Restart CEMU and load game | |
; JoystickR RIGHT + (Y + X): Focus window | |
; | |
; If you're going to use "Restart CEMU and load game", change these 2 values: | |
dir_cemu = "C:\Files\Emulation\Wii U\_Cemu\Cemu.exe" | |
dir_game = "C:\Files\Emulation\Wii U\Breath of the Wild\code\U-King.rpx" | |
; Check button (Y + X) - Will then check JoystickR's rotation (stateR, stateZ) | |
1joy1:: | |
if GetKeyState("1Joy4") | |
{ | |
GetKeyState, stateR, 1joyR | |
GetKeyState, stateZ, 1joyZ | |
if stateZ = 000 ; JoystickR LEFT (Restart CEMU and load game) | |
{ | |
Process, Close, Cemu.exe | |
Process, Close, WerFault.exe | |
Run, %dir_cemu% -g %dir_game% | |
} | |
IfWinExist, Cemu | |
{ | |
WinActivate | |
WinGetPos, , , , y | |
if stateR = 100 ; JoystickR DOWN (Toggle fullscreen) | |
Send ^!f | |
if stateR = 000 ; JoystickR UP (Toggle cemuhook) | |
{ | |
if y = %A_screenHeight% | |
Send {esc} | |
else | |
WinMenuSelectItem, , , 2&, 1& | |
} | |
} | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment