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="CategoryGameController.html" title="1
\82Â
\8fã">
\r
9 <title>SDL_GameControllerMapping</title>
\r
12 <a href="index.html">
\96Ú
\8e\9f</a> - <a href="ApiByCategory.html">API(
\8b@
\94\
\95Ê)</a> - <a href="CategoryGameController.html">
\83Q
\81[
\83\80\83R
\83\93\83g
\83\8d\81[
\83\89\81[</a> - SDL_GameControllerMapping
\r
14 <h1>SDL_GameControllerMapping</h1>
\r
15 \83Q
\81[
\83\80\83R
\83\93\83g
\83\8d\81[
\83\89\81[
\82Ì
\8c»
\8dÝ
\82Ì
\83}
\83b
\83s
\83\93\83O
\82ð
\93¾
\82é
\r
17 <code>char* SDL_GameControllerMapping(SDL_GameController* gamecontroller)</code>
\r
19 <table border="1" summary="SDL_GameControllerMapping">
\r
20 <tr><td>gamecontroller</td><td>
\83}
\83b
\83s
\83\93\83O
\82ð
\93¾
\82é
\83Q
\81[
\83\80\83R
\83\93\83g
\83\8d\81[
\83\89\81[</td></tr>
\r
22 <h2>
\96ß
\82è
\92l</h2>
\r
23 \83Q
\81[
\83\80\83R
\83\93\83g
\83\8d\81[
\83\89\81[
\82Ì
\83}
\83b
\83s
\83\93\83O
\95¶
\8e\9a\97ñ
\82ð
\96ß
\82·.
\r
24 \8fÚ
\8d×
\82Í<a href="SDL_GameControllerAddMapping.html">SDL_GameControllerAddMapping()</a>
\82ð
\8eQ
\8fÆ
\82·
\82é
\82±
\82Æ.
\r
25 <a href="SDL_GetError.html">SDL_GetError()</a>
\82Å
\8fÚ
\8d×
\82ð
\92m
\82é
\82±
\82Æ
\82ª
\82Å
\82«
\82é.
\r
26 <h2>
\83T
\83\93\83v
\83\8b\83R
\81[
\83h</h2>
\r
30 #include <stdio.h> /* printf()
\82Ì
\82½
\82ß
\82É
\95K
\97v */
\r
34 SDL_GameController *ctrl;
\r
37 for (i = 0; i < SDL_NumJoysticks(); ++i) {
\r
38 if (SDL_IsGameController(i)) {
\r
39 printf("\'%d\'
\94Ô
\82Í
\83W
\83\87\83C
\83X
\83e
\83B
\83b
\83N
\8cÝ
\8a·
\82Ì
\83R
\83\93\83g
\83\8d\81[
\83\89,
\96¼
\8fÌ
\82Í\'%s\'\n", i, SDL_GameControllerNameForIndex(i));
\r
40 ctrl = SDL_GameControllerOpen(i);
\r
41 printf("
\83R
\83\93\83g
\83\8d\81[
\83\89 %i
\82Í \"%s\"
\82É
\83}
\83b
\83s
\83\93\83O
\82³
\82ê
\82½\n", i, SDL_GameControllerMapping(ctrl));
\r
43 printf("\'%d\'
\94Ô
\82Í
\83W
\83\87\83C
\83X
\83e
\83B
\83b
\83N
\82Æ
\94ñ
\8cÝ
\8a·
\82Ì
\83R
\83\93\83g
\83\8d\81[
\83\89\n", i);
\r
50 \96ß
\82³
\82ê
\82½
\95¶
\8e\9a\97ñ
\82ÍSDL_Free()
\82Å
\89ð
\95ú
\82·
\82é
\95K
\97v
\82ª
\82 \82é.
\r
51 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\8aÖ
\90\94)</h2>
\r
52 <a href="SDL_GameControllerAddMapping.html">SDL_GameControllerAddMapping</a><br>
\r
53 <a href="SDL_GameControllerMappingForGUID.html">SDL_GameControllerMappingForGUID</a><br>
\r
54 <h2>SDL Wiki
\82Ö
\82Ì
\83\8a\83\93\83N</h2>
\r
55 <a href="https://wiki.libsdl.org/SDL_GameControllerMapping">SDL_GameControllerMapping - SDL Wiki</a>
\r