Skip to content

fafalone/XInputDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XInputDemo

Using XInput APIs for Gamepad Input in twinBASIC

XInput is a very simple API to use, but since I've never seen VBx/twinBASIC code for it before, I thought I'd post a quick demo. This covers all the basic gamepad features, including getting battery info (Win10+) and making the controller vibrate.

XIDemo

Requires Windows Development Library for twinBASIC.

Windows 7 and Vista are supported even though they use a different DLL for the APIs than our primary defs point to for Win8+; WinDevLib implements this by providing API aliases, e.g. XInputGetState7.

Note if using this in your own code, XInputGetBatteryInformation has an incorrect [TypeHint()] in current WDL versions (9.3.676 and earlier); it will be fixed next update but until then just make sure to use the right constants.

About

Using XInput APIs for Gamepad Input in twinBASIC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors