sdl_cpuinfo.pas 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. unit sdl_cpuinfo;
  2. {
  3. $Id: sdl_cpuinfo.pas,v 1.2 2004/02/18 22:52:53 savage Exp $
  4. }
  5. {******************************************************************************}
  6. { }
  7. { Borland Delphi SDL - Simple DirectMedia Layer }
  8. { Conversion of the Simple DirectMedia Layer Headers }
  9. { }
  10. { Portions created by Sam Lantinga <[email protected]> are }
  11. { Copyright (C) 1997-2004 Sam Lantinga }
  12. { 5635-34 Springhouse Dr. }
  13. { Pleasanton, CA 94588 (USA) }
  14. { }
  15. { All Rights Reserved. }
  16. { }
  17. { The original files are : SDL_cpuinfo.h }
  18. { }
  19. { The initial developer of this Pascal code was : }
  20. { Dominqiue Louis <[email protected]> }
  21. { }
  22. { Portions created by Dominqiue Louis are }
  23. { Copyright (C) 2000 - 2004 Dominqiue Louis. }
  24. { }
  25. { }
  26. { Contributor(s) }
  27. { -------------- }
  28. { Obtained through: }
  29. { Joint Endeavour of Delphi Innovators ( Project JEDI ) }
  30. { }
  31. { You may retrieve the latest version of this file at the Project }
  32. { JEDI home page, located at http://delphi-jedi.org }
  33. { }
  34. { The contents of this file are used with permission, subject to }
  35. { the Mozilla Public License Version 1.1 (the "License"); you may }
  36. { not use this file except in compliance with the License. You may }
  37. { obtain a copy of the License at }
  38. { http://www.mozilla.org/MPL/MPL-1.1.html }
  39. { }
  40. { Software distributed under the License is distributed on an }
  41. { "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or }
  42. { implied. See the License for the specific language governing }
  43. { rights and limitations under the License. }
  44. { }
  45. { Description }
  46. { ----------- }
  47. { }
  48. { }
  49. { }
  50. { }
  51. { }
  52. { }
  53. { }
  54. { Requires }
  55. { -------- }
  56. { The SDL Runtime libraris on Win32 : SDL.dll on Linux : libSDL.so }
  57. { They are available from... }
  58. { http://www.libsdl.org . }
  59. { }
  60. { Programming Notes }
  61. { ----------------- }
  62. { }
  63. { }
  64. { }
  65. { }
  66. { Revision History }
  67. { ---------------- }
  68. {
  69. $Log: sdl_cpuinfo.pas,v $
  70. Revision 1.2 2004/02/18 22:52:53 savage
  71. Forgot to add jedi-sdl.inc file. It's there now.
  72. Revision 1.1 2004/02/18 22:35:54 savage
  73. Brought sdl.pas up to 1.2.7 compatability
  74. Thus...
  75. Added SDL_GL_STEREO,
  76. SDL_GL_MULTISAMPLEBUFFERS,
  77. SDL_GL_MULTISAMPLESAMPLES
  78. Add DLL/Shared object functions
  79. function SDL_LoadObject( const sofile : PChar ) : Pointer;
  80. function SDL_LoadFunction( handle : Pointer; const name : PChar ) : Pointer;
  81. procedure SDL_UnloadObject( handle : Pointer );
  82. Added function to create RWops from const memory: SDL_RWFromConstMem()
  83. function SDL_RWFromConstMem(const mem: Pointer; size: Integer) : PSDL_RWops;
  84. Ported SDL_cpuinfo.h so Now you can test for Specific CPU types.
  85. }
  86. {******************************************************************************}
  87. interface
  88. {$I jedi-sdl.inc}
  89. uses
  90. sdl;
  91. {* This function returns true if the CPU has the RDTSC instruction
  92. *}
  93. function SDL_HasRDTSC : SDL_Bool;
  94. cdecl; external {$IFDEF __GPC__}name 'SDL_HasRDTSC'{$ELSE} SDLLibName{$ENDIF __GPC__};
  95. {$EXTERNALSYM SDL_HasRDTSC}
  96. {* This function returns true if the CPU has MMX features
  97. *}
  98. function SDL_HasMMX : SDL_Bool;
  99. cdecl; external {$IFDEF __GPC__}name 'SDL_HasMMX'{$ELSE} SDLLibName{$ENDIF __GPC__};
  100. {$EXTERNALSYM SDL_HasMMX}
  101. {* This function returns true if the CPU has MMX Ext. features
  102. *}
  103. function SDL_HasMMXExt : SDL_Bool;
  104. cdecl; external {$IFDEF __GPC__}name 'SDL_HasMMXExt'{$ELSE} SDLLibName{$ENDIF __GPC__};
  105. {$EXTERNALSYM SDL_HasMMXExt}
  106. {* This function returns true if the CPU has 3DNow features
  107. *}
  108. function SDL_Has3DNow : SDL_Bool;
  109. cdecl; external {$IFDEF __GPC__}name 'SDL_Has3DNow'{$ELSE} SDLLibName{$ENDIF __GPC__};
  110. {$EXTERNALSYM SDL_Has3DNow}
  111. {* This function returns true if the CPU has 3DNow! Ext. features
  112. *}
  113. function SDL_Has3DNowExt : SDL_Bool;
  114. cdecl; external {$IFDEF __GPC__}name 'SDL_Has3DNowExt'{$ELSE} SDLLibName{$ENDIF __GPC__};
  115. {$EXTERNALSYM SDL_Has3DNowExt}
  116. {* This function returns true if the CPU has SSE features
  117. *}
  118. function SDL_HasSSE : SDL_Bool;
  119. cdecl; external {$IFDEF __GPC__}name 'SDL_HasSSE'{$ELSE} SDLLibName{$ENDIF __GPC__};
  120. {$EXTERNALSYM SDL_HasSSE}
  121. {* This function returns true if the CPU has SSE2 features
  122. *}
  123. function SDL_HasSSE2 : SDL_Bool;
  124. cdecl; external {$IFDEF __GPC__}name 'SDL_HasSSE2'{$ELSE} SDLLibName{$ENDIF __GPC__};
  125. {$EXTERNALSYM SDL_HasSSE2}
  126. {* This function returns true if the CPU has AltiVec features
  127. *}
  128. function SDL_HasAltiVec : SDL_Bool;
  129. cdecl; external {$IFDEF __GPC__}name 'SDL_HasAltiVec'{$ELSE} SDLLibName{$ENDIF __GPC__};
  130. {$EXTERNALSYM SDL_HasAltiVec}
  131. implementation
  132. end.