OSDN Git Service

新しい説明の訳に差し替え
[sdl2referencejp/sdl2referencejp.git] / SDL_WaitThread.html
index 555ce56..e2d5b03 100644 (file)
@@ -18,7 +18,7 @@
 <h2>\88ø\90\94</h2>\r
 <table border="1" summary="SDL_WaitThread">\r
 <tr><td>thread</td><td><a href="SDL_CreateThread.html">SDL_CreateThread()</a>\82Å\8aJ\8en\82³\82ê\82½\83X\83\8c\83b\83h\82ÌSDL_Thread\83|\83C\83\93\83^</td></tr>\r
-<tr><td>status</td><td>\83X\83\8c\83b\83h\8aÖ\90\94\82ªreturn\82Å\96ß\82µ\82½\92l\82ð\91ã\93ü\82·\82é\90®\90\94\82Ì\95Ï\90\94\82Ö\82Ì\83|\83C\83\93\83^</td></tr>\r
+<tr><td>status</td><td>\83X\83\8c\83b\83h\8aÖ\90\94\82ªreturn\82Å\96ß\82µ\82½\92l\82ð\91ã\93ü\82·\82é\90®\90\94\82Ì\95Ï\90\94\82Ö\82Ì\83|\83C\83\93\83^. NULL\82È\82ç\82Î\96ß\82è\92l\82ð\8eó\82¯\8eæ\82ç\82È\82¢. \8fÚ\8d×\82ð\8eQ\8fÆ\82·\82é\82±\82Æ</td></tr>\r
 </table>\r
 <h2>\83T\83\93\83v\83\8b\83R\81[\83h</h2>\r
 <p>\r
 #include "SDL_thread.h"\r
 #include "SDL_timer.h"\r
 \r
-int TestThread(void *ptr);\r
+// \82Æ\82Ä\82à\8aÈ\92P\82È\83X\83\8c\83b\83h - 50ms\8aÔ\8au\82Å0\82©\82ç9\82Ü\82Å\83J\83E\83\93\83g\82·\82é\r
+int TestThread(void *ptr)\r
+{\r
+    int cnt;\r
+\r
+    for (cnt = 0; cnt &lt; 10; ++cnt) {\r
+        SDL_Log("\n\83X\83\8c\83b\83h\83J\83E\83\93\83^: %d", cnt);\r
+        SDL_Delay(50);\r
+    }\r
+\r
+    return cnt;\r
+}\r
 \r
 int main(int argc, char *argv[])\r
 {\r
@@ -36,13 +47,13 @@ int main(int argc, char *argv[])
     SDL_threadID threadID;\r
     int          threadReturnValue;\r
 \r
-    printf("\n\8aÈ\92P\82ÈSDL_CreateThread\82Ì\83e\83X\83g:");\r
+    SDL_Log("\n\8aÈ\92P\82ÈSDL_CreateThread\82Ì\83e\83X\83g:");\r
 \r
     // \92P\82É\83X\83\8c\83b\83h\82ð\90\90¬\82·\82é\r
     thread = SDL_CreateThread(TestThread, "TestThread", (void *)NULL);\r
 \r
     if (NULL == thread) {\r
-        printf("\nSDL_CreateThread \8e¸\94s: %s\n", SDL_GetError());\r
+        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "\nSDL_CreateThread \8e¸\94s: %s\n", SDL_GetError());\r
         exit(-1);\r
     }\r
 \r
@@ -51,23 +62,10 @@ int main(int argc, char *argv[])
 \r
     // \83X\83\8c\83b\83h\82Ì\8a®\97¹\82ð\91Ò\82¿\96ß\82è\92l\82ð\93¾\82é\r
     SDL_WaitThread(thread, &amp;threadReturnValue);\r
-    printf("\n\83X\83\8c\83b\83h\82Ì\96ß\82è\92l: %d", threadReturnValue);\r
+    SDL_Log("\n\83X\83\8c\83b\83h\82Ì\96ß\82è\92l: %d", threadReturnValue);\r
 \r
     return 0;\r
 }\r
-\r
-// \82Æ\82Ä\82à\8aÈ\92P\82È\83X\83\8c\83b\83h - 50ms\8aÔ\8au\82Å0\82©\82ç9\82Ü\82Å\83J\83E\83\93\83g\82·\82é\r
-int TestThread(void *ptr)\r
-{\r
-    int cnt;\r
-\r
-    for (cnt = 0; cnt &lt; 10; ++cnt) {\r
-        printf("\n\83X\83\8c\83b\83h\83J\83E\83\93\83^: %d", cnt);\r
-        SDL_Delay(50);\r
-    }\r
-\r
-    return cnt;\r
-}\r
 </pre>\r
 </code>\r
 </p>\r
@@ -95,6 +93,8 @@ int TestThread(void *ptr)
 <p>\r
 thread\83|\83C\83\93\83^\82Í\82±\82Ì\8aÖ\90\94\82Å\89ð\95ú\82³\82ê\82é\82½\82ß, \82»\82Ì\8cã\82Í\8eg\82¦\82È\82¢\82Ì\82Å\92\8d\88Ó\82·\82é\82±\82Æ.\r
 </p>\r
+<h2>\83o\81[\83W\83\87\83\93</h2>\r
+2.0.0\88È\8d~\r
 <h2>\8aÖ\98A\8d\80\96Ú(\8aÖ\90\94)</h2>\r
 <a href="SDL_CreateThread.html">SDL_CreateThread</a><br>\r
 <a href="SDL_DetachThread.html">SDL_DetachThread</a><br>\r