Next, we flesh out the function that gets the state of the controller. This is where the CXBOXController class is fleshed out and given life.įirst, the CXBOXController constructor assigns the controller number based on the player number (player 1 = 0, player 2 = 1, player 3 = 2, player 4 = 3). XInputSetState(_controllerNum, &Vibration) ZeroMemory(&Vibration, sizeof(XINPUT_VIBRATION)) Void CXBOXController::Vibrate( int leftVal, int rightVal) XInputGetState(_controllerNum, &_controllerState) ĭWORD Result = XInputGetState(_controllerNum, &_controllerState) ZeroMemory(&_controllerState, sizeof(XINPUT_STATE))
#Xinput test code
Fleshing It OutĬopy Code #include " CXBOXController.h" ĬXBOXController::CXBOXController( int playerNumber) The Vibrate() function simply provides us with a quick and easy method for vibrating the controller.
IsConnected() checks to ensure that the controller is connected, and will return ERROR_SUCCESS if successful. GetState() updates the Controller's state and returns the state information to the caller so that checks can be made on the input (which will be done later when we flesh out the program). _controllerState holds the state of the Xbox 360 Controller, _controllerNum holds a reference to which controller (0-3) is being stored by the class. This defines a simple C++ class that manages an Xbox 360 Controller. Void Vibrate( int leftVal = 0, int rightVal = 0) A COMPILER THAT SUPPORTS THIS METHOD OF LINKING LIBRARIES NOTE: COMMENT THIS OUT IF YOU ARE NOT USING #include #include // Now, the XInput Library
#Xinput test windows
Of course, if you don't want to take this risk, it's up to you.// We need the Windows Header and the XInput Header Yes it shows one red mark, but all the mayor customers don't see it as malware. This is because this tool uses dll injection to accomplish its goals. Try it and your start button should work to skip the movies and also the triggers should work as intended.Īt least Windows Defender sees the XInputPlus.exe as a Trojan called Maltule.C!cl. It should tell you that it created a shortcut.įrom now on you should run the game via this shortcut. After that navigate to your One Piece 3 Pirate Warriors directory and simply drag and drop the game exe "oppw3.exe" onto the open loader window. Start it up and set the mode to Create ShortCut. Procede like described, but instead of opening the game the normal way you use the XInputPlusLoader in the loader directory. If the tool doesn't work for you there is a second way of using the tool. That is just the one that worked for me and Trehek. Of course, if you need another button configuration, due to your controller responding differently, you can change that accordingly. You can close the utility and you won't need to run it anymore when you play. Disable the "Enable Init Beep" option and click on Apply. Once you confirm that everything works, exit back to the utility and go to Settings->Others. The Start button should skip cutscenes, A and B should be OK and Cancel in the menus, sticks should work, all buttons should work and be rebindable in-game. If you hear a bell sound upon startup, the settings should be working. Leave the utility open and try launching the game. Then click on Customize and make the following changes to control assignments:Ĭlick on OK and then Apply and the utility will generate the settings files. What you'll want to do is point the utility to the OPPW3 executable and go to the utility's DirectInput tab. Please see the troubleshooting section for more info! Warning: Your System may recognize this file als a trojan.
#Xinput test download
A more detailed tutorial and the way to download it is here: It works via modifing and dropping a Xinput.dll in the starting directory (with the exe) of the game. Imagine it like XPadder or such tools, but changing your Gamepad Inputs. It is a japanese tool that can be used to change the Output of the Controller. There exists a utility called XInput Plus. User Trehek posted the ultimate Solution to fixing problems with the XInput Controllers, nameley Xbone and Xbox 360 Controllers