OSDN Git Service

SDL_HINT_RENDER_DRIVER metalを追加した https://wiki.libsdl.org/SDL_HINT_RENDER_DRIVER...
[sdl2referencejp/sdl2referencejp.git] / SDL_GetBasePath.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_GetBasePath</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_GetBasePath</h1>
15 \83A\83v\83\8a\83P\81[\83V\83\87\83\93\82ð\8bN\93®\82µ\82½\83f\83B\83\8c\83N\83g\83\8a\82ð\93¾\82é. \82±\82±\82ª\83A\83v\83\8a\83P\81[\83V\83\87\83\93\83f\81[\83^\83f\83B\83\8c\83N\83g\83\8a\82Å\82 \82é.
16 <h2>\8d\\95¶</h2>
17 <code>char* SDL_GetBasePath(void)</code>
18 <h2>\96ß\82è\92l</h2>
19 <p>
20 Returns an absolute path in UTF-8 encoding to the application data directory. NULL will be returned on error or when the platform doesn't implement this functionality, call SDL_GetError() for more information.
21 \83A\83v\83\8a\83P\81[\83V\83\87\83\93\83f\81[\83^\83f\83B\83\8c\83N\83g\83\8a\82ÌUTF-8\82Ì\90â\91Î\83p\83X\96¼\82ð\96ß\82·.
22 \8e¸\94s\82Ü\82½\82Í\82±\82Ì\8aÖ\90\94\82ª\8eÀ\91\95\82³\82ê\82Ä\82¢\82È\82¢\8aÂ\8b«\82Ì\8fê\8d\87NULL\82ð\96ß\82·.
23 <a href="SDL_GetError.html">SDL_GetError()</a>\82Å\8fÚ\8d×\82ð\92m\82é\82±\82Æ\82ª\82Å\82«\82é.
24 </p>
25 <p>
26 \96ß\82³\82ê\82½\83p\83X\82Í\8dÅ\8cã\82ª\8bæ\90Ø\82è\8bL\8d\86(Windows\82È\82ç'\', \91¼\82Ì\8aÂ\8b«\82È\82ç'/')\82Å\8fI\82í\82Á\82Ä\82¢\82é\82±\82Æ\82ª\95Û\8fá\82³\82ê\82Ä\82¢\82é.
27 </p>
28 <p>
29 \82±\82Ì\83|\83C\83\93\83^\82Ì\8aÇ\97\9d\82Í\83v\83\8d\83O\83\89\83}\82ª\8ds\82¤.
30 \8eg\82¢\8fI\82í\82Á\82½\82çSDL_free()\82ð\8cÄ\82Ô\95K\97v\82ª\82 \82é.
31 </p>
32 <h2>\83T\83\93\83v\83\8b\83R\81[\83h</h2>
33 <p>
34 <code>
35 <pre>
36 char *data_path = NULL;
37
38 void InitializeDataPath() {
39     char *base_path = SDL_GetBasePath();
40     if (base_path) {
41         data_path = base_path;
42     } else {
43         data_path = SDL_strdup("./");
44     }
45 }
46 </pre>
47 </code>
48 </p>
49 <h2>\8fÚ\8d×</h2>
50 <p>
51 \82±\82Ì\8aÖ\90\94\82Í\91¬\82¢\95K\97v\82Í\82È\82¢. \82»\82ê\82É\82à\8aÖ\82í\82ç\82¸\91¬\82³\82ª\95K\97v\82È\82ç\82Î, \8dÅ\8f\89\82É\8cÄ\82ñ\82¾\82Æ\82«\82É\95\8e\9a\97ñ\82ð\95Û\91\82·\82é\95K\97v\82ª\82 \82é.
52 </p>
53 <p>
54 <strong>Mac OS X\82ÆiOS\82Ì\93Á\95Ê\82È\8ed\97l:</strong>
55 \83A\83v\83\8a\83P\81[\83V\83\87\83\93\82ª".app"\83o\83\93\83h\83\8b\82³\82ê\82Ä\82¢\82ê\82Î, \82±\82Ì\8aÖ\90\94\82Í\83\8a\83\\81[\83X\83f\83B\83\8c\83N\83g\83\8a(\97á: MyApp.app/Contents/Resources/)\82ð\96ß\82·.
56 \82±\82Ì\93®\8dì\82ÍInfo.plist\82É\83v\83\8d\83p\83e\83B\82ð\92Ç\89Á\82µ\82Ä\8fã\8f\91\82«\82Å\82«\82é.
57 SDL_FILESYSTEM_BASE_DIR_TYPE \95\8e\9a\97ñ\83L\81[\82É\92l\82ð\92Ç\89Á\82·\82é\82Æ\93®\8dì\82ð\95Ï\82¦\82ç\82ê\82é.
58 </p>
59 <p>
60 SDL_FILESYSTEM_BASE_DIR_TYPE \83v\83\8d\83p\83e\83B\82Ì\92l (\83A\83v\83\8a\83P\81[\83V\83\87\83\93\82Í /Applications/SDLApp/MyApp.app \82É\82 \82é\82Æ\82·\82é):
61 <table border="1" summary="">
62 <tr><th>\92l</th><th>\90à\96¾</th><th>\97á</th></tr>
63 <tr><th>resource</th><td>\83o\83\93\83h\83\8b\82³\82ê\82½\83\8a\83\\81[\83X\83f\83B\83\8c\83N\83g\83\8a (\83f\83t\83H\83\8b\83g)</td><td>/Applications/SDLApp/MyApp.app/Contents/Resources</td></tr>
64 <tr><th>bundle</th><td>\83o\83\93\83h\83\8b\83f\83B\83\8c\83N\83g\83\8a</td><td>/Applications/SDLApp/MyApp.app/</td></tr>
65 <tr><th>parent</th><td>\83o\83\93\83h\83\8b\83f\83B\83\8c\83N\83g\83\8a\82Ì\82 \82é\83f\83B\83\8c\83N\83g\83\8a</td><td>/Applications/SDLApp/</td></tr>
66 </table>
67 </p>
68 <h2>\83o\81[\83W\83\87\83\93</h2>
69 SDL 2.0.1\88È\8d~
70 <h2>\8aÖ\98A\8d\80\96Ú(\8aÖ\90\94)</h2>
71 <a href="SDL_GetPrefPath.html">SDL_GetPrefPath</a><br>
72 <h2>SDL Wiki\82Ö\82Ì\83\8a\83\93\83N</h2>
73 <a href="https://wiki.libsdl.org/SDL_GetBasePath">SDL_GetBasePath - SDL Wiki</a>
74 <hr>
75 </body>
76 </html>