OSDN Git Service

SDL_atomic_t サンプルコードを修正 https://wiki.libsdl.org/SDL_atomic_t?action=diff&rev1=3&rev2=4
[sdl2referencejp/sdl2referencejp.git] / SDL_GetPrefPath.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html lang="ja-JP">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <meta name="keywords" content="Simple Directmedia Layer SDL2.0">
7 <link rel="top" href="index.html" title="\83z\81[\83\80">
8 <link rel="parent" href="CategoryFileSystem.html" title="1\82Â\8fã">
9 <title>SDL_GetPrefPath</title>
10 </head>
11 <body>
12 <a href="index.html">\96Ú\8e\9f</a> - <a href="ApiByCategory.html">API(\8b@\94\\95Ê)</a> - <a href="CategoryFileSystem.html">\83t\83@\83C\83\8b\83V\83X\83e\83\80</a> - SDL_GetBasePath
13 <hr>
14 <h1>SDL_GetPrefPath</h1>
15 \81u\83v\83\8a\83t\83@\83\8c\83\93\83X\83f\83B\83\8c\83N\83g\83\8a\81v\82ð\93¾\82é. \82»\82±\82É\83A\83v\83\8a\83P\81[\83V\83\87\83\93\82Í\8cÂ\90l\82Ì\83t\83@\83C\83\8b(\90Ý\92è\82â\83Q\81[\83\80\82Ì\95Û\91\82È\82Ç)\82ð\8f\91\82«\8d\9e\82Þ. \82±\82Ì\83f\83B\83\8c\83N\83g\83\8a\82Í\83\86\81[\83U\82Æ\83A\83v\83\8a\83P\81[\83V\83\87\83\93\82²\82Æ\82É\8cÅ\97L\82Å\82 \82é.
16 <h2>\8d\\95¶</h2>
17 <code>char* SDL_GetPrefPath(const char* org, const char* app)</code>
18 <h2>\88ø\90\94</h2>
19 <table border="1" summary="SDL_GetPrefPath">
20 <tr><td>org</td><td>\91g\90D\96¼</td></tr>
21 <tr><td>app</td><td>\83A\83v\83\8a\83P\81[\83V\83\87\83\93\96¼</td></tr>
22 </table>
23 <h2>\96ß\82è\92l</h2>
24 <p>
25 \8aÂ\8b«\82É\88Ë\91\82µ\82½\8bL\8fq\82Ì\83\86\81[\83U\83f\83B\83\8c\83N\83g\83\8a\82ÌUTF-8\95\8e\9a\97ñ\82ð\96ß\82·. \96â\91è\82ª\82 \82é(\83f\83B\83\8c\83N\83g\83\8a\82Ì\8dì\90¬\82É\8e¸\94s\82È\82Ç)\82Ì\82Æ\82«NULL\82ð\96ß\82·.
26 </p>
27 <p>
28 \83p\83X\96¼\82Ì\96\96\94ö\82É\82Í, \83p\83X\82Ì\8bæ\90Ø\82è\95\8e\9a(Windows\82È\82ç\82Î'\', \91¼\82Ì\8aÂ\8b«\82È\82ç\82Î'/')\82ª\82 \82é\82±\82Æ\82ª\95Û\8fá\82³\82ê\82Ä\82¢\82é.
29 </p>
30 <p>
31 \96ß\82³\82ê\82½\83|\83C\83\93\83^\82Í\83A\83v\83\8a\83P\81[\83V\83\87\83\93\82ª\8aÇ\97\9d\82·\82é\95K\97v\82ª\82 \82é.
32 \8eg\82Á\82½\8cã\82Í\83|\83C\83\93\83^\82É\91Î\82µ\82ÄSDL_free()\82ð\8cÄ\82Ô\82±\82Æ.
33 </p>
34 <h2>\83T\83\93\83v\83\8b\83R\81[\83h</h2>
35 <p>
36 <code>
37 <pre>
38 char *pref_path = NULL;
39
40 void InitializePrefPath() {
41     char *base_path = SDL_GetPrefPath("My Company", "My Awesome SDL 2 Game");
42     if (base_path) {
43         pref_path = base_path;
44     } else {
45         /* \83Q\81[\83\80\82Å\8fî\95ñ\82ð\8f\91\82©\82È\82¢\82æ\82¤\82É\82·\82é\8f\88\97\9d\82ð\82±\82±\82É\8f\91\82­ */
46     }
47 }
48 </pre>
49 </code>
50 </p>
51 <h2>\8fÚ\8d×</h2>
52 <p>
53 \82±\82Ì\8aÖ\90\94\82ª\96ß\82µ\82½\8fê\8f\8a\82Ì\82Ý\88À\91S\82É\83t\83@\83C\83\8b\82ð\8f\91\82«\8d\9e\82ß\82é\82Æ\82Ý\82È\82·\82×\82«\82Å\82 \82é.
54 (\8f\91\82«\8d\9e\82ß\82é\82Å\82 \82ë\82¤<a href="SDL_GetBasePath.html">SDL_GetBasePath()</a>\82â\82»\82Ì\90e\83f\83B\83\8c\83N\83g\83\8a\82É\82Í\8f\91\82«\8d\9e\82Þ\82×\82«\82Å\82È\82¢.)
55 </p>
56 <p>
57 org\82Æapp\82Í\83f\83B\83\8c\83N\83g\83\8a\82Ì\96¼\91O\82Ì\88ê\95\94\82É\82È\82é. \8e\9f\82Ì\83\8b\81[\83\8b\82É\8f]\82¤\82×\82«\82Å\82 \82é.
58 <ul>
59 <li>\82±\82Ì\8aÖ\90\94\82ð\8eg\82¤\91S\82Ä\82Ì\83A\83v\83\8a\83P\81[\83V\83\87\83\93\82Í, (\91å\95\8e\9a\8f¬\95\8e\9a\82à)\93¯\82¶org\82ð\8eg\82¤.
60 <li>\83A\83v\83\8a\83P\81[\83V\83\87\83\93\82²\82Æ\82É\88á\82¤app\82ð\8eg\82¤. \88ê\93x\8c\88\82ß\82½app\82Í\95Ï\8dX\82µ\82È\82¢.
61 <li>UTF-8\82Å\83G\83\93\83R\81[\83h\82·\82é\8cÀ\82èUnicode\82Í\8eg\82¦\82é. \82µ\82©\82µ...
62 <li>...\8eg\82¤\82Ì\82Í\83A\83\8b\83t\83@\83x\83b\83g, \90\94\8e\9a\8bó\94\92\82Ì\82Ý\82É\82·\82é. "Game Name 2: Bad Guy's Revenge!" \82Ì\82æ\82¤\82É\8bL\8d\86\82ð\8aÜ\82ß\82é\82Ì\82Í\94ð\82¯\82é. "Game Name 2" \82Å\8f\\95ª\82Å\82 \82é.
63 </ul>
64 </p>
65 <h2>\83o\81[\83W\83\87\83\93</h2>
66 SDL 2.0.1\88È\8d~
67 <h2>\8aÖ\98A\8d\80\96Ú(\8aÖ\90\94)</h2>
68 <a href="SDL_GetBasePath.html">SDL_GetBasePath</a><br>
69 <h2>SDL Wiki\82Ö\82Ì\83\8a\83\93\83N</h2>
70 <a href="https://wiki.libsdl.org/SDL_GetPrefPath">SDL_GetPrefPath - SDL Wiki</a>
71 <hr>
72 </body>
73 </html>