WindowsAPI之joystickapi(游戏摇杆)头文件

前言

本文主要参考文献为:windows开发人员中心(传送门)。
这个头文件主要是用来从windows底层读取游戏摇杆的数据。

函数

原文

名称描述
joyConfigChangedThe joyConfigChanged function informs the joystick driver that the configuration has changed and should
joyGetDevCapsThe joyGetDevCaps function queries a joystick to determine its capabilities.
joyGetDevCapsWThe joyGetDevCaps function queries a joystick to determine its capabilities.
joyGetNumDevsThe joyGetNumDevs function queries the joystick driver for the number of joysticks it supports.
joyGetPosThe joyGetPos function queries a joystick for its position and button status.
joyGetPosExThe joyGetPosEx function queries a joystick for its position and button status.
joyGetThresholdThe joyGetThreshold function queries a joystick for its current movement threshold.
joyReleaseCaptureThe joyReleaseCapture function releases the specified captured joystick.
joySetCaptureThe joySetCapture function captures a joystick by causing its messages to be sent to the specified window.
joySetThresholdThe joySetThreshold function sets the movement threshold of a joystick.

翻译

名称描述
joyConfigChanged该函数通知操纵杆驱动程序:配置信息已经更改,应该从注册表中重新加载。
joyGetDevCaps该函数查询操纵杆来确定操纵杆的功能。
joyGetDevCapsW同样查询操作杆以确定操纵杆的功能。
joyGetNumDevs该函数向操纵杆驱动程序查询它支持的操纵杆数量。
joyGetPos该函数查询操纵杆的位置和按钮状态。
joyGetPosEx该函数同样查询操纵杆的位置及按钮状态。
joyGetThreshold该函数查询操纵杆的当前移动阈值。
joyReleaseCapture该函数释放指定的被捕捉的操纵杆。
joySetCapture该函数通过将操纵杆的消息发送到指定窗口来捕获操纵杆。
joySetThreshold该函数设置操纵杆的移动阈值。

结构体

原文

名称描述
JOYCAPSThe JOYCAPS structure contains information about the joystick capabilities.
JOYCAPSAThe JOYCAPS structure contains information about the joystick capabilities.
JOYCAPSWThe JOYCAPS structure contains information about the joystick capabilities.
JOYINFOThe JOYINFO structure contains information about the joystick position and button state.
JOYINFOEXThe 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
  • 1
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值