home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue4 / SDL / gcc346 / !SDL / man / SDL_WasInit.3 < prev    next >
Encoding:
Text File  |  2006-09-20  |  2.2 KB  |  79 lines

  1. <!-- manual page source format generated by PolyglotMan v3.0.8+X.Org, -->
  2. <!-- available at http://polyglotman.sourceforge.net/ -->
  3.  
  4. <html>
  5. <head>
  6. <title>"SDL_WasInit"("3") manual page</title>
  7. </head>
  8. <body bgcolor='#efefef' text='black' link='blue' vlink='#551A8B' alink='red'>
  9. <a href='#toc'>Table of Contents</a><p>
  10.  
  11. <h2><a name='sect0' href='#toc0'>Name</a></h2>
  12. SDL_WasInit- Check which subsystems are initialized 
  13. <h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
  14. <p>
  15. <b>#include
  16. "SDL.h" <p>
  17. </b><b>Uint32 <b>SDL_WasInit</b></b>(<b>Uint32 flags</b>); 
  18. <h2><a name='sect2' href='#toc2'>Description</a></h2>
  19. <p>
  20. <b>SDL_WasInit</b> allows
  21. you to see which SDL subsytems have been <i>initialized</i>. <b>flags</b> is a bitwise
  22. OR'd combination of the subsystems you wish to check (see <i><b>SDL_Init</b></i> for a
  23. list of subsystem flags). 
  24. <h2><a name='sect3' href='#toc3'>Return Value</a></h2>
  25. <p>
  26. <b>SDL_WasInit</b> returns a bitwised OR'd
  27. combination of the initialized subsystems. 
  28. <h2><a name='sect4' href='#toc4'>Examples</a></h2>
  29. <p>
  30. <br>
  31. <pre>CW
  32. /* Here are several ways you can use SDL_WasInit() */
  33. /* Get init data on all the subsystems */
  34. Uint32 subsystem_init;
  35. subsystem_init=SDL_WasInit(SDL_INIT_EVERYTHING);
  36. if(subsystem_init&SDL_INIT_VIDEO)
  37.   printf("Video is initialized.
  38. ");
  39. else
  40.   printf("Video is not initialized.
  41. ");
  42. /* Just check for one specfic subsystem */
  43. if(SDL_WasInit(SDL_INIT_VIDEO)!=0)
  44.   printf("Video is initialized.
  45. ");
  46. else
  47.   printf("Video is not initialized.
  48. ");
  49. /* Check for two subsystems */
  50. Uint32 subsystem_mask=SDL_INIT_VIDEO|SDL_INIT_AUDIO;
  51. if(SDL_WasInit(subsystem_mask)==subsystem_mask)
  52.   printf("Video and Audio initialized.
  53. ");
  54. else
  55.   printf("Video and Audio not initialized.
  56. ");
  57.  
  58. </pre><p>
  59.  
  60. <h2><a name='sect5' href='#toc5'>See Also</a></h2>
  61. <p>
  62. <i><b>SDL_Init</b></i>, <i><b>SDL_Subsystem</b></i> 
  63. <!--
  64.   
  65.  <p>
  66.  
  67. <hr><p>
  68. <a name='toc'><b>Table of Contents</b></a><p>
  69. <ul>
  70. <li><a name='toc0' href='#sect0'>Name</a></li>
  71. <li><a name='toc1' href='#sect1'>Synopsis</a></li>
  72. <li><a name='toc2' href='#sect2'>Description</a></li>
  73. <li><a name='toc3' href='#sect3'>Return Value</a></li>
  74. <li><a name='toc4' href='#sect4'>Examples</a></li>
  75. <li><a name='toc5' href='#sect5'>See Also</a></li>
  76. </ul>
  77. </body>
  78. </html>
  79.