SDL_JoystickGetBall.3
资源名称:NETVIDEO.rar [点击查看]
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:1k
源码类别:
流媒体/Mpeg4/MP4
开发平台:
Visual C++
- .TH "SDL_JoystickGetBall" "3" "Tue 11 Sep 2001, 23:00" "SDL" "SDL API Reference"
- .SH "NAME"
- SDL_JoystickGetBall- Get relative trackball motion
- .SH "SYNOPSIS"
- .PP
- fB#include "SDL&.h"
- .sp
- fBint fBSDL_JoystickGetBallfPfR(fBSDL_Joystick *joystick, int ball, int *dx, int *dyfR);
- .SH "DESCRIPTION"
- .PP
- Get the fBballfR axis change&.
- .PP
- Trackballs can only return relative motion since the last call to fBSDL_JoystickGetBallfP, these motion deltas a placed into fBdxfR and fBdyfR&.
- .SH "RETURN VALUE"
- .PP
- Returns fB0fR on success or fB-1fR on failure
- .SH "EXAMPLES"
- .PP
- .PP
- .nf
- f(CWint delta_x, delta_y;
- SDL_Joystick *joy;
- &.
- &.
- &.
- SDL_JoystickUpdate();
- if(SDL_JoystickGetBall(joy, 0, &delta_x, &delta_y)==-1)
- printf("TrackBall Read Error!
- ");
- printf("Trackball Delta- X:%d, Y:%d
- ", delta_x, delta_y);fR
- .fi
- .PP
- .SH "SEE ALSO"
- .PP
- fIfBSDL_JoystickNumBallsfPfR
- ..." created by instant / docbook-to-man, Tue 11 Sep 2001, 23:00