1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
\r
4 <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
\r
5 <meta http-equiv="Content-Style-Type" content="text/css">
\r
6 <meta name="keywords" content="Simple Directmedia Layer SDL2.0">
\r
7 <link rel="top" href="index.html" title="
\83z
\81[
\83\80">
\r
8 <link rel="parent" href="CategoryJoystick.html" title="1
\82Â
\8fã">
\r
9 <title>SDL_JoystickGetBall</title>
\r
12 <a href="index.html">
\96Ú
\8e\9f</a> - <a href="ApiByCategory.html">API(
\8b@
\94\
\95Ê)</a> - <a href="CategoryJoystick.html">
\83W
\83\87\83C
\83X
\83e
\83B
\83b
\83N</a> - SDL_JoystickGetBall
\r
14 <h1>SDL_JoystickGetBall</h1>
\r
15 \83{
\81[
\83\8b\82Ì
\88Ê
\92u
\82Ì
\91O
\89ñ
\8al
\93¾
\82Æ
\82Ì
\8d·
\82ð
\93¾
\82é
\r
17 <code>int SDL_JoystickGetBall(SDL_Joystick* joystick, int ball, int* dx, int* dy)</code>
\r
19 <table border="1" summary="SDL_JoystickGetBall">
\r
20 <tr><td>joystick</td><td>
\92²
\8d¸
\82·
\82é
\8aJ
\82¢
\82½
\83W
\83\87\83C
\83X
\83e
\83B
\83b
\83N</td></tr>
\r
21 <tr><td>ball</td><td>
\83{
\81[
\83\8b\94Ô
\8d\86. 0
\82©
\82ç
\8en
\82Ü
\82é</td></tr>
\r
22 <tr><td>dx</td><td>
\91O
\89ñ
\8al
\93¾
\88Ê
\92u
\82Æ
\82ÌX
\8e²
\95û
\8cü
\82Ì
\8d·</td></tr>
\r
23 <tr><td>dy</td><td>
\91O
\89ñ
\8al
\93¾
\88Ê
\92u
\82Æ
\82ÌY
\8e²
\95û
\8cü
\82Ì
\8d·</td></tr>
\r
25 <h2>
\96ß
\82è
\92l</h2>
\r
26 \90¬
\8c÷
\82Ì
\82Æ
\82«0,
\8e¸
\94s
\82Ì
\82Æ
\82«
\95\89\82Ì
\90\94\82Ì
\83G
\83\89\81[
\83R
\81[
\83h
\82ð
\96ß
\82·.
\r
27 <a href="SDL_GetError.html">SDL_GetError()</a>
\82Å
\8fÚ
\8d×
\82ð
\92m
\82é
\82±
\82Æ
\82ª
\82Å
\82«
\82é.
\r
28 <h2>
\83T
\83\93\83v
\83\8b\83R
\81[
\83h</h2>
\r
32 int delta_x, delta_y;
\r
37 SDL_JoystickUpdate();
\r
38 if(SDL_JoystickGetBall(joy, 0, &delta_x, &delta_y)==-1)
\r
39 printf("
\83g
\83\89\83b
\83N
\83{
\81[
\83\8b\93Ç
\82Ý
\8d\9e\82Ý
\8e¸
\94s!\n");
\r
40 printf("
\83g
\83\89\83b
\83N
\83{
\81[
\83\8b \88Ú
\93®
\97Ê- X:%d, Y:%d\n", delta_x, delta_y);
\r
45 \83g
\83\89\83b
\83N
\83{
\81[
\83\8b\82ª
\96ß
\82·
\82Ì
\82Í,
\8dÅ
\8cã
\82É<a href="SDL_JoystickGetBall.html">SDL_JoystickGetBall()</a>
\82ð
\8cÄ
\82ñ
\82Å
\82©
\82ç
\82Ì
\91\8a\91Î
\92l
\82Ì
\82Ý
\82Å
\82 \82é.
\r
46 \82»
\82Ì
\88Ú
\93®
\97Ê
\82Ídx
\82Ædy
\82É
\91ã
\93ü
\82³
\82ê
\82é.
\r
47 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\8aÖ
\90\94)</h2>
\r
48 <a href="SDL_JoystickNumBalls.html">SDL_JoystickNumBalls</a><br>
\r
49 <h2>SDL Wiki
\82Ö
\82Ì
\83\8a\83\93\83N</h2>
\r
50 <a href="https://wiki.libsdl.org/SDL_JoystickGetBall">SDL_JoystickGetBall - SDL Wiki</a>
\r