OSDN Git Service

修正
[sdl2referencejp/sdl2referencejp.git] / SDL_GetBasePath.html
index 9e32d8c..9b149d0 100644 (file)
 <code>char* SDL_GetBasePath(void)</code>\r
 <h2>\96ß\82è\92l</h2>\r
 <p>\r
+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
 \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
 \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
 <a href="SDL_GetError.html">SDL_GetError()</a>\82Å\8fÚ\8d×\82ð\92m\82é\82±\82Æ\82ª\82Å\82«\82é.\r
 </p>\r
+<p>\r
+\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
+</p>\r
+<p>\r
+\82±\82Ì\83|\83C\83\93\83^\82Ì\8aÇ\97\9d\82Í\83v\83\8d\83O\83\89\83}\82ª\8ds\82¤.\r
+\8eg\82¢\8fI\82í\82Á\82½\82ç<a href="SDL_free.html">SDL_free()</a>\82ð\8cÄ\82Ô\95K\97v\82ª\82 \82é.\r
+</p>\r
+<h2>\83T\83\93\83v\83\8b\83R\81[\83h</h2>\r
+<p>\r
+<code>\r
+<pre>\r
+char *data_path = NULL;\r
+\r
+void InitializeDataPath() {\r
+    char *base_path = SDL_GetBasePath();\r
+    if (base_path) {\r
+        data_path = SDL_strdup(base_path);\r
+        SDL_free(base_path);\r
+    } else {\r
+        data_path = SDL_strdup("./");\r
+    }\r
+}\r
+</pre>\r
+</code>\r
+</p>\r
 <h2>\8fÚ\8d×</h2>\r
 <p>\r
 \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
@@ -40,6 +66,8 @@ SDL_FILESYSTEM_BASE_DIR_TYPE 
 <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
 </table>\r
 </p>\r
+<h2>\83o\81[\83W\83\87\83\93</h2>\r
+SDL 2.0.1\88È\8d~\r
 <h2>\8aÖ\98A\8d\80\96Ú(\8aÖ\90\94)</h2>\r
 <a href="SDL_GetPrefPath.html">SDL_GetPrefPath</a><br>\r
 <h2>SDL Wiki\82Ö\82Ì\83\8a\83\93\83N</h2>\r