OSDN Git Service

SDL_AllocRW サンプルコードを更新 https://wiki.libsdl.org/SDL_AllocRW?action=diff&rev1=12&rev2=13
[sdl2referencejp/sdl2referencejp.git] / SDL_GetPrefPath.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
2 <html lang="ja-JP">\r
3 <head>\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="CategoryFileSystem.html" title="1\82Â\8fã">\r
9 <title>SDL_GetPrefPath</title>\r
10 </head>\r
11 <body>\r
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\r
13 <hr>\r
14 <h1>SDL_GetPrefPath</h1>\r
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é.\r
16 <h2>\8d\\95¶</h2>\r
17 <code>char* SDL_GetPrefPath(const char* org, const char* app)</code>\r
18 <h2>\88ø\90\94</h2>\r
19 <table border="1" summary="SDL_GetPrefPath">\r
20 <tr><td>org</td><td>\91g\90D\96¼</td></tr>\r
21 <tr><td>app</td><td>\83A\83v\83\8a\83P\81[\83V\83\87\83\93\96¼</td></tr>\r
22 </table>\r
23 <h2>\96ß\82è\92l</h2>\r
24 <p>\r
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·.\r
26 </p>\r
27 <p>\r
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é.\r
29 </p>\r
30 <p>\r
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é.\r
32 \8eg\82Á\82½\8cã\82Í\83|\83C\83\93\83^\82É\91Î\82µ\82Ä<a href="SDL_free.html">SDL_free()</a>\82ð\8cÄ\82Ô\82±\82Æ.\r
33 </p>\r
34 <h2>\83T\83\93\83v\83\8b\83R\81[\83h</h2>\r
35 <p>\r
36 <code>\r
37 <pre>\r
38 char *pref_path = NULL;\r
39 \r
40 void InitializePrefPath() {\r
41     char *base_path = SDL_GetPrefPath("My Company", "My Awesome SDL 2 Game");\r
42     if (base_path) {\r
43         pref_path = base_path;\r
44     } else {\r
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­ */\r
46     }\r
47 }\r
48 </pre>\r
49 </code>\r
50 </p>\r
51 <h2>\8fÚ\8d×</h2>\r
52 <p>\r
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é.\r
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¢.)\r
55 </p>\r
56 <p>\r
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é.\r
58 <ul>\r
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¤.\r
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¢.\r
61 <li>UTF-8\82Å\83G\83\93\83R\81[\83h\82·\82é\8cÀ\82èUnicode\82Í\8eg\82¦\82é. \82µ\82©\82µ...\r
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é.\r
63 </ul>\r
64 </p>\r
65 <h2>\83o\81[\83W\83\87\83\93</h2>\r
66 SDL 2.0.1\88È\8d~\r
67 <h2>\8aÖ\98A\8d\80\96Ú(\8aÖ\90\94)</h2>\r
68 <a href="SDL_GetBasePath.html">SDL_GetBasePath</a><br>\r
69 <h2>SDL Wiki\82Ö\82Ì\83\8a\83\93\83N</h2>\r
70 <a href="https://wiki.libsdl.org/SDL_GetPrefPath">SDL_GetPrefPath - SDL Wiki</a>\r
71 <hr>\r
72 </body>\r
73 </html>\r