文章目录
前言
本文主要参考文献为:windows开发人员中心(传送门)。
这个头文件主要是用来从windows底层读取游戏摇杆的数据。
函数
原文
名称 | 描述 |
---|
joyConfigChanged | The joyConfigChanged function informs the joystick driver that the configuration has changed and should |
joyGetDevCaps | The joyGetDevCaps function queries a joystick to determine its capabilities. |
joyGetDevCapsW | The joyGetDevCaps function queries a joystick to determine its capabilities. |
joyGetNumDevs | The joyGetNumDevs function queries the joystick driver for the number of joysticks it supports. |
joyGetPos | The joyGetPos function queries a joystick for its position and button status. |
joyGetPosEx | The joyGetPosEx function queries a joystick for its position and button status. |
joyGetThreshold | The joyGetThreshold function queries a joystick for its current movement threshold. |
joyReleaseCapture | The joyReleaseCapture function releases the specified captured joystick. |
joySetCapture | The joySetCapture function captures a joystick by causing its messages to be sent to the specified window. |
joySetThreshold | The joySetThreshold function sets the movement threshold of a joystick. |
翻译
名称 | 描述 |
---|
joyConfigChanged | 该函数通知操纵杆驱动程序:配置信息已经更改,应该从注册表中重新加载。 |
joyGetDevCaps | 该函数查询操纵杆来确定操纵杆的功能。 |
joyGetDevCapsW | 同样查询操作杆以确定操纵杆的功能。 |
joyGetNumDevs | 该函数向操纵杆驱动程序查询它支持的操纵杆数量。 |
joyGetPos | 该函数查询操纵杆的位置和按钮状态。 |
joyGetPosEx | 该函数同样查询操纵杆的位置及按钮状态。 |
joyGetThreshold | 该函数查询操纵杆的当前移动阈值。 |
joyReleaseCapture | 该函数释放指定的被捕捉的操纵杆。 |
joySetCapture | 该函数通过将操纵杆的消息发送到指定窗口来捕获操纵杆。 |
joySetThreshold | 该函数设置操纵杆的移动阈值。 |
结构体
原文
名称 | 描述 |
---|
JOYCAPS | The JOYCAPS structure contains information about the joystick capabilities. |
JOYCAPSA | The JOYCAPS structure contains information about the joystick capabilities. |
JOYCAPSW | The JOYCAPS structure contains information about the joystick capabilities. |
JOYINFO | The JOYINFO structure contains information about the joystick position and button state. |
JOYINFOEX | The JOYINFOEX structure contains extended information about the joystick position, point-of-view position, and button state. |
翻译
名称 | 描述 |
---|
JOYCAPS | 该结构体包含操纵杆的功能。 |
JOYCAPSA | 该结构体包含操纵杆的功能。 |
JOYCAPSW | 该结构体包含操纵杆的功能。 |
JOYINFO | 该结构体包含操纵杆的位置与按钮状态。 |
JOYINFOEX | 该结构体包含上个结构体的拓展信息,操纵杆的位置,POV位置,按键状态。 |
重点介绍
名称 | 功能 | 传送门 |
---|
joyGetDevCaps JOYCAPS | 查询操纵杆来确定操纵杆的功能 | Windows API 之joystickapi(游戏摇杆)头文件2 |
joyGetPos JOYINFO | 查询操纵杆的位置和按钮状态 | Windows API 之joystickapi(游戏摇杆)头文件3 |
joyGetPosEx JOYINFOEX | 查询操纵杆的位置和按钮状态 | Windows API 之joystickapi(游戏摇杆)头文件4 |