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="CategoryFileSystem.html" title="1
\82Â
\8fã">
\r
9 <title>SDL_GetBasePath</title>
\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
14 <h1>SDL_GetBasePath</h1>
\r
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é.
\r
17 <code>char* SDL_GetBasePath(void)</code>
\r
18 <h2>
\96ß
\82è
\92l</h2>
\r
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.
\r
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·.
\r
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·.
\r
23 <a href="SDL_GetError.html">SDL_GetError()</a>
\82Å
\8fÚ
\8d×
\82ð
\92m
\82é
\82±
\82Æ
\82ª
\82Å
\82«
\82é.
\r
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é.
\r
29 \82±
\82Ì
\83|
\83C
\83\93\83^
\82Ì
\8aÇ
\97\9d\82Í
\83v
\83\8d\83O
\83\89\83}
\82ª
\8ds
\82¤.
\r
30 \8eg
\82¢
\8fI
\82í
\82Á
\82½
\82ç<a href="SDL_free.html">SDL_free()</a>
\82ð
\8cÄ
\82Ô
\95K
\97v
\82ª
\82 \82é.
\r
32 <h2>
\83T
\83\93\83v
\83\8b\83R
\81[
\83h</h2>
\r
36 char *data_path = NULL;
\r
38 void InitializeDataPath() {
\r
39 char *base_path = SDL_GetBasePath();
\r
41 data_path = base_path;
\r
43 data_path = SDL_strdup("./");
\r
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é.
\r
54 <strong>Mac OS X
\82ÆiOS
\82Ì
\93Á
\95Ê
\82È
\8ed
\97l:</strong>
\r
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·.
\r
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é.
\r
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é.
\r
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é):
\r
61 <table border="1" summary="">
\r
62 <tr><th>
\92l</th><th>
\90à
\96¾</th><th>
\97á</th></tr>
\r
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>
\r
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>
\r
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>
\r
68 <h2>
\83o
\81[
\83W
\83\87\83\93</h2>
\r
70 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\8aÖ
\90\94)</h2>
\r
71 <a href="SDL_GetPrefPath.html">SDL_GetPrefPath</a><br>
\r
72 <h2>SDL Wiki
\82Ö
\82Ì
\83\8a\83\93\83N</h2>
\r
73 <a href="https://wiki.libsdl.org/SDL_GetBasePath">SDL_GetBasePath - SDL Wiki</a>
\r